From ec4b5ab46a1603ead7c509c09abd85af1ddf543a Mon Sep 17 00:00:00 2001 From: Supra4E8C Date: Wed, 17 Dec 2025 18:16:59 +0800 Subject: [PATCH] feat: add quick links section to System page --- src/components/ui/icons.tsx | 37 +++++++++++++++ src/i18n/locales/en.json | 10 +++- src/i18n/locales/zh-CN.json | 10 +++- src/pages/SystemPage.module.scss | 78 ++++++++++++++++++++++++++++++++ src/pages/SystemPage.tsx | 60 ++++++++++++++++++++++++ 5 files changed, 193 insertions(+), 2 deletions(-) diff --git a/src/components/ui/icons.tsx b/src/components/ui/icons.tsx index 90e81f2..f762c7e 100644 --- a/src/components/ui/icons.tsx +++ b/src/components/ui/icons.tsx @@ -266,3 +266,40 @@ export function IconDollarSign({ size = 20, ...props }: IconProps) { ); } + +export function IconGithub({ size = 20, ...props }: IconProps) { + return ( + + + + + ); +} + +export function IconExternalLink({ size = 20, ...props }: IconProps) { + return ( + + + + + + ); +} + +export function IconBookOpen({ size = 20, ...props }: IconProps) { + return ( + + + + + ); +} + +export function IconCode({ size = 20, ...props }: IconProps) { + return ( + + + + + ); +} diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 82e7ac9..3bb940d 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -630,7 +630,15 @@ "version_is_latest": "You are on the latest version", "version_check_error": "Update check failed", "version_current_missing": "Server version is unavailable; cannot compare", - "version_unknown": "Unknown" + "version_unknown": "Unknown", + "quick_links_title": "Quick Links", + "quick_links_desc": "Access project repositories and documentation for help and updates.", + "link_main_repo": "Main Repository", + "link_main_repo_desc": "CLI Proxy API core program source code", + "link_webui_repo": "WebUI Repository", + "link_webui_repo_desc": "Management Center frontend source code", + "link_docs": "Documentation", + "link_docs_desc": "Usage tutorials and configuration guides" }, "notification": { "debug_updated": "Debug settings updated", diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index cf79d57..257d11b 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -630,7 +630,15 @@ "version_is_latest": "当前已是最新版本", "version_check_error": "检查更新失败", "version_current_missing": "未获取到服务器版本号,暂无法比对", - "version_unknown": "未知" + "version_unknown": "未知", + "quick_links_title": "快捷链接", + "quick_links_desc": "访问项目仓库和文档,获取帮助和更新。", + "link_main_repo": "主程序仓库", + "link_main_repo_desc": "CLI Proxy API 核心程序源代码", + "link_webui_repo": "WebUI 仓库", + "link_webui_repo_desc": "管理中心前端界面源代码", + "link_docs": "使用教程", + "link_docs_desc": "配置指南和使用说明" }, "notification": { "debug_updated": "调试设置已更新", diff --git a/src/pages/SystemPage.module.scss b/src/pages/SystemPage.module.scss index 9ce9097..e5b72fd 100644 --- a/src/pages/SystemPage.module.scss +++ b/src/pages/SystemPage.module.scss @@ -135,3 +135,81 @@ } } } + +.quickLinks { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); + gap: $spacing-md; +} + +.linkCard { + display: flex; + align-items: center; + gap: $spacing-md; + padding: $spacing-md $spacing-lg; + background-color: var(--bg-secondary); + border: 1px solid var(--border-color); + border-radius: $radius-lg; + text-decoration: none; + color: inherit; + transition: all 0.2s ease; + + &:hover { + background-color: var(--bg-hover); + border-color: var(--primary-color); + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); + } + + &:active { + transform: translateY(0); + } +} + +.linkIcon { + display: flex; + align-items: center; + justify-content: center; + width: 44px; + height: 44px; + border-radius: $radius-md; + background-color: var(--primary-color); + color: white; + flex-shrink: 0; + + &.github { + background-color: #24292f; + } + + &.docs { + background-color: #10b981; + } +} + +.linkContent { + flex: 1; + min-width: 0; +} + +.linkTitle { + display: flex; + align-items: center; + gap: $spacing-xs; + font-size: 15px; + font-weight: 600; + color: var(--text-primary); + margin-bottom: 2px; + + svg { + opacity: 0.5; + flex-shrink: 0; + } +} + +.linkDesc { + font-size: 13px; + color: var(--text-secondary); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/src/pages/SystemPage.tsx b/src/pages/SystemPage.tsx index 2a4ec18..491bfe9 100644 --- a/src/pages/SystemPage.tsx +++ b/src/pages/SystemPage.tsx @@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Card } from '@/components/ui/Card'; import { Button } from '@/components/ui/Button'; +import { IconGithub, IconBookOpen, IconExternalLink, IconCode } from '@/components/ui/icons'; import { useAuthStore, useConfigStore, useNotificationStore, useModelsStore } from '@/stores'; import { apiKeysApi } from '@/services/api/apiKeys'; import { classifyModels } from '@/utils/models'; @@ -148,6 +149,65 @@ export function SystemPage() { + +

{t('system_info.quick_links_desc')}

+
+ +
+ +
+
+
+ {t('system_info.link_main_repo')} + +
+
{t('system_info.link_main_repo_desc')}
+
+
+ + +
+ +
+
+
+ {t('system_info.link_webui_repo')} + +
+
{t('system_info.link_webui_repo_desc')}
+
+
+ + +
+ +
+
+
+ {t('system_info.link_docs')} + +
+
{t('system_info.link_docs_desc')}
+
+
+
+
+