Split desktop and mobile layouts with shared page data so APIs fetch once per context.

Add layout shells, desktop views, module-level page caches, and UI fixes for auth, home, wallet, transactions, address, and related pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-14 10:08:46 +03:30
co-authored by Cursor
parent 4404b4cb92
commit a5e458ed25
234 changed files with 18425 additions and 5503 deletions
+14 -10
View File
@@ -3,6 +3,7 @@ import { defineStore } from 'pinia'
import { getSettings } from '@/api/configuration'
import { resolveMeltedGoldLabel, resolveMetalTypeLabel } from '@/utils/metalLabels'
import { resolveTradeWeightUnit } from '@/utils/weightUnit'
import { runOnceAsync } from '@/composables/useOnceAsync'
export interface AppSetting {
id?: number
@@ -45,17 +46,20 @@ export const useSettingsStore = defineStore('settings', () => {
settings.value = merged
}
async function fetchSettings() {
try {
const data = await getSettings()
if (Array.isArray(data)) {
mergeSettings(data)
async function fetchSettings(force = false) {
return runOnceAsync('settings:all', async () => {
try {
const data = await getSettings()
if (Array.isArray(data)) {
mergeSettings(data)
}
} catch (e) {
console.log(e)
} finally {
loaded.value = true
}
} catch (e) {
console.log(e)
} finally {
loaded.value = true
}
return settings.value
}, force)
}
const metalTypeSettingValue = computed(() => getSettingByKey('metal_type'))