Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion desktop/renderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<title>MicroClawDesktop</title>
<title>MicroClaw</title>
</head>
<body>
<div id="app"></div>
Expand Down
22 changes: 0 additions & 22 deletions desktop/renderer/src/components/SidePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,6 @@
</div>
</div>

<!-- Phone -->
<button
class="sp-menu-item"
:class="{ active: route.path === '/phone' }"
@click="router.push('/phone')"
>
<svg
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="5" y="2" width="14" height="20" rx="2" />
<line x1="12" y1="18" x2="12.01" y2="18" />
</svg>
<span>{{ t("sidebar.phone") }}</span>
</button>

<!-- Usage -->
<button class="sp-menu-item" :class="{ active: route.path === '/usage' }" @click="openUsage">
<svg
Expand Down
22 changes: 10 additions & 12 deletions desktop/renderer/src/i18n/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default {
"plugins.back": "Back",
"plugins.title": "Plugin Manager",
"plugins.desc": "Manage installed OpenClaw plugins",
"plugins.weixinName": "WeChat Plugin",
"plugins.weixinName": "WeChat",
"plugins.weixinDesc":
"Connect to WeChat messaging channel, enabling AI assistant to process WeChat messages",
"plugins.channelLogin": "Channel Login",
Expand Down Expand Up @@ -194,6 +194,7 @@ export default {
"settings.back": "Back",
"settings.title": "Settings",
"settings.general": "General",
"settings.application": "Application",
"settings.language": "Language",
"settings.autoStart": "Launch at Startup",
"settings.startMinimized": "Start Minimized to Tray",
Expand Down Expand Up @@ -232,9 +233,8 @@ export default {
"settings.notInstalled": "Not Installed",
"settings.noManagedSkills": "No managed skills",
"settings.noCustomSkills": "No custom skills",
"settings.workspace": "Workspace",
"settings.dataDir": "Data Directory",
"settings.gatewayPort": "Gateway Port",
"settings.connectionStatus": "Connection Status",
"settings.status": "Status",
"settings.privacy": "Data & Privacy",
"settings.privacyProtection": "Privacy Protection",
"settings.privacyProtectionDesc":
Expand Down Expand Up @@ -347,13 +347,14 @@ export default {
"settings.menu.usage": "Usage",
"settings.menu.models": "Models",
"settings.menu.skills": "Skills",
"settings.menu.workspace": "Workspace",
"settings.menu.gateway": "Gateway",
"settings.menu.channels": "Channels",
"settings.menu.privacy": "Privacy",
"settings.menu.security": "Security",
"settings.menu.about": "About",
// Models & API
"settings.modelsAndApi": "Models & API",
"settings.reconnect": "Reconnect",
"settings.restart": "Restart",
"settings.customModels": "Custom Models",
"settings.addCustomModel": "Add Custom Model",
"settings.currentSelection": "Current Selection",
Expand All @@ -380,22 +381,19 @@ export default {
"settings.cancel": "Cancel",
"settings.add": "Add",
"settings.editCustomModel": "Edit Custom Model",
"settings.gatewayUrl": "Gateway URL",
"settings.connected": "Connected",
"settings.resetConnection": "Reset Connection",
"settings.port": "Port",
"settings.portDesc":
"Gateway will restart automatically after changing the port. If the default port is occupied, the system will try adjacent ports.",
"settings.webSearch": "Web Search",
"settings.webSearch": "Web search provider",
"settings.braveSearchApiKey": "Brave Search API Key",
"settings.reasoningOffDesc": "Reasoning off",
"settings.reasoningDesc": "Reasoning {level}",
"settings.modelNameRequired": "Model name is required",
"settings.baseUrlRequired": "Base URL is required",
"settings.modelNameExists": "A model with this name already exists",
"settings.gatewayReconnecting": "Gateway reconnecting...",
"settings.reconnectFailed": "Reconnect failed: {error}",
"settings.connectionReset": "Connection reset",
"settings.gatewayRestarting": "Gateway restarting...",
"settings.restartFailed": "Restart failed: {error}",
"settings.invalidPort": "Invalid port number",
"settings.portUpdated": "Port updated, gateway restarting...",
"settings.portUpdateFailed": "Failed: {error}",
Expand Down
22 changes: 10 additions & 12 deletions desktop/renderer/src/i18n/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default {
"plugins.back": "返回",
"plugins.title": "插件管理",
"plugins.desc": "管理已安装的 OpenClaw 插件",
"plugins.weixinName": "微信插件",
"plugins.weixinName": "微信",
"plugins.weixinDesc": "接入微信消息频道,让 AI 助手处理微信消息",
"plugins.channelLogin": "频道登录",
"plugins.channelLoginDesc": "扫描二维码登录微信,登录后 AI 助手可以接收和处理微信消息。",
Expand Down Expand Up @@ -182,6 +182,7 @@ export default {
"settings.back": "返回",
"settings.title": "设置",
"settings.general": "通用",
"settings.application": "应用",
"settings.language": "语言",
"settings.autoStart": "开机自启",
"settings.startMinimized": "启动时最小化到托盘",
Expand Down Expand Up @@ -220,9 +221,8 @@ export default {
"settings.notInstalled": "未安装",
"settings.noManagedSkills": "暂无托管技能",
"settings.noCustomSkills": "暂无自定义技能",
"settings.workspace": "工作区",
"settings.dataDir": "数据目录",
"settings.gatewayPort": "网关端口",
"settings.connectionStatus": "连接状态",
"settings.status": "状态",
"settings.privacy": "数据与隐私",
"settings.privacyProtection": "隐私防护",
"settings.privacyProtectionDesc": "控制 MicroClaw 在将数据发送给 AI 模型前如何处理你的敏感信息。",
Expand Down Expand Up @@ -329,13 +329,14 @@ export default {
"settings.menu.usage": "用量",
"settings.menu.models": "模型",
"settings.menu.skills": "技能",
"settings.menu.workspace": "工作区",
"settings.menu.gateway": "网关",
"settings.menu.channels": "频道",
"settings.menu.privacy": "隐私",
"settings.menu.security": "安全",
"settings.menu.about": "关于",
// Models & API
"settings.modelsAndApi": "模型与 API",
"settings.reconnect": "重新连接",
"settings.restart": "重启",
"settings.customModels": "自定义模型",
"settings.addCustomModel": "添加自定义模型",
"settings.currentSelection": "当前选中",
Expand All @@ -362,21 +363,18 @@ export default {
"settings.cancel": "取消",
"settings.add": "添加",
"settings.editCustomModel": "编辑自定义模型",
"settings.gatewayUrl": "网关地址",
"settings.connected": "已连接",
"settings.resetConnection": "重置连接",
"settings.port": "端口",
"settings.portDesc": "更改端口后网关将自动重启。如果默认端口被占用,系统将尝试使用相邻端口。",
"settings.webSearch": "联网搜索",
"settings.webSearch": "联网搜索提供商",
"settings.braveSearchApiKey": "Brave 搜索 API Key",
"settings.reasoningOffDesc": "推理关闭",
"settings.reasoningDesc": "推理 {level}",
"settings.modelNameRequired": "请填写模型名称",
"settings.baseUrlRequired": "请填写 Base URL",
"settings.modelNameExists": "已存在同名模型",
"settings.gatewayReconnecting": "正在重新连接网关…",
"settings.reconnectFailed": "重新连接失败: {error}",
"settings.connectionReset": "连接已重置",
"settings.gatewayRestarting": "正在重启网关…",
"settings.restartFailed": "重启失败: {error}",
"settings.invalidPort": "端口号无效",
"settings.portUpdated": "端口已更新,网关正在重启…",
"settings.portUpdateFailed": "操作失败: {error}",
Expand Down
3 changes: 1 addition & 2 deletions desktop/renderer/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ const router = createRouter({
},
{
path: "/phone",
name: "phone",
component: () => import("@/views/ChannelsView.vue"),
redirect: "/settings/channels",
},
],
});
Expand Down
73 changes: 49 additions & 24 deletions desktop/renderer/src/views/ChannelsView.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<template>
<div class="channels-view">
<div class="channels-view" :class="{ embedded }">
<div class="view-header">
<h2>{{ t("channels.title") }}</h2>
<p class="view-desc">{{ t("channels.desc") }}</p>
<h2 :class="{ 'settings-group-title': embedded }">{{ t("channels.title") }}</h2>
</div>

<!-- WeChat Plugin Card -->
Expand All @@ -13,7 +12,6 @@
</div>
<div class="plugin-info">
<div class="plugin-name">{{ t("plugins.weixinName") }}</div>
<div class="plugin-desc">{{ t("plugins.weixinDesc") }}</div>
</div>
<div class="plugin-toggle">
<el-switch v-model="weixinEnabled" :loading="toggling" @change="handleToggleEnabled" />
Expand Down Expand Up @@ -90,6 +88,7 @@
</div>
</div>
</div>
<p class="view-desc">{{ t("plugins.weixinDesc") }}</p>

<!-- Other channels -->
<div v-if="channelStore.channels.length" class="channel-grid">
Expand Down Expand Up @@ -118,6 +117,10 @@ import { t } from "@/i18n";
import weixinIcon from "@/assets/wechat.png";
import QRCode from "qrcode";

withDefaults(defineProps<{ embedded?: boolean }>(), {
embedded: false,
});

const router = useRouter();
const channelStore = useChannelStore();
const chatStore = useChatStore();
Expand Down Expand Up @@ -415,6 +418,14 @@ function goToWeixinChat() {
overflow-y: auto;
padding: 24px 32px;
max-width: 720px;
font-family: inherit;
}

.channels-view.embedded {
height: auto;
overflow: visible;
padding: 0;
max-width: none;
}

.view-header {
Expand All @@ -426,15 +437,26 @@ function goToWeixinChat() {
font-weight: 600;
}

.view-desc {
.view-header h2.settings-group-title {
margin: 0;
padding-left: 4px;
font-size: 11px;
font-weight: 600;
color: var(--text-secondary);
font-size: 13px;
margin-top: 4px;
text-transform: uppercase;
letter-spacing: 0.07em;
}

.view-desc {
color: var(--text-muted);
font-size: 12px;
margin: -14px 0 20px;
padding: 6px 4px 0;
}

/* Plugin card */
.plugin-card {
background: var(--bg-secondary);
background: var(--bg-grouped);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
Expand Down Expand Up @@ -472,15 +494,9 @@ function goToWeixinChat() {
}

.plugin-name {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
}

.plugin-desc {
font-size: 13px;
color: var(--text-secondary);
margin-top: 2px;
font-weight: 400;
color: var(--text-primary);
}

.plugin-toggle {
Expand All @@ -502,15 +518,16 @@ function goToWeixinChat() {
}

.plugin-section-title {
font-size: 14px;
font-weight: 600;
font-size: 13px;
font-weight: 400;
color: var(--text-primary);
margin-bottom: 4px;
}

.plugin-section-desc {
font-size: 13px;
color: var(--text-secondary);
font-size: 12px;
font-weight: 400;
color: var(--text-muted);
margin-bottom: 14px;
}

Expand Down Expand Up @@ -636,7 +653,7 @@ function goToWeixinChat() {
align-items: center;
gap: 16px;
padding: 16px;
background: var(--bg-secondary);
background: var(--bg-grouped);
border: 1px solid var(--border);
border-radius: 8px;
transition: border-color 0.15s;
Expand All @@ -662,15 +679,23 @@ function goToWeixinChat() {
}

.channel-name {
font-weight: 500;
font-size: 13px;
font-weight: 400;
color: var(--text-primary);
}

.channel-type {
font-size: 12px;
color: var(--text-muted);
font-size: 13px;
font-weight: 400;
color: var(--text-secondary);
margin-top: 2px;
}

.channels-view :deep(.el-button),
.channels-view :deep(.el-switch) {
font-family: inherit;
}

.channel-status {
font-size: 12px;
padding: 4px 10px;
Expand Down
Loading