icon changed
This commit is contained in:
+8
-42
@@ -55,25 +55,6 @@
|
||||
</router-view>
|
||||
</div>
|
||||
</AConfigProvider>
|
||||
<van-dialog
|
||||
v-model:show="versionDialog"
|
||||
class="updateButton"
|
||||
teleport="body"
|
||||
:z-index="5300"
|
||||
confirm-button-text="به روزرسانی کنید"
|
||||
show-confirm-button
|
||||
@confirm="update()"
|
||||
>
|
||||
<div class="flex flex-col items-center p-2">
|
||||
<DotLottieVue
|
||||
class="w-full aspect-square"
|
||||
autoplay
|
||||
loop
|
||||
src="https://lottie.host/cb620e8e-c64a-42e8-a6b5-8844146e5999/nmft7oBO8q.json"
|
||||
/>
|
||||
<div class="home_appear_fade_in_up mt-2">نسخه جدید منتشر شد!</div>
|
||||
</div>
|
||||
</van-dialog>
|
||||
<div
|
||||
v-if="showSupportButton && !showSplash"
|
||||
id="support-button"
|
||||
@@ -104,17 +85,18 @@
|
||||
>
|
||||
<AppCreditLink variant="float" />
|
||||
</div>
|
||||
|
||||
<VersionUpdateModal />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import pkg from '../package.json'
|
||||
import {useRegisterSW} from 'virtual:pwa-register/vue'
|
||||
import {computed, h, onMounted, ref, watch} from 'vue'
|
||||
import {computed, defineAsyncComponent, h, onMounted, ref, watch} from 'vue'
|
||||
import img_topGradiant from '@/views/login/assets/img/gr_top_white.svg'
|
||||
import img_pattern from '@/views/login/assets/img/pattern.svg'
|
||||
import {LoadingOutlined} from '@ant-design/icons-vue'
|
||||
import img_bottomGradiant from '@/views/login/assets/img/gr_bottom_white.svg'
|
||||
import {DotLottieVue} from '@lottiefiles/dotlottie-vue'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import {useConfigStore} from "@/store/configStore";
|
||||
import {getProjectFontFamily, getProjectSplashBackground, getProjectSplashLogo, getProjectBrandRed, hasCustomLoginLogoLayout, isBoursecuProject, resetAppSurfaceBackground} from "@/utils/config";
|
||||
@@ -130,6 +112,10 @@ import { useDraggableFloatingButton } from '@/utils/useDraggableFloatingButton'
|
||||
import AppCreditLink from '@/components/AppCreditLink.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const VersionUpdateModal = defineAsyncComponent(
|
||||
() => import('@/modules/version/VersionUpdateModal.vue')
|
||||
)
|
||||
|
||||
useApplyDesktopLayoutClass()
|
||||
|
||||
const isDesktop = useDesktopBreakpoint()
|
||||
@@ -139,7 +125,7 @@ const showDesktopFloatingCredit = computed(() => {
|
||||
return route.name === 'login' || !!route.meta.hideMenu
|
||||
})
|
||||
|
||||
const {offlineReady, needRefresh, updateServiceWorker} = useRegisterSW()
|
||||
useRegisterSW()
|
||||
const config = useConfigStore()
|
||||
const splashIndicator = computed(() => h(LoadingOutlined, {
|
||||
style: {
|
||||
@@ -251,7 +237,6 @@ onMounted(async () => {
|
||||
await config.getConfigData()
|
||||
await loadSupportMessengerFromSettings()
|
||||
console.log(config?.config?.color)
|
||||
checkVersion()
|
||||
setTimeout(() => {
|
||||
showSplash.value = false
|
||||
}, 2000)
|
||||
@@ -263,25 +248,6 @@ watch(showSplash, (visible) => {
|
||||
}
|
||||
})
|
||||
|
||||
const versionDialog = ref<boolean>(false)
|
||||
|
||||
function checkVersion() {
|
||||
const version = localStorage.getItem('version')
|
||||
// if (true) {
|
||||
if (!version) {
|
||||
update()
|
||||
}
|
||||
if (version != pkg.version) {
|
||||
versionDialog.value = true
|
||||
}
|
||||
}
|
||||
|
||||
function update() {
|
||||
localStorage.setItem('version', pkg.version)
|
||||
updateServiceWorker()
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
Reference in New Issue
Block a user