Fix PWA registration, font loading, and Safari slider interactions.
Configure module service worker registration, remove duplicate SW hook, correct IRANSans Black font path, and improve touch slider handling in trade and wallet forms. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -92,7 +92,6 @@
|
||||
<script lang="ts" setup>
|
||||
import pkg from '../package.json'
|
||||
import { getDisplayAppVersion } from '@/config/config-cache'
|
||||
import {useRegisterSW} from 'virtual:pwa-register/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'
|
||||
@@ -127,7 +126,6 @@ const showDesktopFloatingCredit = computed(() => {
|
||||
return route.name === 'login' || !!route.meta.hideMenu
|
||||
})
|
||||
|
||||
useRegisterSW()
|
||||
const displayVersion = getDisplayAppVersion(pkg.version)
|
||||
const config = useConfigStore()
|
||||
const splashIndicator = computed(() => h(LoadingOutlined, {
|
||||
|
||||
@@ -156,11 +156,26 @@
|
||||
//}
|
||||
|
||||
/* =================== Slider =================== */
|
||||
.app-touch-slider {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
touch-action: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
padding-block: 0.375rem;
|
||||
}
|
||||
|
||||
.ant-slider {
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.ant-slider-track {
|
||||
background-color: @App-primary-color !important;
|
||||
}
|
||||
.ant-slider-handle {
|
||||
border-color: @App-primary-color !important;
|
||||
touch-action: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
/* =================== Menu =================== */
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
|
||||
@font-face {
|
||||
font-family: @prefixCls-font-family;
|
||||
src: url("../fonts/iranSans/woff2/IRANSansWeb(FaNum)_Bold.woff2") format("woff");
|
||||
src: url("../fonts/iranSans/woff2/IRANSansWeb(FaNum)_Bold.woff2") format("woff2");
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: @prefixCls-font-family;
|
||||
src: url("../fonts/iranSans/woff2/IRANSansWeb(FaNum)_primary.woff2") format("woff");
|
||||
src: url("../fonts/iranSans/woff2/IRANSansWeb(FaNum)_Black.woff2") format("woff2");
|
||||
font-weight: 900;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ import img_pattern from "@/assets/img/dollar_pattern.svg";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex absolute w-full top-0 right-0 left-0 bottom-0">
|
||||
<img :src="img_right" alt="" class=" absolute z-5 w-screen h-full object-cover">
|
||||
<img :src="img_pattern" alt="" class=" w-full object-cover">
|
||||
<div class="bg-main-decor flex absolute w-full top-0 right-0 left-0 bottom-0 pointer-events-none">
|
||||
<img :src="img_right" alt="" class="absolute z-5 w-screen h-full object-cover">
|
||||
<img :src="img_pattern" alt="" class="w-full object-cover">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -69,14 +69,21 @@
|
||||
<Transition mode="out-in" name="fade">
|
||||
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3 ">
|
||||
<!-- {{ isBuy }}-->
|
||||
<a-slider v-model:value="form.percentWallet"
|
||||
:disabled="isBuy? cashWalletBalance <= 0: false"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="null"
|
||||
class="!my-1"
|
||||
@change="percentChange" />
|
||||
<div
|
||||
class="app-touch-slider"
|
||||
@touchstart.stop
|
||||
@touchmove.stop
|
||||
@pointerdown.stop
|
||||
>
|
||||
<a-slider v-model:value="form.percentWallet"
|
||||
:disabled="isBuy? cashWalletBalance <= 0: false"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="null"
|
||||
class="!my-1"
|
||||
@change="percentChange" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
</Transition>
|
||||
<!-- <Transition mode="out-in" name="fade">
|
||||
@@ -444,7 +451,7 @@ onMounted(async () => {
|
||||
const form = ref<Gold>({
|
||||
goldCash: undefined,
|
||||
goldValue: undefined,
|
||||
percentWallet: undefined
|
||||
percentWallet: 0,
|
||||
})
|
||||
const allowedAsciiCodeFloat = [46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57]
|
||||
const allowedAsciiCodeInt = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57]
|
||||
@@ -683,7 +690,7 @@ async function ok() {
|
||||
form.value = {
|
||||
goldValue: undefined,
|
||||
goldCash: undefined,
|
||||
percentWallet: undefined,
|
||||
percentWallet: 0,
|
||||
method: 'cash'
|
||||
}
|
||||
await fundStore.getMyFund()
|
||||
|
||||
@@ -92,14 +92,21 @@
|
||||
<Transition mode="out-in" name="fade">
|
||||
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3 ">
|
||||
<!-- {{ isBuy }}-->
|
||||
<a-slider v-model:value="form.percentWallet"
|
||||
:disabled="isBuy? cashWalletBalance <= 0: false"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="null"
|
||||
class="!my-1"
|
||||
@change="percentChange" />
|
||||
<div
|
||||
class="app-touch-slider"
|
||||
@touchstart.stop
|
||||
@touchmove.stop
|
||||
@pointerdown.stop
|
||||
>
|
||||
<a-slider v-model:value="form.percentWallet"
|
||||
:disabled="isBuy? cashWalletBalance <= 0: false"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="null"
|
||||
class="!my-1"
|
||||
@change="percentChange" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
</Transition>
|
||||
</div>
|
||||
@@ -608,7 +615,7 @@ onMounted(async () => {
|
||||
const form = ref<Gold>({
|
||||
goldCash: undefined,
|
||||
goldValue: undefined,
|
||||
percentWallet: undefined
|
||||
percentWallet: 0,
|
||||
})
|
||||
const allowedAsciiCodeFloat = [46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57]
|
||||
const allowedAsciiCodeInt = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57]
|
||||
@@ -811,7 +818,7 @@ async function ok() {
|
||||
form.value = {
|
||||
goldValue: undefined,
|
||||
goldCash: undefined,
|
||||
percentWallet: undefined
|
||||
percentWallet: 0,
|
||||
}
|
||||
inputLock.value = null
|
||||
message.success('سفارش شما با موفقیت انجام شد')
|
||||
|
||||
@@ -62,15 +62,22 @@
|
||||
{{ formatCashWalletBalanceText(usePriceWithoutType(walletStore?.walletInfo?.cash ?? 0)) }}
|
||||
</p>
|
||||
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3">
|
||||
<a-slider
|
||||
v-model:value="form.percentWallet"
|
||||
:disabled="walletStore?.walletInfo?.cash <= 0"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="formatter"
|
||||
@change="percentChange"
|
||||
/>
|
||||
<div
|
||||
class="app-touch-slider"
|
||||
@touchstart.stop
|
||||
@touchmove.stop
|
||||
@pointerdown.stop
|
||||
>
|
||||
<a-slider
|
||||
v-model:value="form.percentWallet"
|
||||
:disabled="walletStore?.walletInfo?.cash <= 0"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="formatter"
|
||||
@change="percentChange"
|
||||
/>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div v-else key="deposit" class="dwallet-form__extras">
|
||||
|
||||
@@ -66,15 +66,22 @@
|
||||
{{ formatCashWalletBalanceText(usePriceWithoutType(walletStore?.walletInfo?.cash ?? 0)) }}
|
||||
</div>
|
||||
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3">
|
||||
<a-slider
|
||||
v-model:value="form.percentWallet"
|
||||
:disabled="walletStore?.walletInfo?.cash <= 0"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="formatter"
|
||||
@change="percentChange"
|
||||
/>
|
||||
<div
|
||||
class="app-touch-slider"
|
||||
@touchstart.stop
|
||||
@touchmove.stop
|
||||
@pointerdown.stop
|
||||
>
|
||||
<a-slider
|
||||
v-model:value="form.percentWallet"
|
||||
:disabled="walletStore?.walletInfo?.cash <= 0"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
:tip-formatter="formatter"
|
||||
@change="percentChange"
|
||||
/>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div v-else class="mt-3">
|
||||
|
||||
Reference in New Issue
Block a user