diff --git a/src/App.vue b/src/App.vue index 3b63ebc..b1540fc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -89,13 +89,17 @@ @@ -121,6 +125,7 @@ import SupportMessengerPicker from '@/components/SupportMessengerPicker.vue' import { useDraggableFloatingButton } from '@/utils/useDraggableFloatingButton' import { useApplyDesktopLayoutClass, useDesktopBreakpoint } from '@/layouts/composables/useAppLayout' import AppCreditLink from '@/components/AppCreditLink.vue' +import EnamadBadge from '@/components/EnamadBadge.vue' import { usePwaInstall } from '@/composables/usePwaInstall' import PwaInstallGuideModal from '@/components/pwa/PwaInstallGuideModal.vue' import GoldDayCalculatorModal from '@/components/GoldDayCalculatorModal.vue' @@ -159,6 +164,7 @@ const showDesktopFloatingCredit = computed(() => { if (!isDesktop.value) return false return route.name === 'login' || !!route.meta.hideMenu }) +const isLoginRoute = computed(() => route.name === 'login') const { guideOpen, @@ -305,19 +311,34 @@ watch(latestIncomingNotification, (payload) => { margin-left: auto; margin-right: auto; min-height: var(--app-credit-bar-inner); - padding-bottom: var(--app-safe-bottom); + padding: 4px 0 var(--app-safe-bottom); background: #fff; box-shadow: 0 -2px 4px -2px #0000001a; display: flex; + flex-direction: column; justify-content: center; + align-items: center; + gap: 4px; font-size: 9px; } +.app-credit-footer--login.app-credit-footer--mobile { + min-height: 72px; +} + +:root:has(.app-credit-footer--login) { + --app-credit-bar-inner: 72px; +} + .app-credit-footer--desktop-float { left: auto; right: 20px; bottom: 16px; width: auto; + display: flex; + flex-direction: column; + align-items: center; + gap: 6px; } .app-credit-link { diff --git a/src/app/setupRouter.ts b/src/app/setupRouter.ts index 5ff9faa..108ce5a 100644 --- a/src/app/setupRouter.ts +++ b/src/app/setupRouter.ts @@ -37,7 +37,7 @@ export function setupRouterGuards() { if (to.meta?.public) { return true } - return ['login', '404', 'buyProduct', 'productDetail', 'about', 'cart', 'tvMonitor'].includes( + return ['login', '404', 'buyProduct', 'productDetail', 'about', 'aboutSoftware', 'cart', 'tvMonitor'].includes( to.name as string, ) } diff --git a/src/components/EnamadBadge.vue b/src/components/EnamadBadge.vue new file mode 100644 index 0000000..95a345a --- /dev/null +++ b/src/components/EnamadBadge.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index 2f618be..20bb2de 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -197,6 +197,12 @@ const router = createRouter({ name: '404', component: () => import('../views/base/404.vue') }, + { + path: '/about-software', + name: 'aboutSoftware', + meta: { public: true }, + component: () => import('@/views/base/aboutSoftware/index.vue') + }, /* { path: `/single/login`, diff --git a/src/views/base/aboutSoftware/aboutSoftwareContent.ts b/src/views/base/aboutSoftware/aboutSoftwareContent.ts new file mode 100644 index 0000000..805aba6 --- /dev/null +++ b/src/views/base/aboutSoftware/aboutSoftwareContent.ts @@ -0,0 +1,27 @@ +export function getDefaultAboutSoftwareText(projectName: string) { + const name = projectName.trim() || 'این نرم‌افزار' + return `${name} بستری امن و آنلاین برای خرید و فروش طلا فراهم کرده تا کاربران بتوانند سرمایه‌های خود را به‌سادگی مدیریت کنند.\n\nهدف ما ارائه تجربه‌ای سریع، شفاف و کاربرپسند در معاملات طلا است.` +} + +function looksLikeHtml(value: string) { + return /<\/?[a-z][\s\S]*>/i.test(value) +} + +export type AboutSoftwareBody = + | { kind: 'html'; html: string } + | { kind: 'text'; text: string } + +/** اولویت با تنظیم about_software؛ در صورت خالی بودن، متن پیش‌فرض */ +export function resolveAboutSoftwareBody( + raw: unknown, + projectName: string, +): AboutSoftwareBody { + const value = String(raw ?? '').trim() + if (!value) { + return { kind: 'text', text: getDefaultAboutSoftwareText(projectName) } + } + if (looksLikeHtml(value)) { + return { kind: 'html', html: value } + } + return { kind: 'text', text: value } +} diff --git a/src/views/base/aboutSoftware/index.vue b/src/views/base/aboutSoftware/index.vue new file mode 100644 index 0000000..8578549 --- /dev/null +++ b/src/views/base/aboutSoftware/index.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/src/views/base/gold/desktop/styles/desktop-gold.less b/src/views/base/gold/desktop/styles/desktop-gold.less index e095a0f..76eb438 100644 --- a/src/views/base/gold/desktop/styles/desktop-gold.less +++ b/src/views/base/gold/desktop/styles/desktop-gold.less @@ -10,7 +10,7 @@ } .gold-embed { - max-height: min(70vh, 35rem); + max-height: min(78vh, 40rem); overflow-x: hidden; overflow-y: auto; width: 100%; diff --git a/src/views/base/gold/index.vue b/src/views/base/gold/index.vue index ee8a1f1..1df9163 100644 --- a/src/views/base/gold/index.vue +++ b/src/views/base/gold/index.vue @@ -18,35 +18,45 @@
- -
-
- خرید {{ tradeProductLabel }} +
+
+ خرید
-
- فروش {{ tradeProductLabel }} +
+ فروش
- -
+ class="w-full relative rounded-2xl h-[88px] flex flex-col justify-center background-color-transition">
-
{{ !isBuy ? 'قیمت فروش' : 'قیمت خرید' }}
+
+ {{ !isBuy ? 'قیمت فروش' : 'قیمت خرید' }} + + {{ tradeProductLabel }} + +
{{ usePriceWithoutType(goldPriceValue) }} @@ -60,7 +70,7 @@
-
+
@@ -137,7 +147,7 @@ موجودی کیف پول ناکافی می باشد.
-
+
کارمزد ({{ feeDeductsFromGold ? `از طلا` : `از ریال` }}):
@@ -342,7 +352,7 @@ const contentClass = computed(() => { if (isStandaloneMobile.value) { return 'px-3 mpage-content mpage-content--with-subheader pb-[calc(var(--app-bottom-chrome-height)+1rem)]' } - return 'mt-5 px-3 pb-4' + return 'mt-5 px-3 pb-10' }) const isBuy = ref(true) const inputLock = ref(null) diff --git a/src/views/base/products/components/DealProduct.vue b/src/views/base/products/components/DealProduct.vue index 937b33e..0b37da4 100644 --- a/src/views/base/products/components/DealProduct.vue +++ b/src/views/base/products/components/DealProduct.vue @@ -1,32 +1,41 @@