Polish boursecu UX: branding logos, home price stats, assets, and desktop footer.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div :class="plain ? 'py-2' : 'bg-primary rounded-lg p-2 py-3 mt-2'">
|
||||
<div :class="rootClass">
|
||||
<div
|
||||
v-if="!boursecuLayout && meta?.has_count_based_products"
|
||||
:class="rowClass"
|
||||
class="flex justify-center w-full z-20"
|
||||
>
|
||||
محصولات:
|
||||
<div class="text-l mr-2 font-bold">{{ countBasedInventory }} عدد</div>
|
||||
<div class="text-l mr-2 font-bold">{{ usePriceWithoutType(countBasedInventory, false) }} عدد</div>
|
||||
</div>
|
||||
|
||||
<template v-if="boursecuAssetRows.length">
|
||||
@@ -94,7 +94,7 @@ const props = withDefaults(
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
openGoldModal: [metal: WalletMetalTotal]
|
||||
openGoldModal: [metal: WalletMetalTotal, modalText?: string]
|
||||
openRialModal: []
|
||||
}>()
|
||||
|
||||
@@ -103,6 +103,16 @@ const { assetsSummary } = useWalletAssets()
|
||||
const rowClass = computed(() => (props.plain ? 'text-primary' : 'text-tertiary'))
|
||||
const iconColor = computed(() => (props.plain ? 'primary' : 'tertiary'))
|
||||
|
||||
const rootClass = computed(() => {
|
||||
if (props.boursecuLayout) {
|
||||
return 'assets-section assets-section--boursecu rounded-lg px-3 py-3 mt-2'
|
||||
}
|
||||
if (props.plain) {
|
||||
return 'py-2'
|
||||
}
|
||||
return 'bg-primary rounded-lg p-2 py-3 mt-2'
|
||||
})
|
||||
|
||||
const meta = computed(() => assetsSummary.value?.meta)
|
||||
const metalTotals = computed(() => assetsSummary.value?.metal_totals ?? [])
|
||||
const primaryMetalTotal = computed(() => metalTotals.value[0])
|
||||
@@ -116,7 +126,7 @@ const countBasedInventory = computed(() =>
|
||||
)
|
||||
|
||||
function formatMetalTotal(metal: WalletMetalTotal) {
|
||||
return `${resolveSummaryMetalWeight(metal, inventoryCards.value)}${metal.unit}`
|
||||
return `${usePriceWithoutType(resolveSummaryMetalWeight(metal, inventoryCards.value), false)}${metal.unit}`
|
||||
}
|
||||
|
||||
function handleRowInfo(row: HomeAssetRow) {
|
||||
@@ -126,7 +136,16 @@ function handleRowInfo(row: HomeAssetRow) {
|
||||
}
|
||||
|
||||
if (row.metal) {
|
||||
emit('openGoldModal', row.metal)
|
||||
emit('openGoldModal', row.metal, row.modalText)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@boursecu-surface-border: #d4e3de;
|
||||
|
||||
.assets-section--boursecu {
|
||||
background-color: #eff5f3;
|
||||
border: 2px solid @boursecu-surface-border;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user