Skip to content

Commit 9cdde6a

Browse files
committed
chore: edit dashboard view
1 parent a476591 commit 9cdde6a

2 files changed

Lines changed: 82 additions & 8 deletions

File tree

desktop/src/pages/dashboard.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ onUnmounted(() => {
281281
</div>
282282
</section>
283283

284-
<div class="grid grid-cols-3 gap-2.5">
284+
<div class="grid grid-cols-3 gap-2.5 auto-rows-[320px]">
285285
<!-- Cost Section -->
286286
<section>
287287
<div class="p-4 rounded-lg border border-border/50 bg-card/20 h-full">
@@ -312,8 +312,8 @@ onUnmounted(() => {
312312

313313
<div class="mt-4 pt-3 border-t border-border/50 grid grid-cols-2 gap-3">
314314
<div>
315-
<div class="text-[11px] text-muted-foreground mb-0.5">Tokens</div>
316-
<div class="text-[18px] font-mono text-foreground tracking-tight">{{ cost.total_tokens.toLocaleString() }}</div>
315+
<div class="text-[11px] text-muted-foreground mb-0.5">Total Cost</div>
316+
<div class="text-[18px] font-mono text-foreground tracking-tight">{{ formatUSD(cost.monthly_cost_usd) }}</div>
317317
</div>
318318
<div class="text-right">
319319
<div class="text-[11px] text-muted-foreground mb-0.5">Requests</div>
@@ -325,12 +325,12 @@ onUnmounted(() => {
325325

326326
<!-- Channels -->
327327
<section>
328-
<div class="p-4 rounded-lg border border-border/50 bg-card/20 h-full">
328+
<div class="p-4 rounded-lg border border-border/50 bg-card/20 h-full flex flex-col">
329329
<div class="flex items-center gap-1.5 text-[12px] text-muted-foreground mb-2">
330330
<Icon icon="ph:chat-circle-fill" class="size-3.5" />
331331
<span>Channels</span>
332332
</div>
333-
<div class="space-y-0">
333+
<div class="space-y-0 flex-1 min-h-0 overflow-y-auto pr-1">
334334
<template v-for="(active, name) in status.channels" :key="name">
335335
<div v-if="active" class="flex items-center justify-between py-2 border-b border-border/30 last:border-0">
336336
<div class="flex items-center gap-2">
@@ -349,12 +349,12 @@ onUnmounted(() => {
349349

350350
<!-- Components -->
351351
<section>
352-
<div class="p-4 rounded-lg border border-border/50 bg-card/20 h-full">
352+
<div class="p-4 rounded-lg border border-border/50 bg-card/20 h-full flex flex-col">
353353
<div class="flex items-center gap-1.5 text-[12px] text-muted-foreground mb-2">
354354
<Icon icon="ph:squares-four-fill" class="size-3.5" />
355355
<span>Components</span>
356356
</div>
357-
<div class="space-y-0">
357+
<div class="space-y-0 flex-1 min-h-0 overflow-y-auto pr-1">
358358
<div
359359
v-for="(comp, name) in status.health.components"
360360
:key="name"

desktop/src/pages/integrations.vue

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,75 @@ function statusLabel(status: Integration['status']): string {
9696
return status
9797
}
9898
99+
interface IntegrationLogo {
100+
icon: string
101+
color?: string
102+
}
103+
104+
const integrationLogoMap: Record<string, IntegrationLogo> = {
105+
Telegram: { icon: 'simple-icons:telegram', color: '#26A5E4' },
106+
Discord: { icon: 'simple-icons:discord', color: '#5865F2' },
107+
Slack: { icon: 'simple-icons:slack', color: '#4A154B' },
108+
WhatsApp: { icon: 'simple-icons:whatsapp', color: '#25D366' },
109+
Signal: { icon: 'simple-icons:signal', color: '#3A76F0' },
110+
iMessage: { icon: 'simple-icons:imessage', color: '#34DA50' },
111+
'Microsoft Teams': { icon: 'simple-icons:microsoftteams', color: '#6264A7' },
112+
Matrix: { icon: 'simple-icons:matrix' },
113+
'Nextcloud Talk': { icon: 'simple-icons:nextcloud', color: '#0082C9' },
114+
Zalo: { icon: 'simple-icons:zalo', color: '#0068FF' },
115+
'QQ Official': { icon: 'simple-icons:qq', color: '#EB1923' },
116+
OpenRouter: { icon: 'simple-icons:openrouter', color: '#00A3FF' },
117+
Anthropic: { icon: 'simple-icons:anthropic' },
118+
OpenAI: { icon: 'simple-icons:openai' },
119+
Google: { icon: 'simple-icons:googlegemini', color: '#8E75B2' },
120+
xAI: { icon: 'simple-icons:x' },
121+
Mistral: { icon: 'simple-icons:mistralai', color: '#FF7000' },
122+
Ollama: { icon: 'simple-icons:ollama' },
123+
Perplexity: { icon: 'simple-icons:perplexity', color: '#1FB8CD' },
124+
'Hugging Face': { icon: 'simple-icons:huggingface', color: '#FFD21E' },
125+
'Vercel AI': { icon: 'simple-icons:vercel' },
126+
'Cloudflare AI': { icon: 'simple-icons:cloudflare', color: '#F38020' },
127+
MiniMax: { icon: 'simple-icons:minimax', color: '#F04E23' },
128+
'Amazon Bedrock': { icon: 'simple-icons:amazon', color: '#FF9900' },
129+
GitHub: { icon: 'simple-icons:github' },
130+
Notion: { icon: 'simple-icons:notion' },
131+
'Apple Notes': { icon: 'simple-icons:apple' },
132+
'Apple Reminders': { icon: 'simple-icons:apple' },
133+
Obsidian: { icon: 'simple-icons:obsidian', color: '#7C3AED' },
134+
Trello: { icon: 'simple-icons:trello', color: '#0052CC' },
135+
Linear: { icon: 'simple-icons:linear', color: '#5E6AD2' },
136+
Spotify: { icon: 'simple-icons:spotify', color: '#1DB954' },
137+
Sonos: { icon: 'simple-icons:sonos' },
138+
Shazam: { icon: 'simple-icons:shazam', color: '#0088FF' },
139+
'Home Assistant': { icon: 'simple-icons:homeassistant', color: '#18BCF2' },
140+
'Philips Hue': { icon: 'simple-icons:philipshue', color: '#0065D3' },
141+
Gmail: { icon: 'simple-icons:gmail', color: '#EA4335' },
142+
'1Password': { icon: 'simple-icons:1password', color: '#3B66BC' },
143+
Canvas: { icon: 'simple-icons:canvas', color: '#E72429' },
144+
'Twitter/X': { icon: 'simple-icons:x' },
145+
macOS: { icon: 'simple-icons:apple' },
146+
Linux: { icon: 'simple-icons:linux', color: '#FCC624' },
147+
Windows: { icon: 'simple-icons:windows', color: '#0078D4' },
148+
iOS: { icon: 'simple-icons:apple' },
149+
Android: { icon: 'simple-icons:android', color: '#3DDC84' },
150+
}
151+
152+
function integrationIcon(name: string): string {
153+
return integrationLogoMap[name]?.icon ?? 'ph:puzzle-piece-fill'
154+
}
155+
156+
function integrationIconClass(name: string): string {
157+
if (!integrationLogoMap[name]) {
158+
return 'text-primary'
159+
}
160+
return integrationLogoMap[name]?.color ? '' : 'text-foreground'
161+
}
162+
163+
function integrationIconStyle(name: string): { color: string } | undefined {
164+
const color = integrationLogoMap[name]?.color
165+
return color ? { color } : undefined
166+
}
167+
99168
async function fetchIntegrations(showLoading = true) {
100169
if (showLoading) {
101170
loading.value = true
@@ -189,7 +258,12 @@ onMounted(() => {
189258
class="p-4 rounded-2xl border border-border/40 bg-card/20 hover:bg-card/40 hover:border-border/60 transition-all"
190259
>
191260
<div class="flex items-center gap-2 pr-2 mb-1">
192-
<Icon icon="ph:puzzle-piece-fill" class="size-[16px] text-primary shrink-0" />
261+
<Icon
262+
:icon="integrationIcon(integration.name)"
263+
class="size-[16px] shrink-0"
264+
:class="integrationIconClass(integration.name)"
265+
:style="integrationIconStyle(integration.name)"
266+
/>
193267
<h3 class="font-sans text-[15px] font-medium text-foreground truncate">{{ integration.name }}</h3>
194268
</div>
195269

0 commit comments

Comments
 (0)