.
This commit is contained in:
@@ -117,14 +117,31 @@
|
||||
ورود با اثر انگشت
|
||||
</div>
|
||||
</BasicButton>
|
||||
<div v-if="config.config.name === 'garoosi'" class="flex w-full gap-2 mb-2 mt-2">
|
||||
<a
|
||||
:href="apkDownloadUrl"
|
||||
class="flex w-full items-center justify-center rounded py-2 text-white bg-primary border-none cursor-pointer no-underline"
|
||||
download="Garoosi.apk"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<div>دانلود اپ اندروید</div>
|
||||
</a>
|
||||
<BasicButton type="primary" class="w-full" @click="installWebApp">
|
||||
<div>نصب نسخه وب اپ</div>
|
||||
</BasicButton>
|
||||
</div>
|
||||
<BasicButton v-if="config.config.name === 'garoosi'" class="w-full !font-bold" @click="goToEducate">
|
||||
<div class="flex gap-2 items-center">آموزش کار با نرم افزار</div>
|
||||
</BasicButton>
|
||||
<div class="cursor-pointer flex gap-1 justify-center mt-5 text-xs" @click="$emit('register',true)">اگر حساب کاربری ندارید
|
||||
<div class="font-bold text-primary">از این قسمت</div>
|
||||
ثبت نام کنید.
|
||||
</div>
|
||||
</a-form-item>
|
||||
<BasicButton v-if="config.config.name === 'garoosi'" class="w-full !font-bold" @click="goToEducate">
|
||||
<!-- <BasicButton v-if="config.config.name === 'garoosi'" class="w-full !font-bold" @click="goToEducate">
|
||||
<div class="flex gap-2 items-center">آموزش کار با نرم افزار</div>
|
||||
</BasicButton>
|
||||
</BasicButton>-->
|
||||
</a-form>
|
||||
|
||||
<!-- <div v-if="URLUserType() === 'single'" class="fixed bottom-5 left-0 right-0 text-center">
|
||||
@@ -132,6 +149,60 @@
|
||||
href="https://abshode.peransagold.com/">ورود
|
||||
همکار</a>
|
||||
</div>-->
|
||||
<BasicActionSheet
|
||||
v-model:show="showPWAInstallGuide"
|
||||
:showButton="false"
|
||||
@close="showPWAInstallGuide = false"
|
||||
>
|
||||
<div class="px-4 py-2">
|
||||
<h2 class="text-md font-bold text-center mb-6 text-gray-800">
|
||||
وب اپلیکیشن گروسی را به صفحه اصلی خود اضافه کنید.
|
||||
</h2>
|
||||
|
||||
<div class="space-y-6 mb-6">
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="flex-shrink-0 w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center p-2">
|
||||
<img :src="shareAppleIcon" alt="Share" class="w-full h-full object-contain"/>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<p class="text-sm text-gray-700 leading-relaxed">
|
||||
روی دکمه Share در نوار پایین کلیک کنید.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="flex-shrink-0 w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center p-2">
|
||||
<img :src="addToHomeScreenIcon" alt="Add to Home Screen" class="w-full h-full object-contain"/>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<p class="text-sm text-gray-700 leading-relaxed">
|
||||
در منوی باز شده در قسمت پایین گزینه Add to Home Screen را انتخاب کنید.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="flex-shrink-0 w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center">
|
||||
<span class="text-blue-600 font-bold text-lg">Add</span>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<p class="text-sm text-gray-700 leading-relaxed">
|
||||
در مرحله آخر در قسمت بالا روی Add کلیک کنید.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<BasicButton
|
||||
class="w-full buttonLogin mt-4"
|
||||
type="primary"
|
||||
@click="proceedWithInstall"
|
||||
>
|
||||
متوجه شدم
|
||||
</BasicButton>
|
||||
</div>
|
||||
</BasicActionSheet>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -142,7 +213,7 @@ import { mobileValidation, required } from '@/utils/inputRules'
|
||||
import BasicInput from '@/components/BasicPacks/BasicInput.vue'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import { authenticateWithFingerprint, getToken, loading, removeToken, setToken, URLUserType } from '@/utils'
|
||||
import { reactive, ref } from 'vue'
|
||||
import {computed, reactive, ref} from 'vue'
|
||||
import OtpInput from 'vue3-otp-input'
|
||||
import type { Login } from '@/models/login'
|
||||
import type { FormInstance } from 'ant-design-vue'
|
||||
@@ -155,7 +226,10 @@ import { useUserStore } from '@/store/userStore'
|
||||
import { useWalletStore } from '@/store/walletStore'
|
||||
import { fingerPosition, setTruth } from '@/main'
|
||||
import {useConfigStore} from "@/store/configStore";
|
||||
|
||||
import BasicActionSheet from "@/components/BasicPacks/BasicActionSheet.vue";
|
||||
import {getConfig} from "@/api/config";
|
||||
import shareAppleIcon from '@/assets/img/share-apple.png'
|
||||
import addToHomeScreenIcon from '@/assets/img/Add-to-homeScreen.png'
|
||||
const config=useConfigStore()
|
||||
const { time, onFinish, reset } = useCountdownTimer('00:02:00', 'mm:ss')
|
||||
const enableSendAgainCode = ref<boolean>(false)
|
||||
@@ -301,6 +375,23 @@ const getcode=()=>{
|
||||
const goToEducate = () => {
|
||||
router.push({ name: "educate" })
|
||||
}
|
||||
|
||||
const apkDownloadUrl = computed(() => {
|
||||
const envUrl = import.meta.env.VITE_APK_URL
|
||||
if (envUrl) return envUrl
|
||||
const base = (import.meta.env.BASE_URL || '/').replace(/\/?$/, '/')
|
||||
return `${window.location.origin}${base}apk/Garoosi.apk`
|
||||
})
|
||||
|
||||
const showPWAInstallGuide = ref(false)
|
||||
async function installWebApp() {
|
||||
showPWAInstallGuide.value = true
|
||||
}
|
||||
|
||||
async function proceedWithInstall() {
|
||||
showPWAInstallGuide.value = false
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="less">
|
||||
.animate.right {
|
||||
|
||||
Reference in New Issue
Block a user