Skip to content

Commit f1cd0e0

Browse files
authored
feat: expand dashboard shortcuts with all nav pages (#154)
* feat: expand dashboard shortcuts with all nav pages Add all settings and nav pages to the SHORTCUT_REGISTRY (users, tags, canned responses, roles, API keys, webhooks, SSO, custom actions, teams, accounts, flows, transfers, analytics). Use correct icons from navigation config and reuse existing nav i18n keys. Add overflow scroll to shortcuts widget and 3-column layout on large screens. * fix: responsive shortcut columns and first-row hover clipping
1 parent 4feb93a commit f1cd0e0

File tree

1 file changed

+36
-9
lines changed

1 file changed

+36
-9
lines changed

frontend/src/views/dashboard/DashboardView.vue

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,20 @@ import {
5555
BarChart3,
5656
FileText,
5757
X,
58-
GripVertical
58+
GripVertical,
59+
Megaphone,
60+
Settings,
61+
Contact,
62+
Workflow,
63+
Key,
64+
UserX,
65+
MessageSquareText,
66+
Webhook,
67+
ShieldCheck,
68+
Zap,
69+
Shield,
70+
LineChart,
71+
Tags
5972
} from 'lucide-vue-next'
6073
// Centralized Chart.js setup (registered once)
6174
import { Line, Bar, Pie } from '@/lib/charts'
@@ -117,11 +130,25 @@ const selectedShortcuts = ref<string[]>([])
117130
// Shortcut registry
118131
const SHORTCUT_REGISTRY = computed(() => ({
119132
chat: { label: t('dashboard.startChat'), to: '/chat', icon: MessageSquare, gradient: 'from-emerald-500 to-green-600' },
120-
campaigns: { label: t('dashboard.campaigns'), to: '/campaigns', icon: Send, gradient: 'from-orange-500 to-amber-600' },
121-
templates: { label: t('dashboard.templates'), to: '/templates', icon: FileText, gradient: 'from-blue-500 to-cyan-600' },
122-
chatbot: { label: t('dashboard.chatbot'), to: '/chatbot', icon: Bot, gradient: 'from-purple-500 to-pink-600' },
123-
contacts: { label: t('dashboard.contacts'), to: '/settings/contacts', icon: Users, gradient: 'from-cyan-500 to-blue-600' },
124-
analytics: { label: t('dashboard.analytics'), to: '/analytics', icon: BarChart3, gradient: 'from-green-500 to-emerald-600' },
133+
campaigns: { label: t('nav.campaigns'), to: '/campaigns', icon: Megaphone, gradient: 'from-orange-500 to-amber-600' },
134+
templates: { label: t('nav.templates'), to: '/templates', icon: FileText, gradient: 'from-blue-500 to-cyan-600' },
135+
chatbot: { label: t('nav.chatbot'), to: '/chatbot', icon: Bot, gradient: 'from-purple-500 to-pink-600' },
136+
contacts: { label: t('nav.contacts'), to: '/settings/contacts', icon: Contact, gradient: 'from-cyan-500 to-blue-600' },
137+
flows: { label: t('nav.flows'), to: '/flows', icon: Workflow, gradient: 'from-indigo-500 to-violet-600' },
138+
transfers: { label: t('nav.transfers'), to: '/chatbot/transfers', icon: UserX, gradient: 'from-rose-500 to-red-600' },
139+
agentAnalytics: { label: t('nav.agentAnalytics'), to: '/analytics/agents', icon: BarChart3, gradient: 'from-teal-500 to-cyan-600' },
140+
metaInsights: { label: t('nav.metaInsights'), to: '/analytics/meta-insights', icon: LineChart, gradient: 'from-sky-500 to-blue-600' },
141+
settings: { label: t('nav.settings'), to: '/settings', icon: Settings, gradient: 'from-gray-500 to-zinc-600' },
142+
accounts: { label: t('nav.accounts'), to: '/settings/accounts', icon: Users, gradient: 'from-violet-500 to-purple-600' },
143+
cannedResponses: { label: t('nav.cannedResponses'), to: '/settings/canned-responses', icon: MessageSquareText, gradient: 'from-amber-500 to-yellow-600' },
144+
tags: { label: t('nav.tags'), to: '/settings/tags', icon: Tags, gradient: 'from-pink-500 to-rose-600' },
145+
teams: { label: t('nav.teams'), to: '/settings/teams', icon: Users, gradient: 'from-lime-500 to-green-600' },
146+
users: { label: t('nav.users'), to: '/settings/users', icon: Users, gradient: 'from-fuchsia-500 to-pink-600' },
147+
roles: { label: t('nav.roles'), to: '/settings/roles', icon: Shield, gradient: 'from-slate-500 to-gray-600' },
148+
apiKeys: { label: t('nav.apiKeys'), to: '/settings/api-keys', icon: Key, gradient: 'from-yellow-500 to-orange-600' },
149+
webhooks: { label: t('nav.webhooks'), to: '/settings/webhooks', icon: Webhook, gradient: 'from-red-500 to-rose-600' },
150+
customActions: { label: t('nav.customActions'), to: '/settings/custom-actions', icon: Zap, gradient: 'from-amber-500 to-orange-600' },
151+
sso: { label: t('nav.sso'), to: '/settings/sso', icon: ShieldCheck, gradient: 'from-emerald-500 to-teal-600' },
125152
}))
126153
127154
// Color options
@@ -1170,8 +1197,8 @@ onMounted(() => {
11701197
</div>
11711198
</div>
11721199

1173-
<div class="flex-1 min-h-0 px-6 pb-6">
1174-
<div class="grid grid-cols-2 gap-3">
1200+
<div class="flex-1 min-h-0 overflow-y-auto px-6 pb-6">
1201+
<div :class="['grid gap-3 pt-1', item.w >= 8 ? 'grid-cols-3' : 'grid-cols-2']">
11751202
<template v-for="key in (getWidgetById(item.i)!.config?.shortcuts || [])" :key="key">
11761203
<RouterLink
11771204
v-if="SHORTCUT_REGISTRY[key as keyof typeof SHORTCUT_REGISTRY]"
@@ -1325,7 +1352,7 @@ onMounted(() => {
13251352
<!-- Shortcuts selector (only for shortcuts display type) -->
13261353
<div v-if="widgetForm.display_type === 'shortcuts'" class="space-y-2">
13271354
<Label class="text-white/70 light:text-gray-700">{{ $t('dashboard.selectShortcuts') }}</Label>
1328-
<div class="space-y-2">
1355+
<div class="space-y-2 max-h-64 overflow-y-auto pr-1">
13291356
<label
13301357
v-for="(shortcut, key) in SHORTCUT_REGISTRY"
13311358
:key="key"

0 commit comments

Comments
 (0)