From e85c4e9d7c62fc9dcb04b2af6ef0d3267c2d4f14 Mon Sep 17 00:00:00 2001 From: ZenEcho Date: Tue, 17 Feb 2026 00:12:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BB=B6=E8=BF=9F?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=AD=98=E5=82=A8=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=BA=93=E4=B8=8E=E8=8A=82=E7=82=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 IndexedDB 存储用于记录节点延迟历史与游戏会话统计 - 重构游戏库状态管理,支持游戏加速时长跟踪与本地存储当前选中游戏 - 优化节点管理界面样式与交互,为删除操作添加危险按钮样式 - 修复游戏库视图中的类型安全与可选 ID 处理问题 - 更新主题配色方案与 CSS 变量,改进深色模式视觉效果 - 移除已弃用的类型定义文件,统一使用新的类型导出结构 - 新增 .editorconfig 与 .gitattributes 文件以统一代码风格与行尾设置 - 调整构建配置,将自动导入类型定义移至专用目录 --- .editorconfig | 12 ++ .gitattributes | 1 + .gitignore | 1 + CHANGELOG.md | 10 - src/App.vue | 19 +- src/{ => autoImport}/auto-imports.d.ts | 0 src/{ => autoImport}/components.d.ts | 20 +- src/components/dashboard/LatencyChart.vue | 137 +++++++++----- .../{node => dashboard}/NodeSelector.vue | 0 .../library/AdvancedConfigEditor.vue | 171 +++++++----------- src/components/library/CategoryManager.vue | 61 ++----- src/components/library/GameEditModal.vue | 50 ++--- src/components/node/NodeEditModal.vue | 82 +++------ src/components/node/NodeManager.vue | 6 +- src/layouts/MainLayout.vue | 8 - src/main.ts | 5 + src/stores/games.ts | 64 ++++--- src/stores/nodes.ts | 49 ++++- src/style.css | 48 +++++ src/styles/themes.css | 156 ++++++++-------- src/types.d.ts | 113 ------------ src/types/index.ts | 25 +++ src/utils/latency-session.ts | 138 ++++++++++++++ src/views/dashboard/index.vue | 167 ++++++++++++----- src/views/library/index.vue | 26 +-- src/vite-env.d.ts | 38 ++++ vite.config.ts | 4 +- 27 files changed, 809 insertions(+), 602 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes delete mode 100644 CHANGELOG.md rename src/{ => autoImport}/auto-imports.d.ts (100%) rename src/{ => autoImport}/components.d.ts (59%) rename src/components/{node => dashboard}/NodeSelector.vue (100%) delete mode 100644 src/types.d.ts create mode 100644 src/types/index.ts create mode 100644 src/utils/latency-session.ts diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1014ba7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.gitignore b/.gitignore index 13558d9..2c3cc61 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ coverage node_modules dist dist-ssr +dist-electron *.local .lagzero-dev # Editor directories and files diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index d24705a..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -# Changelog - -## [0.1.0] - 2026-02-09 -### Added -- Initial release of LagZero. -- Core: sing-box integration with start/stop/restart support. -- UI: Dashboard with real-time latency chart and node management. -- UI: Rule editor with Routing and IP Rule modes. -- Protocol: Support for VMess, VLESS, Shadowsocks parsing. -- CI: GitHub Actions for cross-platform build and release. diff --git a/src/App.vue b/src/App.vue index d2f663a..1443541 100644 --- a/src/App.vue +++ b/src/App.vue @@ -31,14 +31,14 @@ const themeColors: Record(() => { const color = themeColors[themeColor.value] || themeColors.green - + const common = { primaryColor: color.primary, primaryColorHover: color.hover, primaryColorPressed: color.pressed, primaryColorSuppl: color.hover, } - + return { common, Button: { @@ -51,12 +51,21 @@ const themeOverrides = computed(() => { colorHoverPrimary: color.hover, colorPressedPrimary: color.pressed, colorFocusPrimary: color.hover, - colorDisabledPrimary: color.primary, // Use opacity for disabled state usually handled by component, but color needs to be set + colorDisabledPrimary: color.primary, borderPrimary: `1px solid ${color.primary}`, borderHoverPrimary: `1px solid ${color.hover}`, borderPressedPrimary: `1px solid ${color.pressed}`, borderFocusPrimary: `1px solid ${color.hover}`, borderDisabledPrimary: `1px solid ${color.primary}`, + // Also ensure error/warning buttons have white text + textColorError: '#ffffff', + textColorHoverError: '#ffffff', + textColorPressedError: '#ffffff', + textColorFocusError: '#ffffff', + textColorWarning: '#ffffff', + textColorHoverWarning: '#ffffff', + textColorPressedWarning: '#ffffff', + textColorFocusWarning: '#ffffff', } } }) @@ -65,7 +74,9 @@ const themeOverrides = computed(() => {