Port modular features into boursecu and fix desktop login UX.
Add support chat, piggy funds, PWA banner, notification/SSE sync, and messenger legacy guards while keeping boursecu theme; also balance login panels and unblock login navigation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import router from '@/router'
|
||||
import { useSettingsStore } from '@/store/settingsStore'
|
||||
import { getBoursecuActionIconSrc } from '@/utils/config'
|
||||
import HomeQuickActionBox from '../../components/HomeQuickActionBox.vue'
|
||||
import { boursecuQuickActions } from '../configs/boursecuQuickActions'
|
||||
import type { HomeQuickActionItem } from '../types'
|
||||
@@ -9,10 +12,28 @@ const props = withDefaults(
|
||||
actions?: HomeQuickActionItem[]
|
||||
}>(),
|
||||
{
|
||||
actions: () => boursecuQuickActions,
|
||||
actions: undefined,
|
||||
}
|
||||
)
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
const resolvedActions = computed(() => {
|
||||
if (props.actions) return props.actions
|
||||
|
||||
const list = [...boursecuQuickActions]
|
||||
if (settingsStore.isSettingTruthy('enable_product_funds')) {
|
||||
list.push({
|
||||
id: 'piggy',
|
||||
label: 'قلک',
|
||||
icon: 'vuesax-linear:safe-home',
|
||||
iconSrc: getBoursecuActionIconSrc('piggy'),
|
||||
route: { name: 'piggy' },
|
||||
})
|
||||
}
|
||||
return list
|
||||
})
|
||||
|
||||
function handleClick(action: HomeQuickActionItem) {
|
||||
router.push(action.route)
|
||||
}
|
||||
@@ -21,7 +42,7 @@ function handleClick(action: HomeQuickActionItem) {
|
||||
<template>
|
||||
<div class="grid grid-cols-3 gap-3 mt-4">
|
||||
<HomeQuickActionBox
|
||||
v-for="action in props.actions"
|
||||
v-for="action in resolvedActions"
|
||||
:key="action.id"
|
||||
:action="action"
|
||||
@click="handleClick(action)"
|
||||
|
||||
@@ -5,7 +5,12 @@ import { HOME_PAGE_CONTEXT_KEY } from '../../composables/useHomePage'
|
||||
|
||||
const ctx = inject(HOME_PAGE_CONTEXT_KEY)!
|
||||
const layout = 'boursecu' as const
|
||||
const priceChartSeries = computed(() => toValue(ctx.priceChartSeries))
|
||||
const priceChartSeries = computed(() => {
|
||||
const series = toValue(ctx.priceChartSeries)
|
||||
// Track length so chart updates even if the array reference is reused.
|
||||
void series?.[0]?.data?.length
|
||||
return series
|
||||
})
|
||||
const chartSelection = computed(() => toValue(ctx.chartSelection))
|
||||
const selectedChartMetal = computed(() => toValue(ctx.selectedChartMetal))
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user