adminforth 2.1.0-next.7 → 2.1.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,19 +12,20 @@
12
12
  >
13
13
  <component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-lightSidebarIcons dark:text-darkSidebarIcons transition duration-75 group-hover:text-lightSidebarIconsHover dark:group-hover:text-darkSidebarIconsHover" ></component>
14
14
  <span class="text-ellipsis overflow-hidden ms-3">{{ item.label }}</span>
15
- <span v-if="item.badge" class="inline-flex items-center justify-center h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
16
- fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]"
15
+ <span v-if="item.badge"
17
16
  >
18
17
 
19
18
  <Tooltip v-if="item.badgeTooltip">
20
- {{ item.badge }}
19
+ <div class="inline-flex items-center justify-center h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
20
+ fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]">{{ item.badge }}</div>
21
21
 
22
22
  <template #tooltip>
23
23
  {{ item.badgeTooltip }}
24
24
  </template>
25
25
  </Tooltip>
26
26
  <template v-else>
27
- {{ item.badge }}
27
+ <div class="inline-flex items-center justify-center h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
28
+ fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]">{{ item.badge }}</div>
28
29
  </template>
29
30
 
30
31
  </span>
@@ -86,7 +86,9 @@ export const useCoreStore = defineStore('core', () => {
86
86
  }
87
87
  async function subscribeToMenuBadges() {
88
88
  const processItem = (mi: AdminForthConfigMenuItem) => {
89
- if (mi.badge) {
89
+
90
+ // console.log('🔔 subscribeToMenuBadges', mi.badge, JSON.stringify(mi));
91
+ if (mi.badge !== undefined) {
90
92
  websocket.subscribe(`/opentopic/update-menu-badge/${mi.itemId}`, ({ badge }) => {
91
93
  mi.badge = badge;
92
94
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.1.0-next.7",
3
+ "version": "2.1.0-next.8",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",