2026-01-18 13:01:46 +03:30
|
|
|
<template>
|
|
|
|
|
<div class="desktopConfig w-full right-0 left-0 absolute">
|
|
|
|
|
<div v-if="popVisible" class="top-0 bottom-0 wrap-fix bg-primary z-100 opacity-60">
|
|
|
|
|
<div class="absolute right-0 left-0 bottom-10vh flex flex-col items-center">
|
2026-01-21 19:38:50 +03:30
|
|
|
<div>
|
|
|
|
|
<BasicButton>درباره ما</BasicButton>
|
|
|
|
|
</div>
|
2026-01-18 13:01:46 +03:30
|
|
|
<div></div>
|
|
|
|
|
<div></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-10 13:02:44 +03:30
|
|
|
<AConfigProvider :theme="antTheme ?? undefined" direction="rtl">
|
2026-01-21 19:38:50 +03:30
|
|
|
<transition mode="out-in" name="fade">
|
2026-01-18 13:01:46 +03:30
|
|
|
|
2026-01-21 19:38:50 +03:30
|
|
|
<div v-if="!showSplash">
|
|
|
|
|
<router-view v-slot="{ Component, route }">
|
2026-05-10 13:02:44 +03:30
|
|
|
<transition :name="(route.meta.transition as string | undefined) || 'fade'">
|
2026-01-18 13:01:46 +03:30
|
|
|
|
2026-01-21 19:38:50 +03:30
|
|
|
<div>
|
|
|
|
|
<component :is="Component"/>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</router-view>
|
2026-01-18 13:01:46 +03:30
|
|
|
|
|
|
|
|
</div>
|
2026-05-31 16:27:59 +03:30
|
|
|
<div
|
|
|
|
|
v-else
|
|
|
|
|
class="flex bottom-0 wrap-fix top-0 z-1000000000000 justify-center"
|
|
|
|
|
:style="{ backgroundColor: getProjectSplashBackground() }"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="!isBoursecuProject()">
|
|
|
|
|
<div class="top-0 wrap-fix h-1/3 w-screen flex">
|
|
|
|
|
<img :src="img_topGradiant" alt="" class="absolute z-10 w-screen h-full object-cover"/>
|
|
|
|
|
<img :src="img_pattern" alt="" class="absolute w-screen h-full object-none"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap-fix bottom-0 h-1/3 w-screen">
|
|
|
|
|
<img
|
|
|
|
|
:src="img_bottomGradiant"
|
|
|
|
|
alt=""
|
|
|
|
|
class="absolute z-10 w-screen h-full object-cover"
|
|
|
|
|
/>
|
|
|
|
|
<img :src="img_pattern" alt="" class="absolute w-screen h-full object-none"/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2026-01-21 19:38:50 +03:30
|
|
|
<div class="self-center splash_appear_fade_in">
|
2026-05-31 16:27:59 +03:30
|
|
|
<img
|
|
|
|
|
:src="getProjectLoginLogo(config?.config?.avatar)"
|
2026-06-11 13:19:16 +03:30
|
|
|
:class="hasCustomLoginLogoLayout()
|
2026-05-31 16:27:59 +03:30
|
|
|
? 'w-[80vw] max-w-[320px] h-auto object-contain'
|
|
|
|
|
: 'h-[20vh] object-contain'"
|
|
|
|
|
>
|
2026-01-21 19:38:50 +03:30
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="fixed w-full bottom-5 home_appear_fade_in_up">
|
2026-05-31 16:27:59 +03:30
|
|
|
<div
|
|
|
|
|
class="text-center text-xs"
|
|
|
|
|
:class="isBoursecuProject() ? 'text-white' : ''"
|
|
|
|
|
>
|
|
|
|
|
نسخه: {{ pkg.version }}
|
|
|
|
|
</div>
|
2026-01-21 19:38:50 +03:30
|
|
|
</div>
|
|
|
|
|
<div class="absolute bottom-10">
|
2026-05-31 16:27:59 +03:30
|
|
|
<a-spin :indicator="splashIndicator" size="small"/>
|
2026-01-21 19:38:50 +03:30
|
|
|
</div>
|
2026-01-18 13:01:46 +03:30
|
|
|
</div>
|
2026-01-21 19:38:50 +03:30
|
|
|
</transition>
|
|
|
|
|
</AConfigProvider>
|
2026-01-18 13:01:46 +03:30
|
|
|
<van-dialog
|
2026-01-21 19:38:50 +03:30
|
|
|
v-model:show="versionDialog"
|
|
|
|
|
class="updateButton"
|
2026-05-30 12:08:18 +03:30
|
|
|
teleport="body"
|
|
|
|
|
:z-index="5300"
|
2026-01-21 19:38:50 +03:30
|
|
|
confirm-button-text="به روزرسانی کنید"
|
|
|
|
|
show-confirm-button
|
|
|
|
|
@confirm="update()"
|
2026-01-18 13:01:46 +03:30
|
|
|
>
|
|
|
|
|
<div class="flex flex-col items-center p-2">
|
|
|
|
|
<DotLottieVue
|
2026-01-21 19:38:50 +03:30
|
|
|
class="w-full aspect-square"
|
|
|
|
|
autoplay
|
|
|
|
|
loop
|
|
|
|
|
src="https://lottie.host/cb620e8e-c64a-42e8-a6b5-8844146e5999/nmft7oBO8q.json"
|
2026-01-18 13:01:46 +03:30
|
|
|
/>
|
2026-01-25 13:47:05 +03:30
|
|
|
<div class="home_appear_fade_in_up mt-2">نسخه جدید منتشر شد!</div>
|
2026-01-18 13:01:46 +03:30
|
|
|
</div>
|
|
|
|
|
</van-dialog>
|
2026-06-13 13:52:47 +03:30
|
|
|
<div
|
|
|
|
|
v-if="showSupportButton && !showSplash"
|
|
|
|
|
id="support-button"
|
|
|
|
|
class="draggable-support-button"
|
|
|
|
|
:class="{ 'is-dragging': supportDragging }"
|
|
|
|
|
:style="supportButtonStyle"
|
2026-06-13 22:19:01 +03:30
|
|
|
title="پشتیبانی"
|
2026-06-13 13:52:47 +03:30
|
|
|
@pointerdown="onSupportPointerDown"
|
|
|
|
|
@pointermove="onSupportPointerMove"
|
|
|
|
|
@pointerup="handleSupportPointerUp"
|
|
|
|
|
@pointercancel="onSupportPointerCancel"
|
|
|
|
|
>
|
2026-06-13 22:19:01 +03:30
|
|
|
<div class="support-button-inner" :style="{ '--support-accent': supportAccentColor }">
|
|
|
|
|
<BasicIcon :icon="supportIcon" size="18" class="support-button-icon" />
|
|
|
|
|
<span class="support-button-label">پشتیبانی</span>
|
2026-04-26 18:39:00 +03:30
|
|
|
</div>
|
2026-06-13 13:52:47 +03:30
|
|
|
</div>
|
2026-04-29 09:49:44 +03:30
|
|
|
</div>
|
|
|
|
|
<div
|
2026-05-13 14:59:46 +03:30
|
|
|
v-if="!showSplash"
|
2026-05-23 16:34:15 +03:30
|
|
|
class="app-credit-footer flex bg-white justify-center text-[9px]"
|
2026-04-29 09:49:44 +03:30
|
|
|
>
|
|
|
|
|
<a
|
|
|
|
|
href="https://montzar.ir"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
|
class="flex items-center gap-1 text-inherit no-underline"
|
|
|
|
|
>
|
|
|
|
|
<div class="flex justify-center py-1 items-center">
|
|
|
|
|
<div>توسعه و طراحی توسط</div>
|
|
|
|
|
<img src="/logo-montzar.png" alt="" class="h-3" />
|
|
|
|
|
</div>
|
2026-02-18 18:20:03 +03:30
|
|
|
</a>
|
2026-01-18 13:01:46 +03:30
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import pkg from '../package.json'
|
2026-01-21 19:38:50 +03:30
|
|
|
import {useRegisterSW} from 'virtual:pwa-register/vue'
|
|
|
|
|
import {computed, h, onMounted, ref} from 'vue'
|
2026-01-18 13:01:46 +03:30
|
|
|
import img_topGradiant from '@/views/login/assets/img/gr_top_white.svg'
|
|
|
|
|
import img_pattern from '@/views/login/assets/img/pattern.svg'
|
2026-01-21 19:38:50 +03:30
|
|
|
import {LoadingOutlined} from '@ant-design/icons-vue'
|
2026-01-18 13:01:46 +03:30
|
|
|
import img_bottomGradiant from '@/views/login/assets/img/gr_bottom_white.svg'
|
2026-01-21 19:38:50 +03:30
|
|
|
import {DotLottieVue} from '@lottiefiles/dotlottie-vue'
|
2026-01-18 13:01:46 +03:30
|
|
|
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
|
|
|
|
import {useConfigStore} from "@/store/configStore";
|
2026-06-11 13:19:16 +03:30
|
|
|
import {getProjectFontFamily, getProjectLoginLogo, getProjectSplashBackground, getProjectBrandRed, hasCustomLoginLogoLayout, isBoursecuProject} from "@/utils/config";
|
2026-04-26 18:39:00 +03:30
|
|
|
import {ConfigProvider as AConfigProvider} from 'ant-design-vue'
|
|
|
|
|
import BasicIcon from "@/components/BasicPacks/BasicIcon.vue";
|
2026-06-13 13:52:47 +03:30
|
|
|
import {
|
|
|
|
|
buildSupportMessengerUrl,
|
|
|
|
|
loadSupportMessengerFromSettings,
|
|
|
|
|
supportMessengerSettings,
|
|
|
|
|
} from '@/utils/supportMessenger'
|
|
|
|
|
import {useDraggableFloatingButton} from '@/utils/useDraggableFloatingButton'
|
2026-01-18 13:01:46 +03:30
|
|
|
|
2026-01-21 19:38:50 +03:30
|
|
|
const {offlineReady, needRefresh, updateServiceWorker} = useRegisterSW()
|
|
|
|
|
const config = useConfigStore()
|
2026-05-31 16:27:59 +03:30
|
|
|
const splashIndicator = computed(() => h(LoadingOutlined, {
|
2026-01-18 13:01:46 +03:30
|
|
|
style: {
|
2026-05-31 16:27:59 +03:30
|
|
|
fontSize: '24px',
|
|
|
|
|
color: isBoursecuProject() ? '#ffffff' : undefined,
|
2026-01-18 13:01:46 +03:30
|
|
|
},
|
|
|
|
|
spin: true
|
2026-05-31 16:27:59 +03:30
|
|
|
}))
|
2026-01-18 13:01:46 +03:30
|
|
|
const showSplash = ref(true)
|
2026-05-10 13:02:44 +03:30
|
|
|
const popVisible = ref(false)
|
2026-01-21 19:38:50 +03:30
|
|
|
|
2026-06-13 13:52:47 +03:30
|
|
|
const GAROOSI_SUPPORT_URL = 'https://ble.ir/garoosigallery'
|
|
|
|
|
|
|
|
|
|
const supportLink = computed(() => {
|
|
|
|
|
if (config.config?.name === 'garoosi') {
|
|
|
|
|
return GAROOSI_SUPPORT_URL
|
|
|
|
|
}
|
|
|
|
|
return buildSupportMessengerUrl(
|
|
|
|
|
supportMessengerSettings.value.messenger,
|
|
|
|
|
supportMessengerSettings.value.messengerId
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const showSupportButton = computed(() => !!supportLink.value)
|
|
|
|
|
|
2026-06-13 22:19:01 +03:30
|
|
|
const supportIcon = computed(() => {
|
|
|
|
|
const messenger = (supportMessengerSettings.value.messenger ?? '').toLowerCase()
|
|
|
|
|
switch (messenger) {
|
|
|
|
|
case 'whatsapp':
|
|
|
|
|
return 'vuesax-linear:whatsapp'
|
|
|
|
|
case 'telegram':
|
|
|
|
|
return 'vuesax-linear:send-2'
|
|
|
|
|
case 'bale':
|
|
|
|
|
return 'vuesax-linear:messages-2'
|
|
|
|
|
default:
|
|
|
|
|
return 'vuesax-linear:messages-2'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const supportAccentColor = computed(() => {
|
|
|
|
|
const messenger = (supportMessengerSettings.value.messenger ?? '').toLowerCase()
|
|
|
|
|
switch (messenger) {
|
|
|
|
|
case 'whatsapp':
|
|
|
|
|
return '#22c55e'
|
|
|
|
|
case 'telegram':
|
|
|
|
|
return '#0ea5e9'
|
|
|
|
|
case 'bale':
|
|
|
|
|
return '#16a34a'
|
|
|
|
|
case 'rubika':
|
|
|
|
|
return '#7c3aed'
|
|
|
|
|
case 'eitaa':
|
|
|
|
|
return '#f59e0b'
|
|
|
|
|
case 'soroush':
|
|
|
|
|
return '#2563eb'
|
|
|
|
|
default:
|
|
|
|
|
return config.config?.color || '#334155'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2026-06-13 13:52:47 +03:30
|
|
|
const {
|
|
|
|
|
dragging: supportDragging,
|
|
|
|
|
fabStyle: supportButtonStyle,
|
|
|
|
|
handlePointerDown: onSupportPointerDown,
|
|
|
|
|
handlePointerMove: onSupportPointerMove,
|
|
|
|
|
handlePointerUp: supportPointerUp,
|
|
|
|
|
handlePointerCancel: onSupportPointerCancel
|
|
|
|
|
} = useDraggableFloatingButton('khaneghi_support_button_position', {
|
2026-06-13 22:19:01 +03:30
|
|
|
width: 118,
|
|
|
|
|
height: 42,
|
2026-06-13 13:52:47 +03:30
|
|
|
defaultBottomOffset: 120
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function openSupportLink() {
|
|
|
|
|
if (!supportLink.value) return
|
|
|
|
|
window.open(supportLink.value, '_blank', 'noopener,noreferrer')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleSupportPointerUp(event: PointerEvent) {
|
|
|
|
|
if (supportPointerUp(event)) {
|
|
|
|
|
openSupportLink()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-21 19:38:50 +03:30
|
|
|
const antTheme = computed(() => {
|
|
|
|
|
if (!config.config?.color) return null
|
|
|
|
|
|
2026-06-01 09:48:39 +03:30
|
|
|
const brandRed = getProjectBrandRed()
|
|
|
|
|
|
2026-01-21 19:38:50 +03:30
|
|
|
return {
|
|
|
|
|
token: {
|
2026-06-01 09:48:39 +03:30
|
|
|
colorPrimary: config.config.color,
|
2026-01-21 19:38:50 +03:30
|
|
|
colorLink: config.config.color,
|
|
|
|
|
colorLinkActive: config.config.color,
|
|
|
|
|
colorLinkHover: config.config.color,
|
2026-05-31 16:27:59 +03:30
|
|
|
fontFamily: getProjectFontFamily(),
|
2026-06-01 09:48:39 +03:30
|
|
|
...(brandRed ? {
|
|
|
|
|
colorError: brandRed,
|
|
|
|
|
colorErrorHover: brandRed,
|
|
|
|
|
colorErrorActive: brandRed,
|
|
|
|
|
colorErrorBg: '#f8ecec',
|
|
|
|
|
colorErrorBorder: '#f0d8d8',
|
|
|
|
|
} : {}),
|
2026-01-21 19:38:50 +03:30
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
})
|
2026-05-10 13:02:44 +03:30
|
|
|
|
2026-01-18 13:01:46 +03:30
|
|
|
onMounted(async () => {
|
2026-01-21 19:38:50 +03:30
|
|
|
await config.getConfigData()
|
2026-06-13 13:52:47 +03:30
|
|
|
await loadSupportMessengerFromSettings()
|
2026-02-07 14:45:13 +03:30
|
|
|
console.log(config?.config?.color)
|
2026-01-18 13:01:46 +03:30
|
|
|
checkVersion()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
showSplash.value = false
|
|
|
|
|
}, 2000)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const versionDialog = ref<boolean>(false)
|
|
|
|
|
|
|
|
|
|
function checkVersion() {
|
|
|
|
|
const version = localStorage.getItem('version')
|
|
|
|
|
// if (true) {
|
2026-01-21 19:38:50 +03:30
|
|
|
if (!version) {
|
2026-01-18 13:01:46 +03:30
|
|
|
update()
|
|
|
|
|
}
|
|
|
|
|
if (version != pkg.version) {
|
|
|
|
|
versionDialog.value = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function update() {
|
|
|
|
|
localStorage.setItem('version', pkg.version)
|
|
|
|
|
updateServiceWorker()
|
|
|
|
|
window.location.reload()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
2026-05-13 14:59:46 +03:30
|
|
|
/* ارتفاع نوار اعتبار + safe-area؛ منوی پایین با bottom: var(--app-credit-footer-offset) بالاتر از این نوار مینشیند */
|
|
|
|
|
:root {
|
|
|
|
|
--app-credit-bar-inner: 28px;
|
|
|
|
|
--app-safe-bottom: env(safe-area-inset-bottom, 0px);
|
|
|
|
|
--app-credit-footer-offset: calc(var(--app-credit-bar-inner) + var(--app-safe-bottom));
|
2026-05-23 16:34:15 +03:30
|
|
|
--app-nav-height: 80px;
|
|
|
|
|
--app-bottom-chrome-height: calc(var(--app-nav-height) + var(--app-credit-footer-offset));
|
|
|
|
|
--app-add-card-height: 88px;
|
2026-05-30 12:08:18 +03:30
|
|
|
/* بخشی از کارت کیفپول زیر نوار «افزودن کارت جدید» دیده میشود */
|
|
|
|
|
--wallet-card-dock-overlap: 52px;
|
|
|
|
|
--app-z-nav: 5000;
|
|
|
|
|
--app-z-wallet-dock: 4490;
|
|
|
|
|
--app-z-wallet-add-bar: 4510;
|
|
|
|
|
--app-z-action-sheet: 5200;
|
|
|
|
|
--app-z-dialog: 5300;
|
2026-05-13 14:59:46 +03:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-credit-footer {
|
2026-05-23 16:34:15 +03:30
|
|
|
position: fixed;
|
2026-05-13 14:59:46 +03:30
|
|
|
bottom: 0;
|
2026-05-23 16:34:15 +03:30
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
max-width: 426px;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
margin-right: auto;
|
|
|
|
|
z-index: 1000000;
|
2026-05-13 14:59:46 +03:30
|
|
|
min-height: var(--app-credit-bar-inner);
|
|
|
|
|
padding-bottom: var(--app-safe-bottom);
|
|
|
|
|
box-sizing: content-box;
|
2026-05-23 13:27:30 +03:30
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 -2px 4px -2px #0000001a;
|
2026-05-13 14:59:46 +03:30
|
|
|
}
|
|
|
|
|
|
2026-01-18 13:01:46 +03:30
|
|
|
.updateButton .van-dialog__confirm .van-button__text {
|
2026-01-21 19:38:50 +03:30
|
|
|
color: @App-primary-color !important;
|
2026-01-18 13:01:46 +03:30
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-18 18:20:03 +03:30
|
|
|
#support-button {
|
|
|
|
|
position: fixed;
|
|
|
|
|
z-index: 9999;
|
2026-06-13 13:52:47 +03:30
|
|
|
cursor: grab;
|
|
|
|
|
user-select: none;
|
2026-06-13 22:19:01 +03:30
|
|
|
border-radius: 9999px;
|
2026-06-13 13:52:47 +03:30
|
|
|
|
|
|
|
|
&.is-dragging {
|
|
|
|
|
cursor: grabbing;
|
2026-06-13 22:19:01 +03:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.support-button-inner {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 9px 14px 9px 12px;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
border: 1px solid rgba(15, 23, 42, 0.08);
|
|
|
|
|
border-radius: 9999px;
|
|
|
|
|
box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
|
|
|
|
|
color: #1e293b;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
direction: rtl;
|
|
|
|
|
transition: box-shadow 0.2s ease, transform 0.2s ease;
|
|
|
|
|
|
|
|
|
|
.support-button-icon {
|
|
|
|
|
color: var(--support-accent, #334155);
|
|
|
|
|
flex-shrink: 0;
|
2026-06-13 13:52:47 +03:30
|
|
|
}
|
|
|
|
|
|
2026-06-13 22:19:01 +03:30
|
|
|
.support-button-label {
|
|
|
|
|
white-space: nowrap;
|
2026-06-13 13:52:47 +03:30
|
|
|
}
|
2026-02-18 18:20:03 +03:30
|
|
|
}
|
|
|
|
|
|
2026-06-13 22:19:01 +03:30
|
|
|
#support-button:not(.is-dragging):hover .support-button-inner {
|
|
|
|
|
transform: translateY(-1px);
|
|
|
|
|
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#support-button.is-dragging .support-button-inner {
|
|
|
|
|
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-18 13:01:46 +03:30
|
|
|
@media screen and (min-width: 426px) {
|
|
|
|
|
.desktopConfig {
|
|
|
|
|
width: 426px;
|
|
|
|
|
position: relative !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|