diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 136c6b9..9077b9a 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -38,27 +38,49 @@ CGO_ENABLED=0 GOOS=android GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o . ## 3. WebUI 开发 -WebUI 负责所有可视化配置与状态显示。 +WebUI 是 Vue 3 + Vite 单页应用,UI 基于 **Material Design 3**(`@material/web` 组件 + 自有 MD3 token)。 + +### 目录结构 + +``` +webui/src/ + mwc.js @material/web 按需引入清单(唯一入口,勿在别处 import) + theme/tokens.css MD3 令牌:颜色全角色 / 字阶 / 形状 / 动效 / 状态层 + theme/base.css 字体、重置、insets、缩放、排版与表面工具类 + theme/components.css 跨视图模式(设置行、状态徽标、折叠区、状态网格、列表行) + theme/app.css 壳层布局(顶栏、页面轨、导航栏、操作锁横幅、snackbar) + api/ksu.js exec 封装 + shellQuote + 开发环境 mock + api/luminpro.js Go JSON API 客户端 + composables/ useStatus / useConfig / useLog / useApps / useSnackbar + components/ 顶栏、导航栏、对话框、菜单、snackbar、操作锁横幅 + views/ 状态 / 配置 / 黑名单 / 日志 / 关于(样式写在各自的 diff --git a/webui/src/components/OpLockBanner.vue b/webui/src/components/OpLockBanner.vue new file mode 100644 index 0000000..251b2f7 --- /dev/null +++ b/webui/src/components/OpLockBanner.vue @@ -0,0 +1,17 @@ + + + diff --git a/webui/src/components/PromptDialog.vue b/webui/src/components/PromptDialog.vue new file mode 100644 index 0000000..d8dc531 --- /dev/null +++ b/webui/src/components/PromptDialog.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/webui/src/components/SnackbarHost.vue b/webui/src/components/SnackbarHost.vue new file mode 100644 index 0000000..97fd6fc --- /dev/null +++ b/webui/src/components/SnackbarHost.vue @@ -0,0 +1,15 @@ + + + diff --git a/webui/src/components/ui/Badge.vue b/webui/src/components/ui/Badge.vue deleted file mode 100644 index c08a6b0..0000000 --- a/webui/src/components/ui/Badge.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/webui/src/components/ui/Button.vue b/webui/src/components/ui/Button.vue deleted file mode 100644 index b0b5170..0000000 --- a/webui/src/components/ui/Button.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/webui/src/components/ui/Card.vue b/webui/src/components/ui/Card.vue deleted file mode 100644 index 3e69509..0000000 --- a/webui/src/components/ui/Card.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/webui/src/components/ui/Input.vue b/webui/src/components/ui/Input.vue deleted file mode 100644 index bb4aa74..0000000 --- a/webui/src/components/ui/Input.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/webui/src/components/ui/Label.vue b/webui/src/components/ui/Label.vue deleted file mode 100644 index ce49f42..0000000 --- a/webui/src/components/ui/Label.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/webui/src/components/ui/Separator.vue b/webui/src/components/ui/Separator.vue deleted file mode 100644 index ff4bb30..0000000 --- a/webui/src/components/ui/Separator.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/webui/src/components/ui/Switch.vue b/webui/src/components/ui/Switch.vue deleted file mode 100644 index 091c64c..0000000 --- a/webui/src/components/ui/Switch.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/webui/src/components/ui/Textarea.vue b/webui/src/components/ui/Textarea.vue deleted file mode 100644 index d16e7fc..0000000 --- a/webui/src/components/ui/Textarea.vue +++ /dev/null @@ -1,30 +0,0 @@ - - -