Skip to content

Commit

Permalink
feat: add badge when zniffer is running
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed May 30, 2024
1 parent 126291d commit b8840fd
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@
:color="item.path === $route.path ? 'primary' : ''"
>
<v-list-item-action>
<v-icon>{{ item.icon }}</v-icon>
<v-badge
color="red"
:value="item.badge"
:content="item.badge"
dot
>
<v-icon>{{ item.icon }}</v-icon>
</v-badge>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title
Expand Down Expand Up @@ -447,6 +454,7 @@ export default {
'controllerNode',
'zniffer',
'zwave',
'znifferState',
]),
...mapState(useBaseStore, {
darkMode: (store) => store.ui.darkMode,
Expand Down Expand Up @@ -491,9 +499,16 @@ export default {
icon: 'preview',
title: 'Zniffer',
path: Routes.zniffer,
badge: this.znifferState?.started ? 1 : 0,
})
}
for (const p of pages) {
if (p.badge === undefined) {
p.badge = 0
}
}
return pages
},
updateAvailable() {
Expand Down

0 comments on commit b8840fd

Please sign in to comment.