feat(user): rename gold day menu to calculator with metal labels
This commit is contained in:
@@ -24,3 +24,4 @@
|
|||||||
- 2026-09-09 | زیرصفحات قلک دسکتاپ | `piggy/new` + `piggy/info` + create/info composable | ساخت/ویرایش و جزئیات با DesktopPageTopbar و گرید دوستونه
|
- 2026-09-09 | زیرصفحات قلک دسکتاپ | `piggy/new` + `piggy/info` + create/info composable | ساخت/ویرایش و جزئیات با DesktopPageTopbar و گرید دوستونه
|
||||||
- 2026-09-09 | عرض قلک دسکتاپ | `desktop-piggy-create.less` | کانتینر ساخت هم max-width ۱۱۸۰ مثل لیست/جزئیات/کیفپول
|
- 2026-09-09 | عرض قلک دسکتاپ | `desktop-piggy-create.less` | کانتینر ساخت هم max-width ۱۱۸۰ مثل لیست/جزئیات/کیفپول
|
||||||
- 2026-09-09 | نام منوی کاربر | `navigation.ts` + `MobileBottomNav.vue` | «تنظیمات» → «امکانات بیشتر» (دسکتاپ+موبایل)
|
- 2026-09-09 | نام منوی کاربر | `navigation.ts` + `MobileBottomNav.vue` | «تنظیمات» → «امکانات بیشتر» (دسکتاپ+موبایل)
|
||||||
|
- 2026-09-09 | ماشین حساب | `useUserPage.ts` + `GoldDayCalculatorModal.vue` | «قیمت روز طلا» → «ماشین حساب»؛ برچسب فلز/واحد از settingsStore (metalTypeLabel + tradeWeightUnit) نه هاردکد طلا/گرم
|
||||||
|
|||||||
@@ -8,15 +8,19 @@
|
|||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="gold-day-calc-modal__title">
|
<div class="gold-day-calc-modal__title">
|
||||||
<BasicIcon icon="vuesax-linear:chart-2" size="20" class="gold-day-calc-modal__title-icon" />
|
<BasicIcon icon="vuesax-linear:calculator" size="20" class="gold-day-calc-modal__title-icon" />
|
||||||
<span>محاسبهگر طلای شما</span>
|
<span>ماشین حساب</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="gold-day-calc" dir="rtl">
|
<div class="gold-day-calc" dir="rtl">
|
||||||
|
<p class="gold-day-calc__hint text-xs text-gray-500">
|
||||||
|
وزن مورد نظر را وارد کنید تا ارزش آن بر اساس قیمت لحظهای محاسبه شود.
|
||||||
|
</p>
|
||||||
|
|
||||||
<BasicInput
|
<BasicInput
|
||||||
v-model:value="weight"
|
v-model:value="weight"
|
||||||
title="وزن طلا (گرم)"
|
:title="`وزن ${metalTypeLabel} (${weightUnit})`"
|
||||||
type="tel"
|
type="tel"
|
||||||
place-holder="مثلاً ۱۰.۵"
|
place-holder="مثلاً ۱۰.۵"
|
||||||
inputmode="decimal"
|
inputmode="decimal"
|
||||||
@@ -24,7 +28,7 @@
|
|||||||
|
|
||||||
<BasicInput
|
<BasicInput
|
||||||
:value="unitPriceInput"
|
:value="unitPriceInput"
|
||||||
title="قیمت روز طلا"
|
:title="`قیمت روز ${metalTypeLabel}`"
|
||||||
type="tel"
|
type="tel"
|
||||||
disabled
|
disabled
|
||||||
addon-before="ریال"
|
addon-before="ریال"
|
||||||
@@ -55,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-2 flex flex-col gap-1 text-xs text-gray-600">
|
<div class="mt-2 flex flex-col gap-1 text-xs text-gray-600">
|
||||||
<div class="flex justify-between gap-2">
|
<div class="flex justify-between gap-2">
|
||||||
<span>هزینه طلا</span>
|
<span>هزینه {{ metalTypeLabel }}</span>
|
||||||
<span class="gold-day-calc__num">{{ formatRial(breakdown.goldCost) }}</span>
|
<span class="gold-day-calc__num">{{ formatRial(breakdown.goldCost) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between gap-2">
|
<div class="flex justify-between gap-2">
|
||||||
@@ -95,8 +99,13 @@ import {
|
|||||||
import { getPriceDisplayState, NO_QUOTE_MESSAGE } from '@/utils/storeHours'
|
import { getPriceDisplayState, NO_QUOTE_MESSAGE } from '@/utils/storeHours'
|
||||||
import { usePriceWithoutType } from '@/utils/usePrice'
|
import { usePriceWithoutType } from '@/utils/usePrice'
|
||||||
import { persianToEnglishDigits } from '@/utils/persianDigits'
|
import { persianToEnglishDigits } from '@/utils/persianDigits'
|
||||||
|
import { useSettingsStore } from '@/store/settingsStore'
|
||||||
|
|
||||||
const visible = goldDayCalculatorVisible
|
const visible = goldDayCalculatorVisible
|
||||||
|
const settingsStore = useSettingsStore()
|
||||||
|
|
||||||
|
const metalTypeLabel = computed(() => settingsStore.metalTypeLabel)
|
||||||
|
const weightUnit = computed(() => settingsStore.tradeWeightUnit)
|
||||||
|
|
||||||
const weight = ref<string | number>('')
|
const weight = ref<string | number>('')
|
||||||
const feePercent = ref<string | number>('')
|
const feePercent = ref<string | number>('')
|
||||||
@@ -186,6 +195,11 @@ watch(visible, async (open) => {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gold-day-calc__hint {
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.7;
|
||||||
|
}
|
||||||
|
|
||||||
.gold-day-calc__result {
|
.gold-day-calc__result {
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ export function useUserPage() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'goldDayCalculator',
|
id: 'goldDayCalculator',
|
||||||
label: 'قیمت روز طلا',
|
label: 'ماشین حساب',
|
||||||
icon: 'vuesax-linear:chart-2',
|
icon: 'vuesax-linear:calculator',
|
||||||
onClick: () => openGoldDayCalculator(),
|
onClick: () => openGoldDayCalculator(),
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user