schon/storefront/src/App.vue
Alexandr SaVBaD Waltz 2d363e1740 Features: 1) Introduce new components including ui-counter, ui-link, base-auth, and base-header-catalogue with scoped styles; 2) Add useProductTags composable and integrate GraphQL queries for product tagging; 3) Build standalone pages for cart and wishlist with basic templates; 4) Integrate vue3-marquee-slider, swiper, and primeicons dependencies for enhanced UI interactions; 5) Add skeleton loaders for language switcher and counter components; 6) Localize the app with support for it-it, de-de, ja-jp, da-dk, fr-fr, and nl-nl locales;
Fixes: 1) Refactor `useProducts` and `useCategorybySlug` composables for improved error handling and lazy loading; 2) Correct import path in `product-page.vue` for `useProductBySlug`; 3) Update `useLanguages` composable to set current locale from local storage; 4) Remove unused `auth.js`, `base-header.vue`, and deprecated GraphQL fragments;

Extra: Minor styling adjustments and removal of redundant console logs; Updated `package-lock.json` dependencies for version consistency.
2025-05-31 17:43:33 +03:00

65 lines
1.9 KiB
Vue

<script setup>
import { RouterView } from 'vue-router'
import {computed, onMounted} from "vue";
import {useRefresh} from "@/composables/auth";
import {useCompanyInfo} from "@/composables/company";
import {useLanguages} from "@/composables/languages/index.js";
import BaseHeader from "@/components/base/header/base-header.vue";
import BaseFooter from "@/components/base/base-footer.vue";
import BaseAuth from "@/components/base/base-auth.vue";
import LoginForm from "@/components/forms/login-form.vue";
import RegisterForm from "@/components/forms/register-form.vue";
import NewPasswordForm from "@/components/forms/new-password-form.vue";
import ResetPasswordForm from "@/components/forms/reset-password-form.vue";
import {useAppStore} from "@/stores/app.js";
const appStore = useAppStore()
const activeState = computed(() => appStore.activeState)
const { refresh } = useRefresh();
const { getCompanyInfo } = useCompanyInfo();
const { getLanguages } = useLanguages();
onMounted(async () => {
await refresh()
await getCompanyInfo()
await getLanguages()
setInterval(async () => {
await refresh()
}, 600000)
})
</script>
<template>
<main class="main" id="top">
<base-header />
<Transition name="opacity" mode="out-in">
<base-auth v-if="activeState">
<login-form v-if="activeState === 'login'" />
<register-form v-if="activeState === 'register'" />
<reset-password-form v-if="activeState === 'reset-password'" />
<new-password-form v-if="activeState === 'new-password'" />
</base-auth>
</Transition>
<RouterView v-slot="{ Component }">
<Transition name="opacity" mode="out-in">
<component :is="Component" />
</Transition>
</RouterView>
<base-footer />
</main>
</template>
<style scoped>
.main {
padding-top: 90px;
background-color: #f7f7f7;
}
:deep(.el-skeleton__item) {
--el-skeleton-color: #d0d2d3 !important;
--el-skeleton-to-color: #b4b4b7 !important;
}
</style>