adminforth 2.4.0-next.167 → 2.4.0-next.169

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.
@@ -7,7 +7,7 @@
7
7
  'hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextHover active:bg-lightSidebarActive dark:active:bg-darkSidebarHover': !['divider', 'gap', 'heading'].includes(item.type),
8
8
  'px-6': (isChild && !isSidebarIconOnly && !isSidebarHovering) || (isChild && isSidebarIconOnly && isSidebarHovering),
9
9
  'px-3.5': !isChild || (isSidebarIconOnly && !isSidebarHovering),
10
- 'max-w-13': isSidebarIconOnly && !isSidebarHovering,
10
+ 'max-w-12': isSidebarIconOnly && !isSidebarHovering,
11
11
  'bg-lightSidebarItemActive dark:bg-darkSidebarItemActive': item.resourceId ?
12
12
  ($route.params.resourceId === item.resourceId && $route.name === 'resource-list') :
13
13
  ($route.name === item.path)
@@ -21,7 +21,7 @@
21
21
  }" >
22
22
  </component>
23
23
  <span
24
- class="overflow-hidden block relative ms-3 text-left rtl:text-right transition-all duration-200 ease-in-out"
24
+ class="overflow-hidden block ms-3 text-left rtl:text-right transition-all duration-200 ease-in-out"
25
25
  :class="{
26
26
  'opacity-0 ms-0 translate-x-4 flex-none': isSidebarIconOnly && !isSidebarHovering,
27
27
  'opacity-100 ms-3 translate-x-0 flex-none': isSidebarIconOnly && isSidebarHovering,
@@ -39,14 +39,14 @@
39
39
  {{ item.label }}
40
40
  <template v-if="item.badge && (!isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering))">
41
41
  <Tooltip v-if="item.badgeTooltip">
42
- <div class="af-badge inline-flex items-center justify-center absolute top-1/2 -translate-y-1/2 h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
42
+ <div class="af-badge inline-flex items-center justify-center h-3 py-2.5 px-1 ms-3 text-xs font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
43
43
  fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]">{{ item.badge }}</div>
44
44
  <template #tooltip>
45
45
  {{ item.badgeTooltip }}
46
46
  </template>
47
47
  </Tooltip>
48
48
  <template v-else>
49
- <div class="af-badge inline-flex items-center justify-center absolute top-1/2 -translate-y-1/2 h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
49
+ <div class="af-badge inline-flex items-center justify-center h-3 py-2.5 px-1 ms-3 text-xs font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
50
50
  fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]">{{ item.badge }}</div>
51
51
  </template>
52
52
  </template>
@@ -355,6 +355,8 @@ watch(()=>coreStore.menu, () => {
355
355
  });
356
356
  })
357
357
 
358
+
359
+
358
360
  watch(isSidebarIconOnly, (isIconOnly) => {
359
361
  if (!isMobile.value && iconOnlySidebarEnabled.value) {
360
362
  localStorage.setItem('afIconOnlySidebar', isIconOnly.toString());
@@ -401,6 +403,12 @@ onMounted(() => {
401
403
  if (!iconOnlySidebarEnabled.value) {
402
404
  isSidebarIconOnly.value = false;
403
405
  }
406
+
407
+ coreStore.menu.forEach((item, i) => {
408
+ if (item.open) {
409
+ opened.value.push(i);
410
+ };
411
+ });
404
412
  // Emit initial state
405
413
  emit('sidebarStateChange', { isSidebarIconOnly: isSidebarIconOnly.value, isSidebarHovering: isSidebarHovering.value });
406
414
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.4.0-next.167",
3
+ "version": "2.4.0-next.169",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",