diff --git a/web/backend/api/channels.go b/web/backend/api/channels.go index 162ef04f2..550c1b900 100644 --- a/web/backend/api/channels.go +++ b/web/backend/api/channels.go @@ -167,8 +167,9 @@ func isValidChannel(name string) bool { } // extractChannelInfo returns enabled, configured status and masked config for a channel. -func extractChannelInfo(name string, ch *config.ChannelsConfig) (enabled, configured bool, cfg map[string]any) { - cfg = make(map[string]any) +func extractChannelInfo(name string, ch *config.ChannelsConfig) (bool, bool, map[string]any) { + var enabled, configured bool + cfg := make(map[string]any) switch name { case "telegram": c := ch.Telegram @@ -320,7 +321,7 @@ func extractChannelInfo(name string, ch *config.ChannelsConfig) (enabled, config cfg["port"] = c.Port cfg["allow_from"] = []string(c.AllowFrom) } - return + return enabled, configured, cfg } // setChannelEnabled sets the enabled flag for a channel. diff --git a/web/frontend/src/components/app-sidebar.tsx b/web/frontend/src/components/app-sidebar.tsx index 41fd548fa..8d302e020 100644 --- a/web/frontend/src/components/app-sidebar.tsx +++ b/web/frontend/src/components/app-sidebar.tsx @@ -44,10 +44,16 @@ const navGroups = [ ], }, { - label: "navigation.services", + label: "navigation.channels_group", defaultOpen: true, items: [ { title: "navigation.channels", url: "/channels", icon: IconPlug }, + ], + }, + { + label: "navigation.services", + defaultOpen: true, + items: [ { title: "navigation.config", url: "/config", icon: IconSettings }, { title: "navigation.logs", url: "/logs", icon: IconListDetails }, ], diff --git a/web/frontend/src/components/channels/edit-channel-sheet.tsx b/web/frontend/src/components/channels/edit-channel-sheet.tsx index ae079b174..4337ba99d 100644 --- a/web/frontend/src/components/channels/edit-channel-sheet.tsx +++ b/web/frontend/src/components/channels/edit-channel-sheet.tsx @@ -176,7 +176,7 @@ export function EditChannelSheet({ -
{serverError}
diff --git a/web/frontend/src/i18n/locales/en.json b/web/frontend/src/i18n/locales/en.json index 475a2c096..1b71454d8 100644 --- a/web/frontend/src/i18n/locales/en.json +++ b/web/frontend/src/i18n/locales/en.json @@ -5,6 +5,7 @@ "models": "Models", "credentials": "Credentials", "services": "Services", + "channels_group": "Channels", "channels": "Channels", "config": "Config", "logs": "Logs" diff --git a/web/frontend/src/i18n/locales/zh.json b/web/frontend/src/i18n/locales/zh.json index f2d0384e1..4a1da3f4b 100644 --- a/web/frontend/src/i18n/locales/zh.json +++ b/web/frontend/src/i18n/locales/zh.json @@ -5,6 +5,7 @@ "models": "模型", "credentials": "凭据", "services": "服务", + "channels_group": "频道", "channels": "频道", "config": "配置", "logs": "日志"