adminforth 2.13.0-next.10 → 2.13.0-next.12

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.
@@ -14,9 +14,21 @@
14
14
  aria-label="Sidebar"
15
15
  >
16
16
  <div class="h-full px-3 pb-20 md:pb-4 bg-lightSidebar dark:bg-darkSidebar border-r border-lightSidebarBorder dark:border-darkSidebarBorder pt-4" :class="{'sidebar-scroll':!isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering)}">
17
- <div class="af-logo-title-wrapper flex relative transition-all duration-300 ease-in-out h-8 items-center" :class="{'mb-4': isSidebarIconOnly && !isSidebarHovering, 'mx-4 mb-4': !isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering)}">
18
- <img :src="loadFile(coreStore.config?.brandLogo || '@/assets/logo.svg')" :alt="`${ coreStore.config?.brandName } Logo`" class="af-logo h-8 me-3" :class="{ 'hidden': !(coreStore.config?.showBrandLogoInSidebar !== false && (!iconOnlySidebarEnabled || !isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering))) }" />
19
- <img :src="loadFile(coreStore.config?.iconOnlySidebar?.logo || '')" :alt="`${ coreStore.config?.brandName } Logo`" class="af-sidebar-icon-only-logo h-8 me-3" :class="{ 'hidden': !(coreStore.config?.showBrandLogoInSidebar !== false && coreStore.config?.iconOnlySidebar?.logo && iconOnlySidebarEnabled && isSidebarIconOnly && !isSidebarHovering) }" />
17
+ <div
18
+ class="af-logo-title-wrapper flex relative transition-all duration-300 ease-in-out h-8 items-center"
19
+ :class="{
20
+ 'mb-4': isSidebarIconOnly && !isSidebarHovering, 'mx-4 mb-4': !isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering),
21
+ 'justify-center': !(coreStore.config?.showBrandLogoInSidebar !== false && (!iconOnlySidebarEnabled || !isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering)))
22
+ }"
23
+ >
24
+ <img
25
+ :src="loadFile(coreStore.config?.brandLogo || '@/assets/logo.svg')"
26
+ :alt="`${ coreStore.config?.brandName } Logo`"
27
+ class="af-logo h-8 me-3"
28
+ :class="{
29
+ 'hidden': !(coreStore.config?.showBrandLogoInSidebar !== false && (!iconOnlySidebarEnabled || !isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering))) }"
30
+ />
31
+ <img :src="loadFile(coreStore.config?.iconOnlySidebar?.logo || '')" :alt="`${ coreStore.config?.brandName } Logo`" class="af-sidebar-icon-only-logo h-8" :class="{ 'hidden': !(coreStore.config?.showBrandLogoInSidebar !== false && coreStore.config?.iconOnlySidebar?.logo && iconOnlySidebarEnabled && isSidebarIconOnly && !isSidebarHovering) }" />
20
32
  <span
21
33
  v-if="coreStore.config?.showBrandNameInSidebar && (!iconOnlySidebarEnabled || !isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering))"
22
34
  class="af-title self-center text-lightNavbarText-size font-semibold sm:text-lightNavbarText-size whitespace-nowrap dark:text-darkSidebarText text-lightSidebarText"
@@ -88,12 +88,25 @@ export const loadFile = (file: string) => {
88
88
  }
89
89
  let path;
90
90
  let baseUrl = '';
91
- console.log('loadFile', file, "import.meta.url", import.meta.url);
92
91
  if (file.startsWith('@/')) {
93
- console.log('loading from @/');
94
92
  path = file.replace('@/', '');
95
93
  console.log('path', path);
96
- baseUrl = new URL(`./${path}`, new URL(import.meta.url).origin + new URL(import.meta.url).pathname).href;
94
+ const modules = import.meta.glob('./**/*');
95
+ const fileModulePath = `./${path}`;
96
+ let matchingModulePath = '';
97
+ for (const modulePath in modules) {
98
+ console.log('modulePath', modulePath);
99
+ if (modulePath === fileModulePath) {
100
+ matchingModulePath = modulePath;
101
+ break;
102
+ }
103
+ }
104
+ console.log('matchingModulePath', matchingModulePath);
105
+
106
+
107
+
108
+
109
+ baseUrl = new URL(fileModulePath ,import.meta.url).href;
97
110
  console.log('baseUrl', baseUrl);
98
111
  } else if (file.startsWith('@@/')) {
99
112
  path = file.replace('@@/', '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.13.0-next.10",
3
+ "version": "2.13.0-next.12",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",