fix: store

This commit is contained in:
2026-04-03 11:32:04 +02:00
parent 68f31952da
commit b7c4b6e3fd
27 changed files with 22 additions and 22 deletions

View File

@@ -38,7 +38,7 @@
import { useFetchJson } from '@/composable/useFetchJson'
import LangSwitch from './inner/LangSwitch.vue'
import ThemeSwitch from './inner/ThemeSwitch.vue'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import { computed, ref } from 'vue'
import { currentLang } from '@/router/langs'
import type { LabelTrans, TopMenuItem } from '@/types'

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import LangSwitch from './inner/LangSwitch.vue'
import ThemeSwitch from './inner/ThemeSwitch.vue'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
const authStore = useAuthStore()
</script>

View File

@@ -198,7 +198,7 @@ import { useEditable } from '@/composable/useConteditable';
import Default from '@/layouts/default.vue';
import { langs } from '@/router/langs';
import { useProductStore } from '@/stores/product';
import { useSettingsStore } from '@/stores/settings';
import { useSettingsStore } from '@/stores/admin/settings';
import type { EditorToolbarItem } from '@nuxt/ui';
import { onMounted, ref, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';

View File

@@ -202,7 +202,7 @@ import { useEditable } from '@/composable/useConteditable';
import Default from '@/layouts/default.vue';
import { langs } from '@/router/langs';
import { useProductStore } from '@/stores/product';
import { useSettingsStore } from '@/stores/settings';
import { useSettingsStore } from '@/stores/admin/settings';
import type { EditorToolbarItem } from '@nuxt/ui';
import { onMounted, ref, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';

View File

@@ -52,7 +52,7 @@
</template>
<script setup lang="ts">
import { useCartStore } from '@/stores/cart'
import { useCartStore } from '@/stores/user/cart'
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'

View File

@@ -104,7 +104,7 @@
<script setup lang="ts">
import { ref, computed, watch } from 'vue'
import { useAddressStore } from '@/stores/address'
import { useAddressStore } from '@/stores/user/address'
import { useI18n } from 'vue-i18n'
import Default from '@/layouts/default.vue'
const addressStore = useAddressStore()

View File

@@ -152,8 +152,8 @@
<script setup lang="ts">
import { ref, computed, watch } from 'vue'
import { useCartStore } from '@/stores/cart'
import { useAddressStore } from '@/stores/address'
import { useCartStore } from '@/stores/user/cart'
import { useAddressStore } from '@/stores/user/address'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import Default from '@/layouts/default.vue'

View File

@@ -104,7 +104,7 @@
import { computed } from 'vue'
import { useRouter } from 'vue-router'
import { useCustomerStore } from '@/stores/customer'
import { useAddressStore } from '@/stores/address'
import { useAddressStore } from '@/stores/user/address'
import { useI18n } from 'vue-i18n'
import Default from '@/layouts/default.vue'
const router = useRouter()

View File

@@ -116,9 +116,9 @@
import { ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { useCustomerStore } from '@/stores/customer'
import { useAddressStore } from '@/stores/address'
import { useAddressStore } from '@/stores/user/address'
import { useI18n } from 'vue-i18n'
import { useCartStore } from '@/stores/cart'
import { useCartStore } from '@/stores/user/cart'
import Default from '@/layouts/default.vue'
const router = useRouter()
const customerStore = useCustomerStore()

View File

@@ -32,6 +32,6 @@
</template>
<script setup lang="ts">
import { useThemeStore } from '@/stores/theme'
import { useThemeStore } from '@/stores/admin/theme'
const themeStorage = useThemeStore()
</script>

View File

@@ -29,7 +29,7 @@ export async function useFetchJson<T = unknown>(url: string, opt?: RequestInit):
// Handle 401 — access token expired; try to refresh via the HTTPOnly refresh_token cookie
if (res.status === 401) {
const { useAuthStore } = await import('@/stores/auth')
const { useAuthStore } = await import('@/stores/user/auth')
const authStore = useAuthStore()
const refreshed = await authStore.refreshAccessToken()

View File

@@ -156,7 +156,7 @@ function getItems(state: 'collapsed' | 'expanded') {
import { useRouter } from 'vue-router'
import { currentLang } from '@/router/langs'
import { useFetchJson } from '@/composable/useFetchJson'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import CountryCurrencySwitch from '@/components/inner/CountryCurrencySwitch.vue'
import LangSwitch from '@/components/inner/LangSwitch.vue'
import ThemeSwitch from '@/components/inner/ThemeSwitch.vue'

View File

@@ -1,7 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router'
import { currentLang, langs, switchLocalization } from './langs'
import { getSettings } from './settings'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import { getRoutes } from './menu'
function isAuthenticated(): boolean {

View File

@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import type { Address } from './address'
import type { Address } from './user/address'
export interface CustomerData {
companyName: string

View File

@@ -20,7 +20,7 @@
<script setup lang="ts">
// import { useRoute } from 'vue-router';
import Default from '@/layouts/default.vue';
import { useCategoryStore } from '@/stores/category';
import { useCategoryStore } from '@/stores/admin/category';
import { ref, watch } from 'vue';
import { useRoute } from 'vue-router';
// const route = useRoute()

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, defineAsyncComponent, ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import { useValidation } from '@/composable/useValidation'
import type { FormError } from '@nuxt/ui'
import { i18n } from '@/plugins/02_i18n'

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import { useValidation } from '@/composable/useValidation'
import type { FormError } from '@nuxt/ui'
import { i18n } from '@/plugins/02_i18n'

View File

@@ -117,7 +117,7 @@
<script setup lang="ts">
import { ref, computed, defineAsyncComponent } from 'vue'
import { useRouter } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import { useValidation } from '@/composable/useValidation'
import type { FormError } from '@nuxt/ui'
import { useI18n } from 'vue-i18n'

View File

@@ -11,7 +11,7 @@ import {
LinearScale,
} from 'chart.js'
import { getYears, getQuarters, getIssues, type QuarterData, type IssueTimeSummary } from '@/composable/useRepoApi'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import { i18n } from '@/plugins/02_i18n'
import type { TableColumn } from '@nuxt/ui'
import { useI18n } from 'vue-i18n'

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import { useAuthStore } from '@/stores/user/auth'
import { useValidation } from '@/composable/useValidation'
import type { FormError } from '@nuxt/ui'
import { i18n } from '@/plugins/02_i18n'