feat: add gateway management features and settings

- Implemented new API routes for handling logs and settings related to the gateway.
- Added a new Gateway section in the General Settings panel to manage gateway status and auto-start options.
- Introduced a state management hook for gateway settings, including status, logs, and auto-start functionality.
- Updated configuration service to include gateway auto-start setting.
- Enhanced internationalization support for new gateway-related messages.
- Refactored existing settings store to accommodate new gateway settings.
- Cleaned up code and improved logging functionality.
This commit is contained in:
duanshuwen
2026-04-20 22:22:11 +08:00
parent f7f4ffaee9
commit dfef9c90a5
18 changed files with 1139 additions and 15 deletions

View File

@@ -431,6 +431,20 @@ export const messages: I18nMessages = {
description: 'Customize the look and feel of the application.',
themeSection: 'Theme Settings',
languageSection: 'Language',
gatewayTitle: 'Gateway',
gatewayDescription: 'View the current Gateway state and basic runtime controls.',
gatewayStatusLabel: 'Status',
gatewayPortLabel: 'Port',
gatewayConnected: 'Running',
gatewayDisconnected: 'Stopped',
gatewayReconnecting: 'Restarting',
gatewayRestart: 'Restart',
gatewayLogs: 'Logs',
gatewayHideLogs: 'Hide Logs',
gatewayLogsEmpty: 'No logs available yet.',
gatewayLogsLoading: 'Loading logs...',
gatewayAutoStartTitle: 'Auto-start Gateway',
gatewayAutoStartDescription: 'Start the Gateway automatically when the app launches',
updatesTitle: 'Updates',
currentVersion: 'Current Version',
checkForUpdates: 'Check for Updates',
@@ -893,6 +907,20 @@ export const messages: I18nMessages = {
description: '自定义应用的外观与使用体验。',
themeSection: '主题设置',
languageSection: '语言',
gatewayTitle: '网关',
gatewayDescription: '查看当前网关状态与基础运行控制。',
gatewayStatusLabel: '状态',
gatewayPortLabel: '端口',
gatewayConnected: '运行中',
gatewayDisconnected: '已停止',
gatewayReconnecting: '重启中',
gatewayRestart: '重启',
gatewayLogs: '日志',
gatewayHideLogs: '收起日志',
gatewayLogsEmpty: '暂无日志内容。',
gatewayLogsLoading: '正在加载日志...',
gatewayAutoStartTitle: '自动启动网关',
gatewayAutoStartDescription: '应用启动时自动启动网关',
updatesTitle: '版本更新',
currentVersion: '当前版本',
checkForUpdates: '检查更新',
@@ -1355,6 +1383,20 @@ export const messages: I18nMessages = {
description: 'アプリの見た目と操作感をカスタマイズします。',
themeSection: 'テーマ設定',
languageSection: '言語',
gatewayTitle: 'ゲートウェイ',
gatewayDescription: '現在のゲートウェイ状態と基本的なランタイム操作を確認します。',
gatewayStatusLabel: '状態',
gatewayPortLabel: 'ポート',
gatewayConnected: '稼働中',
gatewayDisconnected: '停止中',
gatewayReconnecting: '再起動中',
gatewayRestart: '再起動',
gatewayLogs: 'ログ',
gatewayHideLogs: 'ログを閉じる',
gatewayLogsEmpty: 'まだログはありません。',
gatewayLogsLoading: 'ログを読み込み中...',
gatewayAutoStartTitle: 'ゲートウェイを自動起動',
gatewayAutoStartDescription: 'アプリ起動時にゲートウェイを自動起動します',
updatesTitle: 'アップデート',
currentVersion: '現在のバージョン',
checkForUpdates: '更新を確認',