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 DesktopHomeCard from './DesktopHomeCard.vue'
|
||||
import { boursecuQuickActions } from '../../layouts/configs/boursecuQuickActions'
|
||||
@@ -10,10 +13,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)
|
||||
}
|
||||
@@ -23,7 +44,7 @@ function handleClick(action: HomeQuickActionItem) {
|
||||
<DesktopHomeCard title="دسترسی سریع">
|
||||
<div class="grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-6">
|
||||
<HomeQuickActionBox
|
||||
v-for="action in props.actions"
|
||||
v-for="action in resolvedActions"
|
||||
:key="action.id"
|
||||
:action="action"
|
||||
class="home-desktop-quick-action"
|
||||
|
||||
Reference in New Issue
Block a user