Skip to content

Commit 0e95903

Browse files
committed
feat(ui): add utilities, theming, and i18n updates (slice 2 of dashboard-v2)
UI utilities and theming improvements extracted from dashboard-v2-structure: Icons & formatting: - icons.ts: expanded icon set for new dashboard views - format.ts: date/number formatting helpers - tool-labels.ts: human-readable tool name mappings Theming: - theme.ts: enhanced theme resolution and system theme support - theme-transition.ts: simplified transition logic - storage.ts: theme parsing improvements for settings persistence Navigation & types: - navigation.ts: extended tab definitions for dashboard-v2 - app-view-state.ts: expanded view state management - types.ts: new type definitions (HealthSummary, ModelCatalogEntry, etc.) Components: - components/dashboard-header.ts: reusable header component i18n: - Updated en, pt-BR, zh-CN, zh-TW locales with new dashboard strings All changes are additive or backwards-compatible. Build passes. Part of #36853.
1 parent 64746c1 commit 0e95903

14 files changed

Lines changed: 817 additions & 223 deletions

File tree

ui/src/i18n/locales/en.ts

Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { TranslationMap } from "../lib/types.ts";
22

33
export const en: TranslationMap = {
44
common: {
5-
version: "Version",
65
health: "Health",
76
ok: "OK",
87
offline: "Offline",
@@ -12,7 +11,9 @@ export const en: TranslationMap = {
1211
disabled: "Disabled",
1312
na: "n/a",
1413
docs: "Docs",
14+
theme: "Theme",
1515
resources: "Resources",
16+
search: "Search",
1617
},
1718
nav: {
1819
chat: "Chat",
@@ -21,6 +22,7 @@ export const en: TranslationMap = {
2122
settings: "Settings",
2223
expand: "Expand sidebar",
2324
collapse: "Collapse sidebar",
25+
resize: "Resize sidebar",
2426
},
2527
tabs: {
2628
agents: "Agents",
@@ -34,23 +36,33 @@ export const en: TranslationMap = {
3436
nodes: "Nodes",
3537
chat: "Chat",
3638
config: "Config",
39+
communications: "Communications",
40+
appearance: "Appearance",
41+
automation: "Automation",
42+
infrastructure: "Infrastructure",
43+
aiAgents: "AI & Agents",
3744
debug: "Debug",
3845
logs: "Logs",
3946
},
4047
subtitles: {
41-
agents: "Manage agent workspaces, tools, and identities.",
42-
overview: "Gateway status, entry points, and a fast health read.",
43-
channels: "Manage channels and settings.",
44-
instances: "Presence beacons from connected clients and nodes.",
45-
sessions: "Inspect active sessions and adjust per-session defaults.",
46-
usage: "Monitor API usage and costs.",
47-
cron: "Schedule wakeups and recurring agent runs.",
48-
skills: "Manage skill availability and API key injection.",
49-
nodes: "Paired devices, capabilities, and command exposure.",
50-
chat: "Direct gateway chat session for quick interventions.",
51-
config: "Edit ~/.openclaw/openclaw.json safely.",
52-
debug: "Gateway snapshots, events, and manual RPC calls.",
53-
logs: "Live tail of the gateway file logs.",
48+
agents: "Workspaces, tools, identities.",
49+
overview: "Status, entry points, health.",
50+
channels: "Channels and settings.",
51+
instances: "Connected clients and nodes.",
52+
sessions: "Active sessions and defaults.",
53+
usage: "API usage and costs.",
54+
cron: "Wakeups and recurring runs.",
55+
skills: "Skills and API keys.",
56+
nodes: "Paired devices and commands.",
57+
chat: "Gateway chat for quick interventions.",
58+
config: "Edit openclaw.json.",
59+
communications: "Channels, messages, and audio settings.",
60+
appearance: "Theme, UI, and setup wizard settings.",
61+
automation: "Commands, hooks, cron, and plugins.",
62+
infrastructure: "Gateway, web, browser, and media settings.",
63+
aiAgents: "Agents, models, skills, tools, memory, session.",
64+
debug: "Snapshots, events, RPC.",
65+
logs: "Live gateway logs.",
5466
},
5567
overview: {
5668
access: {
@@ -105,6 +117,47 @@ export const en: TranslationMap = {
105117
hint: "This page is HTTP, so the browser blocks device identity. Use HTTPS (Tailscale Serve) or open {url} on the gateway host.",
106118
stayHttp: "If you must stay on HTTP, set {config} (token-only).",
107119
},
120+
connection: {
121+
title: "How to connect",
122+
step1: "Start the gateway on your host machine:",
123+
step2: "Get a tokenized dashboard URL:",
124+
step3: "Paste the WebSocket URL and token above, or open the tokenized URL directly.",
125+
step4: "Or generate a reusable token:",
126+
docsHint: "For remote access, Tailscale Serve is recommended. ",
127+
docsLink: "Read the docs →",
128+
},
129+
cards: {
130+
cost: "Cost",
131+
skills: "Skills",
132+
recentSessions: "Recent Sessions",
133+
},
134+
attention: {
135+
title: "Attention",
136+
},
137+
eventLog: {
138+
title: "Event Log",
139+
},
140+
logTail: {
141+
title: "Gateway Logs",
142+
},
143+
quickActions: {
144+
newSession: "New Session",
145+
automation: "Automation",
146+
refreshAll: "Refresh All",
147+
terminal: "Terminal",
148+
},
149+
streamMode: {
150+
active: "Stream mode — values redacted",
151+
disable: "Disable",
152+
},
153+
palette: {
154+
placeholder: "Type a command…",
155+
noResults: "No results",
156+
},
157+
},
158+
login: {
159+
subtitle: "Gateway Dashboard",
160+
passwordPlaceholder: "optional",
108161
},
109162
chat: {
110163
disconnected: "Disconnected from gateway.",

ui/src/i18n/locales/pt-BR.ts

Lines changed: 66 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { TranslationMap } from "../lib/types.ts";
22

33
export const pt_BR: TranslationMap = {
44
common: {
5-
version: "Versão",
65
health: "Saúde",
76
ok: "OK",
87
offline: "Offline",
@@ -13,6 +12,7 @@ export const pt_BR: TranslationMap = {
1312
na: "n/a",
1413
docs: "Docs",
1514
resources: "Recursos",
15+
search: "Pesquisar",
1616
},
1717
nav: {
1818
chat: "Chat",
@@ -21,6 +21,7 @@ export const pt_BR: TranslationMap = {
2121
settings: "Configurações",
2222
expand: "Expandir barra lateral",
2323
collapse: "Recolher barra lateral",
24+
resize: "Redimensionar barra lateral",
2425
},
2526
tabs: {
2627
agents: "Agentes",
@@ -34,23 +35,33 @@ export const pt_BR: TranslationMap = {
3435
nodes: "Nós",
3536
chat: "Chat",
3637
config: "Config",
38+
communications: "Comunicações",
39+
appearance: "Aparência e Configuração",
40+
automation: "Automação",
41+
infrastructure: "Infraestrutura",
42+
aiAgents: "IA e Agentes",
3743
debug: "Debug",
3844
logs: "Logs",
3945
},
4046
subtitles: {
41-
agents: "Gerenciar espaços de trabalho, ferramentas e identidades de agentes.",
42-
overview: "Status do gateway, pontos de entrada e leitura rápida de saúde.",
43-
channels: "Gerenciar canais e configurações.",
44-
instances: "Beacons de presença de clientes e nós conectados.",
45-
sessions: "Inspecionar sessões ativas e ajustar padrões por sessão.",
46-
usage: "Monitorar uso e custos da API.",
47-
cron: "Agendar despertares e execuções recorrentes de agentes.",
48-
skills: "Gerenciar disponibilidade de habilidades e injeção de chaves de API.",
49-
nodes: "Dispositivos pareados, capacidades e exposição de comandos.",
50-
chat: "Sessão de chat direta com o gateway para intervenções rápidas.",
51-
config: "Editar ~/.openclaw/openclaw.json com segurança.",
52-
debug: "Snapshots do gateway, eventos e chamadas RPC manuais.",
53-
logs: "Acompanhamento ao vivo dos logs de arquivo do gateway.",
47+
agents: "Espaços, ferramentas, identidades.",
48+
overview: "Status, entrada, saúde.",
49+
channels: "Canais e configurações.",
50+
instances: "Clientes e nós conectados.",
51+
sessions: "Sessões ativas e padrões.",
52+
usage: "Uso e custos da API.",
53+
cron: "Despertares e execuções.",
54+
skills: "Habilidades e chaves API.",
55+
nodes: "Dispositivos e comandos.",
56+
chat: "Chat do gateway para intervenções rápidas.",
57+
config: "Editar openclaw.json.",
58+
communications: "Configurações de canais, mensagens e áudio.",
59+
appearance: "Configurações de tema, UI e assistente de configuração.",
60+
automation: "Configurações de comandos, hooks, cron e plugins.",
61+
infrastructure: "Configurações de gateway, web, browser e mídia.",
62+
aiAgents: "Configurações de agentes, modelos, habilidades, ferramentas, memória e sessão.",
63+
debug: "Snapshots, eventos, RPC.",
64+
logs: "Logs ao vivo do gateway.",
5465
},
5566
overview: {
5667
access: {
@@ -107,6 +118,47 @@ export const pt_BR: TranslationMap = {
107118
hint: "Esta página é HTTP, então o navegador bloqueia a identidade do dispositivo. Use HTTPS (Tailscale Serve) ou abra {url} no host do gateway.",
108119
stayHttp: "Se você precisar permanecer em HTTP, defina {config} (apenas token).",
109120
},
121+
connection: {
122+
title: "Como conectar",
123+
step1: "Inicie o gateway na sua máquina host:",
124+
step2: "Obtenha uma URL do painel com token:",
125+
step3: "Cole a URL do WebSocket e o token acima, ou abra a URL com token diretamente.",
126+
step4: "Ou gere um token reutilizável:",
127+
docsHint: "Para acesso remoto, recomendamos o Tailscale Serve. ",
128+
docsLink: "Leia a documentação →",
129+
},
130+
cards: {
131+
cost: "Custo",
132+
skills: "Habilidades",
133+
recentSessions: "Sessões Recentes",
134+
},
135+
attention: {
136+
title: "Atenção",
137+
},
138+
eventLog: {
139+
title: "Log de Eventos",
140+
},
141+
logTail: {
142+
title: "Logs do Gateway",
143+
},
144+
quickActions: {
145+
newSession: "Nova Sessão",
146+
automation: "Automação",
147+
refreshAll: "Atualizar Tudo",
148+
terminal: "Terminal",
149+
},
150+
streamMode: {
151+
active: "Modo stream — valores ocultos",
152+
disable: "Desativar",
153+
},
154+
palette: {
155+
placeholder: "Digite um comando…",
156+
noResults: "Sem resultados",
157+
},
158+
},
159+
login: {
160+
subtitle: "Painel do Gateway",
161+
passwordPlaceholder: "opcional",
110162
},
111163
chat: {
112164
disconnected: "Desconectado do gateway.",

ui/src/i18n/locales/zh-CN.ts

Lines changed: 66 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { TranslationMap } from "../lib/types.ts";
22

33
export const zh_CN: TranslationMap = {
44
common: {
5-
version: "版本",
65
health: "健康状况",
76
ok: "正常",
87
offline: "离线",
@@ -13,6 +12,7 @@ export const zh_CN: TranslationMap = {
1312
na: "不适用",
1413
docs: "文档",
1514
resources: "资源",
15+
search: "搜索",
1616
},
1717
nav: {
1818
chat: "聊天",
@@ -21,6 +21,7 @@ export const zh_CN: TranslationMap = {
2121
settings: "设置",
2222
expand: "展开侧边栏",
2323
collapse: "折叠侧边栏",
24+
resize: "调整侧边栏大小",
2425
},
2526
tabs: {
2627
agents: "代理",
@@ -34,23 +35,33 @@ export const zh_CN: TranslationMap = {
3435
nodes: "节点",
3536
chat: "聊天",
3637
config: "配置",
38+
communications: "通信",
39+
appearance: "外观与设置",
40+
automation: "自动化",
41+
infrastructure: "基础设施",
42+
aiAgents: "AI 与代理",
3743
debug: "调试",
3844
logs: "日志",
3945
},
4046
subtitles: {
41-
agents: "管理代理工作区、工具和身份。",
42-
overview: "网关状态、入口点和快速健康读取。",
43-
channels: "管理频道和设置。",
44-
instances: "来自已连接客户端和节点的在线信号。",
45-
sessions: "检查活动会话并调整每个会话的默认设置。",
46-
usage: "监控 API 使用情况和成本。",
47-
cron: "安排唤醒和重复的代理运行。",
48-
skills: "管理技能可用性和 API 密钥注入。",
49-
nodes: "配对设备、功能和命令公开。",
50-
chat: "用于快速干预的直接网关聊天会话。",
51-
config: "安全地编辑 ~/.openclaw/openclaw.json。",
52-
debug: "网关快照、事件和手动 RPC 调用。",
53-
logs: "网关文件日志的实时追踪。",
47+
agents: "工作区、工具、身份。",
48+
overview: "状态、入口点、健康。",
49+
channels: "频道和设置。",
50+
instances: "已连接客户端和节点。",
51+
sessions: "活动会话和默认设置。",
52+
usage: "API 使用情况和成本。",
53+
cron: "唤醒和重复运行。",
54+
skills: "技能和 API 密钥。",
55+
nodes: "配对设备和命令。",
56+
chat: "网关聊天,快速干预。",
57+
config: "编辑 openclaw.json。",
58+
communications: "频道、消息和音频设置。",
59+
appearance: "主题、界面和设置向导设置。",
60+
automation: "命令、钩子、定时任务和插件设置。",
61+
infrastructure: "网关、Web、浏览器和媒体设置。",
62+
aiAgents: "代理、模型、技能、工具、记忆和会话设置。",
63+
debug: "快照、事件、RPC。",
64+
logs: "实时网关日志。",
5465
},
5566
overview: {
5667
access: {
@@ -104,6 +115,47 @@ export const zh_CN: TranslationMap = {
104115
hint: "此页面为 HTTP,因此浏览器阻止设备标识。请使用 HTTPS (Tailscale Serve) 或在网关主机上打开 {url}。",
105116
stayHttp: "如果您必须保持 HTTP,请设置 {config} (仅限令牌)。",
106117
},
118+
connection: {
119+
title: "如何连接",
120+
step1: "在主机上启动网关:",
121+
step2: "获取带令牌的仪表盘 URL:",
122+
step3: "将 WebSocket URL 和令牌粘贴到上方,或直接打开带令牌的 URL。",
123+
step4: "或生成可重复使用的令牌:",
124+
docsHint: "如需远程访问,建议使用 Tailscale Serve。",
125+
docsLink: "查看文档 →",
126+
},
127+
cards: {
128+
cost: "费用",
129+
skills: "技能",
130+
recentSessions: "最近会话",
131+
},
132+
attention: {
133+
title: "注意事项",
134+
},
135+
eventLog: {
136+
title: "事件日志",
137+
},
138+
logTail: {
139+
title: "网关日志",
140+
},
141+
quickActions: {
142+
newSession: "新建会话",
143+
automation: "自动化",
144+
refreshAll: "全部刷新",
145+
terminal: "终端",
146+
},
147+
streamMode: {
148+
active: "流模式 — 数据已隐藏",
149+
disable: "禁用",
150+
},
151+
palette: {
152+
placeholder: "输入命令…",
153+
noResults: "无结果",
154+
},
155+
},
156+
login: {
157+
subtitle: "网关仪表盘",
158+
passwordPlaceholder: "可选",
107159
},
108160
chat: {
109161
disconnected: "已断开与网关的连接。",

0 commit comments

Comments
 (0)