diff --git a/mateclaw-server/src/main/java/vip/mate/channel/controller/ChannelController.java b/mateclaw-server/src/main/java/vip/mate/channel/controller/ChannelController.java index 6792b8c0..6eb790ce 100644 --- a/mateclaw-server/src/main/java/vip/mate/channel/controller/ChannelController.java +++ b/mateclaw-server/src/main/java/vip/mate/channel/controller/ChannelController.java @@ -69,6 +69,10 @@ public class ChannelController { @RequestBody ChannelEntity channel) { channel.setWorkspaceId(workspaceId != null ? workspaceId : 1L); ChannelEntity created = channelService.createChannel(channel); + // 创建后如果渠道已启用,自动启动(与 toggle 行为对齐) + if (Boolean.TRUE.equals(created.getEnabled())) { + channelManager.startChannel(created); + } auditEventService.record("CREATE", "CHANNEL", String.valueOf(created.getId()), created.getName(), null); return R.ok(created); } diff --git a/mateclaw-ui/src/i18n/locales/en-US.ts b/mateclaw-ui/src/i18n/locales/en-US.ts index 518e6d20..ee86db89 100644 --- a/mateclaw-ui/src/i18n/locales/en-US.ts +++ b/mateclaw-ui/src/i18n/locales/en-US.ts @@ -1307,6 +1307,7 @@ export default { weixin: { authHint: 'Click the button below to get a WeChat login QR code. After scanning with WeChat, the Bot Token will be automatically filled in. Requires iLink Bot beta access.', qrcodeButton: 'Get Login QR Code', + rescanButton: 'Re-scan (replaces current account)', qrcodeLoading: 'Fetching...', qrcodeFailed: 'Failed to get QR code. Please check your network.', qrcodeExpired: 'QR code expired. Please get a new one.', @@ -1316,6 +1317,9 @@ export default { confirmed: 'Login successful', expired: 'QR code expired', loginSuccess: 'WeChat login successful, token has been filled in', + replaceWarning: 'Re-scanning will replace the currently bound WeChat account. To bind an additional account, click the button below to add a new channel.', + addNewAccount: 'Bind New WeChat Account (Add Channel)', + newAccountName: 'WeChat', }, wecom: { authHint: 'Click the button to open a WeChat Work QR code window. After scanning, the Bot ID and Secret will be automatically filled in.', diff --git a/mateclaw-ui/src/i18n/locales/zh-CN.ts b/mateclaw-ui/src/i18n/locales/zh-CN.ts index 5f1db64e..151300ec 100644 --- a/mateclaw-ui/src/i18n/locales/zh-CN.ts +++ b/mateclaw-ui/src/i18n/locales/zh-CN.ts @@ -1317,6 +1317,7 @@ export default { weixin: { authHint: '点击下方按钮获取微信登录二维码,使用微信扫一扫确认后 Bot Token 将自动填入。需要 iLink Bot 内测资格。', qrcodeButton: '获取登录二维码', + rescanButton: '重新扫码(将替换当前账号)', qrcodeLoading: '正在获取...', qrcodeFailed: '获取二维码失败,请检查网络连接', qrcodeExpired: '二维码已过期,请重新获取', @@ -1326,6 +1327,9 @@ export default { confirmed: '登录成功', expired: '二维码已过期', loginSuccess: '微信扫码登录成功,Token 已自动填入', + replaceWarning: '重新扫码将替换当前绑定的微信账号。如需绑定额外的微信账号,请点击下方按钮添加新渠道。', + addNewAccount: '绑定新微信账号(添加新渠道)', + newAccountName: '微信', }, wecom: { authHint: '点击按钮后会弹出企业微信二维码窗口,使用企业微信扫码确认后 Bot ID 与 Secret 将自动填入。', diff --git a/mateclaw-ui/src/views/Channels.vue b/mateclaw-ui/src/views/Channels.vue index 26bb8115..89415cd0 100644 --- a/mateclaw-ui/src/views/Channels.vue +++ b/mateclaw-ui/src/views/Channels.vue @@ -171,6 +171,16 @@
{{ t('channels.weixin.authHint') }}
+ +⚠️ {{ t('channels.weixin.replaceWarning') }}
+ +