Skip to content

Commit

Permalink
Use tooltipText
Browse files Browse the repository at this point in the history
  • Loading branch information
wkramer committed Jan 17, 2024
1 parent 78c1271 commit 0269bfb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
21 changes: 8 additions & 13 deletions src/components/general/ColumnMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,16 @@
>
<v-list-item-title>{{ child.name }}</v-list-item-title>
<template v-slot:append>
<v-tooltip v-if="child.tooltipText">
<v-tooltip v-if="item.tooltipText">
<template v-slot:activator="{ props }">
<v-icon v-bind="props" class="allow-disabled-hover" size="x-small"
>{{ child.icon }}</v-icon
<v-icon
v-bind="props"
class="allow-disabled-hover"
size="x-small"
>{{ item.icon }}</v-icon
>
</template>
<div v-if="child.children">
<div>{{ child.name }}'s children are missing data:</div>
<ul class="ml-4">
<li v-for="grandChild in child.children">
{{ grandChild.name }}
</li>
</ul>
</div>
<span v-else>{{ child.name }} has no data.</span>
{{ item.tooltipText }}
</v-tooltip>
<div v-else>
<v-icon v-if="child.children">mdi-chevron-right</v-icon>
Expand Down Expand Up @@ -170,7 +165,7 @@ function recursiveFind(stack: ColumnItem[], id: string): boolean {
}
</script>

<style scoped>
<style>
.allow-disabled-hover {
pointer-events: auto;
}
Expand Down
28 changes: 26 additions & 2 deletions src/components/general/TreeMenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,35 @@
<v-list-item v-else-if="item.href" :href="item.href" target="_blank">
<v-list-item-title>{{ item.name }}</v-list-item-title>
<template v-slot:append>
<v-icon>mdi-share</v-icon>
<v-icon size="x-small">{{ item.icon }}</v-icon>
</template>
</v-list-item>
<v-list-item v-else :to="item.to" style="margin-right: 10px">
<v-list-item
v-else
:to="item.to"
style="margin-right: 10px"
:disabled="item.disabled"
>
<v-list-item-title>{{ item.name }}</v-list-item-title>
<template v-slot:append>
<v-tooltip v-if="item.tooltipText">
<template v-slot:activator="{ props }">
<v-icon
v-bind="props"
class="allow-disabled-hover"
size="x-small"
>{{ item.icon }}</v-icon
>
</template>
{{ item.tooltipText }}
</v-tooltip>
<v-icon
v-else-if="item.icon"
size="x-small"
style="pointer-events: auto"
>{{ item.icon }}
</v-icon>
</template>
</v-list-item>
</template>
</template>
Expand Down

0 comments on commit 0269bfb

Please sign in to comment.