Polish boursecu UX: branding logos, home price stats, assets, and desktop footer.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 10:32:10 +03:30
co-authored by Cursor
parent 033e31e7a9
commit 31caa8cca7
29 changed files with 384 additions and 197 deletions
@@ -8,7 +8,7 @@ import { buildBoursecuHomeAssetRows, resolveSummaryMetalWeight } from '@/utils/p
import { useHomePageContext } from '../../composables/useHomePage'
const emit = defineEmits<{
openGoldModal: [metal: WalletMetalTotal]
openGoldModal: [metal: WalletMetalTotal, modalText?: string]
openRialModal: []
}>()
@@ -29,6 +29,7 @@ type MetricItem = {
label: string
value: string
metal?: WalletMetalTotal
modalText?: string
showInfo?: boolean
onInfo?: 'gold' | 'rial'
}
@@ -40,7 +41,7 @@ const metrics = computed<MetricItem[]>(() => {
items.push({
id: 'products',
label: 'محصولات',
value: `${countBasedInventory.value} عدد`,
value: `${usePriceWithoutType(countBasedInventory.value, false)} عدد`,
})
}
@@ -51,6 +52,7 @@ const metrics = computed<MetricItem[]>(() => {
label: row.label,
value: row.value,
metal: row.metal,
modalText: row.modalText,
showInfo: row.info !== 'none',
onInfo: row.info === 'rial' ? 'rial' : 'gold',
})
@@ -93,7 +95,7 @@ const metrics = computed<MetricItem[]>(() => {
})
function formatMetalTotal(metal: WalletMetalTotal) {
return `${resolveSummaryMetalWeight(metal, inventoryCards.value)}${metal.unit}`
return `${usePriceWithoutType(resolveSummaryMetalWeight(metal, inventoryCards.value), false)}${metal.unit}`
}
function handleInfo(metric: MetricItem) {
@@ -102,7 +104,7 @@ function handleInfo(metric: MetricItem) {
return
}
if (metric.metal) {
emit('openGoldModal', metric.metal)
emit('openGoldModal', metric.metal, metric.modalText)
}
}
</script>
@@ -13,7 +13,7 @@
<Vue3Odometer
:value="displayGoldVal"
class="dhome-hero-price__odometer o-text"
style="font-family: var(--App-font-family)"
style="font-family: iran-sans"
/>
<span class="dhome-hero-price__unit">ریال</span>
</div>
@@ -1,13 +1,7 @@
<script setup lang="ts">
import { computed, toValue } from 'vue'
import { useHomePageContext } from '../../composables/useHomePage'
import { price } from '@/utils/price'
import CurrentPrice from '../../components/CurrentPrice.vue'
import PriceStats from '../../components/PriceStats.vue'
import DesktopHomeCard from './DesktopHomeCard.vue'
const ctx = useHomePageContext()
const statsLayout = computed(() => (toValue(ctx.isBoursecuHomeLayout) ? 'boursecu' : 'default'))
</script>
<template>
@@ -17,7 +11,7 @@ const statsLayout = computed(() => (toValue(ctx.isBoursecuHomeLayout) ? 'boursec
</DesktopHomeCard>
<DesktopHomeCard title="بازه قیمت امروز">
<PriceStats variant="desktop" :price="price" :layout="statsLayout" />
<PriceStats variant="desktop" />
</DesktopHomeCard>
</div>
</template>