2026-09-09 06:46:27 +03:30
|
|
|
<!--
|
|
|
|
|
Ported from legacy henza_pwa/src/App.vue — layout switching, RTL shell, and
|
2026-10-10 12:44:24 +03:30
|
|
|
and the update gate (components/AppUpdateGate.vue).
|
2026-09-09 06:46:27 +03:30
|
|
|
|
|
|
|
|
Not ported (deliberate): Firebase push init and WebOTP autofill. Both were
|
|
|
|
|
already commented out in legacy's own App.vue, so neither ran there either.
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<component :is="getLayout" class="relative">
|
|
|
|
|
<router-view v-slot="{ Component, route }">
|
|
|
|
|
<keep-alive>
|
|
|
|
|
<suspense>
|
|
|
|
|
<template #default>
|
|
|
|
|
<component :is="Component" :key="route.name" />
|
|
|
|
|
</template>
|
|
|
|
|
</suspense>
|
|
|
|
|
</keep-alive>
|
|
|
|
|
</router-view>
|
|
|
|
|
</component>
|
|
|
|
|
|
2026-10-10 12:44:24 +03:30
|
|
|
<AppUpdateGate />
|
2026-10-04 13:57:25 +03:30
|
|
|
|
2026-10-04 16:18:56 +03:30
|
|
|
<ProductMorph />
|
2026-10-04 13:57:25 +03:30
|
|
|
<ToastHost />
|
2026-09-09 06:46:27 +03:30
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-10-10 12:44:24 +03:30
|
|
|
import { computed } from 'vue'
|
2026-09-09 06:46:27 +03:30
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
import { useRegisterSW } from 'virtual:pwa-register/vue'
|
|
|
|
|
import MasterLayout from './layout/MasterLayout.vue'
|
|
|
|
|
import FullPageLayout from './layout/FullPageLayout.vue'
|
2026-10-10 12:44:24 +03:30
|
|
|
import AppUpdateGate from './components/AppUpdateGate.vue'
|
2026-10-04 13:57:25 +03:30
|
|
|
import ToastHost from './components/ui/ToastHost.vue'
|
2026-10-04 16:18:56 +03:30
|
|
|
import ProductMorph from './components/product/ProductMorph.vue'
|
2026-09-09 06:46:27 +03:30
|
|
|
|
|
|
|
|
const router = useRouter()
|
2026-10-10 12:44:24 +03:30
|
|
|
// Registers the service worker (offline, install). Updates are not applied
|
|
|
|
|
// here: AppUpdateGate shows what changed and applies them on the user's tap.
|
|
|
|
|
useRegisterSW()
|
2026-09-09 06:46:27 +03:30
|
|
|
|
|
|
|
|
const getLayout = computed(() => {
|
|
|
|
|
if (router.currentRoute.value.meta && router.currentRoute.value.meta.layout === 'FullPage') {
|
|
|
|
|
return FullPageLayout
|
|
|
|
|
}
|
|
|
|
|
return MasterLayout
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
body::-webkit-scrollbar {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#app {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
direction: rtl !important;
|
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
|
text-align: start;
|
|
|
|
|
color: @primary;
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
-ms-user-select: none;
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slideDown-enter-active,
|
|
|
|
|
.slideDown-leave-active {
|
|
|
|
|
transition: all @transition-duration ease;
|
|
|
|
|
}
|
|
|
|
|
.slideDown-enter-from {
|
|
|
|
|
transform: translateY(-100vh);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slideDown-leave-to {
|
|
|
|
|
transform: translateY(100vh);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slideDown-leave-from {
|
|
|
|
|
transform: translateY(0);
|
|
|
|
|
}
|
|
|
|
|
.slideDown-enter-to {
|
|
|
|
|
transform: translateY(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fade-down-enter-active,
|
|
|
|
|
.fade-down-leave-active {
|
|
|
|
|
transition: all @transition-duration ease;
|
|
|
|
|
}
|
|
|
|
|
</style>
|