Improve boursecu UX: banners, support FAB, wallet deposit guide, fund/physical layouts, nav, and sidebar credit.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-23 14:10:40 +02:00
co-authored by Cursor
parent 21345318ba
commit 4fd12277e7
40 changed files with 1844 additions and 305 deletions
@@ -1,4 +1,4 @@
import { computed, inject, onMounted, provide, ref, type InjectionKey, type Ref } from 'vue'
import { computed, inject, onMounted, provide, ref, watch, type InjectionKey, type Ref } from 'vue'
import OtpInput from 'vue3-otp-input'
import { formatCashWalletBalanceText } from '@/utils/productDealMethod'
import { usePriceWithoutType } from '@/utils/usePrice'
@@ -16,12 +16,8 @@ import {
getWalletDepositQuickAmountsRial,
} from '@/utils/config'
import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
import {
buildDepositSmsUrl,
buildSupportMessengerUrl,
DEFAULT_SUPPORT_MESSENGER_TEXT,
supportMessengerSettings,
} from '@/utils/supportMessenger'
import { useSupportMessenger } from '@/composables/useSupportMessenger'
import { loadSupportMessengerFromSettings } from '@/utils/supportMessenger'
import {
initWalletPageData,
loadMoreWalletDeposits,
@@ -56,6 +52,7 @@ export interface WalletPageContext {
supportMessengerText: ReturnType<typeof computed<string>>
depositGuideSupportLink: ReturnType<typeof computed<string>>
depositSmsSupportLink: ReturnType<typeof computed<string>>
openDepositSupportMessenger: () => Promise<boolean>
depositQuickAmounts: ReturnType<typeof computed<readonly number[]>>
usePriceWithoutType: typeof usePriceWithoutType
formatCashWalletBalanceText: typeof formatCashWalletBalanceText
@@ -77,6 +74,12 @@ export function useWalletPage() {
const userStore = useUserStore()
const config = useConfigStore()
const isDesktop = useDesktopBreakpoint()
const {
messengerLink: depositGuideSupportLink,
depositSmsLink: depositSmsSupportLink,
supportMessengerText,
openDepositSupportMessenger,
} = useSupportMessenger()
const showAddCard = ref(false)
const chargeAccountModal = ref(false)
const showConfirmCode = ref(false)
@@ -90,23 +93,8 @@ export function useWalletPage() {
isDesktop.value ? desktopDepositScrollEl.value : mobileDepositScrollEl.value,
)
const supportMessengerText = computed(
() => supportMessengerSettings.value.messengerText || DEFAULT_SUPPORT_MESSENGER_TEXT,
)
const depositQuickAmounts = computed(() => getWalletDepositQuickAmountsRial())
const depositGuideSupportLink = computed(() =>
buildSupportMessengerUrl(
supportMessengerSettings.value.messenger,
supportMessengerSettings.value.messengerId,
),
)
const depositSmsSupportLink = computed(() =>
buildDepositSmsUrl(supportMessengerSettings.value.depositSmsSupportNumber),
)
const extraNote = ref('')
const form = ref<Transaction>({
@@ -250,6 +238,11 @@ export function useWalletPage() {
form.value.card_id = walletCardItems.value.length ? walletCardItems.value[0].id : undefined
})
watch(chargeAccountModal, async (open) => {
if (!open) return
await loadSupportMessengerFromSettings(true)
})
if (!userStore.isSingle) {
useInfiniteScroll(
activeDepositScrollEl,
@@ -288,6 +281,7 @@ export function useWalletPage() {
supportMessengerText,
depositGuideSupportLink,
depositSmsSupportLink,
openDepositSupportMessenger,
depositQuickAmounts,
usePriceWithoutType,
formatCashWalletBalanceText,