adminforth 2.27.0-next.55 → 2.27.0-next.57

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.
@@ -0,0 +1,4 @@
1
+
2
+ ignoredBuiltDependencies:
3
+ - esbuild
4
+
@@ -2,6 +2,7 @@
2
2
  <div>
3
3
  <nav
4
4
  v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady && defaultLayout"
5
+ id="af-header-nav"
5
6
  class="fixed h-14 top-0 z-30 w-full border-b drop-shadow-sm bg-lightNavbar dark:bg-darkNavbar dark:border-darkSidebarDevider"
6
7
  >
7
8
  <div class="af-header px-3 lg:px-5 lg:pl-3 flex items-center justify-between h-full w-full" >
@@ -1,4 +1,4 @@
1
- import { ref, computed } from 'vue'
1
+ import { ref, computed, onMounted, onUnmounted } from 'vue'
2
2
  import { defineStore } from 'pinia'
3
3
  import { callAdminForthApi } from '@/utils';
4
4
  import websocket from '@/websocket';
@@ -21,6 +21,19 @@ export const useCoreStore = defineStore('core', () => {
21
21
  const userData: Ref<UserData | null> = ref(null);
22
22
  const isResourceFetching = ref(false);
23
23
  const isInternetError = ref(false);
24
+ const screenWidth = ref(window.innerWidth);
25
+
26
+ onMounted(() => {
27
+ window.addEventListener('resize', updateWidth);
28
+ });
29
+ onUnmounted(() => {
30
+ window.removeEventListener('resize', updateWidth);
31
+ });
32
+
33
+ const isMobile = computed(() => screenWidth.value <= 768);
34
+ const updateWidth = () => {
35
+ screenWidth.value = window.innerWidth
36
+ }
24
37
 
25
38
  const resourceColumnsWithFilters = computed(() => {
26
39
  if (!resource.value) {
@@ -261,5 +274,6 @@ export const useCoreStore = defineStore('core', () => {
261
274
  isResourceFetching,
262
275
  isIos,
263
276
  isInternetError,
277
+ isMobile,
264
278
  }
265
279
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.27.0-next.55",
3
+ "version": "2.27.0-next.57",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",