|
23 | 23 | > |
24 | 24 | {{ coreStore.config?.brandName }} |
25 | 25 | </span> |
26 | | - <div class="flex items-center gap-2 w-auto" :class="{'w-full justify-end': coreStore.config?.showBrandLogoInSidebar === false}"> |
| 26 | + <div v-if="!isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering)" class="flex items-center gap-2 w-auto" :class="{'w-full justify-end': coreStore.config?.showBrandLogoInSidebar === false}"> |
27 | 27 | <component |
28 | 28 | v-for="c in coreStore?.config?.globalInjections?.sidebarTop || []" |
29 | 29 | :is="getCustomComponent(c)" |
|
106 | 106 | 'opacity-100 ms-3 translate-x-0 flex-1': !isSidebarIconOnly |
107 | 107 | }" |
108 | 108 | :style="isSidebarIconOnly ? { |
109 | | - minWidth: 'calc(16.5rem - 0.75rem*2 - 0.875rem*2 - 1.25rem - 0.75rem)', |
110 | | - width: 'calc(16.5rem - 0.75rem*2 - 0.875rem*2 - 1.25rem - 0.75rem)' |
| 109 | + minWidth: `calc(${expandedWidth} - 0.75rem*2 - 0.875rem*2 - 1.25rem - 0.75rem)`, |
| 110 | + width: `calc(${expandedWidth} - 0.75rem*2 - 0.875rem*2 - 1.25rem - 0.75rem)` |
111 | 111 | } : {}" |
112 | 112 | >{{ item.label }} |
113 | 113 |
|
|
188 | 188 | <style lang="scss" scoped> |
189 | 189 | /* Sidebar width animations */ |
190 | 190 | .sidebar-container { |
191 | | - width: 16.5rem; /* Default expanded width (w-64) */ |
| 191 | + width: v-bind(expandedWidth); /* Default expanded width (w-64) */ |
192 | 192 | transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); |
193 | 193 | overflow: hidden; /* Prevent content from showing during animation */ |
194 | 194 | will-change: width, transform; |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | .sidebar-expanded { |
202 | | - width: 16.5rem; /* Expanded width (w-64) */ |
203 | | - box-shadow: 12px 0px 18px -8px rgba(0, 0, 0, 0.15); |
| 202 | + width: v-bind(expandedWidth); /* Expanded width (w-64) */ |
| 203 | + box-shadow: 3px 0px 12px -2px rgba(0, 0, 0, 0.15); |
204 | 204 | } |
205 | 205 |
|
206 | 206 | :deep(.dark) .sidebar-collapsed { |
@@ -313,6 +313,8 @@ const isMobile = ref(!smQuery.matches); |
313 | 313 | const iconOnlySidebarEnabled = computed(() => props.forceIconOnly === true || coreStore.config?.iconOnlySidebar?.enabled !== false); |
314 | 314 | const isSidebarIconOnly = ref(false); |
315 | 315 |
|
| 316 | +const expandedWidth = computed(() => coreStore.config?.iconOnlySidebar?.expandedSidebarWidth || '16.5rem'); |
| 317 | +
|
316 | 318 | function handleBreakpointChange(e: MediaQueryListEvent) { |
317 | 319 | isMobile.value = !e.matches; |
318 | 320 | if (isMobile.value) { |
|
0 commit comments