From 18bba12ef14d6306700df42af5f9f94791df4c0e Mon Sep 17 00:00:00 2001 From: root Date: Sun, 26 Apr 2026 00:26:20 +0800 Subject: [PATCH] fix: replace user quick import dropdown with direct action buttons --- .../2026-04-26-user-quick-import-buttons.md | 33 ++++++++++++ web/html/user.html | 52 +++++++++---------- 2 files changed, 57 insertions(+), 28 deletions(-) create mode 100644 docs/Tasktracking/2026-04-26-user-quick-import-buttons.md diff --git a/docs/Tasktracking/2026-04-26-user-quick-import-buttons.md b/docs/Tasktracking/2026-04-26-user-quick-import-buttons.md new file mode 100644 index 00000000..1b63d5cf --- /dev/null +++ b/docs/Tasktracking/2026-04-26-user-quick-import-buttons.md @@ -0,0 +1,33 @@ +Task Record: + +Date: 2026-04-26 +Related Module: web/html/user.html +Change Type: Fix + +Background + +The quick import entry on `/panel/user` was implemented as an Ant Design dropdown menu. In the current UI state, menu item text failed to display reliably unless SVG-related markup was manually removed, making the one-click import actions unusable. + +Changes + +Replaced the dropdown-based quick import block with an inline action section inside the existing card body. +Changed the quick import area to show a small title using `pages.user.quickImport`. +Added three dedicated buttons for Android, iOS, and Desktop that reuse the existing handlers: `quickImportAndroid`, `quickImportIOS`, and `quickImportDesktop`. +Removed obsolete dropdown-specific styles and added compact styles for the new button group layout. + +Impact + +Affected files: `web/html/user.html`. +No API, database, build pipeline, or backend logic changes. +User-panel behavior changed from "click dropdown then choose platform" to "direct platform buttons". +No upstream/downstream interface compatibility impact. + +Verification + +Command: `go test ./web/...` +Result: Passed. + +Risks And Follow-Up + +The change avoids dropdown/menu rendering paths and should be more robust for text visibility. +If further UX tuning is needed, spacing and button style can be adjusted without changing quick import logic. diff --git a/web/html/user.html b/web/html/user.html index 7a88ccdd..c10e4081 100644 --- a/web/html/user.html +++ b/web/html/user.html @@ -128,28 +128,21 @@ - + -
- - - {{ i18n "pages.user.quickImport" }} +
+
{{ i18n "pages.user.quickImport" }}
+ + + {{ i18n "pages.user.android" }} - - - - {{ i18n "pages.user.android" }} - - - - {{ i18n "pages.user.ios" }} - - - - {{ i18n "pages.user.desktop" }} - - - + + {{ i18n "pages.user.ios" }} + + + {{ i18n "pages.user.desktop" }} + +
@@ -300,17 +293,20 @@ .user-card .ant-card-body { padding: 16px; } - .user-quick-import-dropdown .ant-dropdown-menu { - min-width: 160px; + .quick-import-section { + text-align: left; } - .user-quick-import-dropdown .ant-dropdown-menu-item { + .quick-import-title { + margin-bottom: 12px; + font-size: 14px; + font-weight: 600; + } + .quick-import-actions { display: flex; - align-items: center; - column-gap: 8px; + width: 100%; } - .user-quick-import-dropdown .quick-import-icon { - width: 16px; - font-size: 16px; + .quick-import-actions .ant-space-item { + width: 100%; } {{ template "page/body_end" .}}