From 22d518b5c9665fda68f9ab94bfc70f8034af2f9a Mon Sep 17 00:00:00 2001 From: root Date: Sun, 26 Apr 2026 00:09:37 +0800 Subject: [PATCH] fix: show user quick import dropdown --- ...26-04-26-fix-user-quick-import-dropdown.md | 31 +++++++++++++++++++ web/html/user.html | 22 ++++++++++--- 2 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 docs/Tasktracking/2026-04-26-fix-user-quick-import-dropdown.md diff --git a/docs/Tasktracking/2026-04-26-fix-user-quick-import-dropdown.md b/docs/Tasktracking/2026-04-26-fix-user-quick-import-dropdown.md new file mode 100644 index 00000000..e17c27a9 --- /dev/null +++ b/docs/Tasktracking/2026-04-26-fix-user-quick-import-dropdown.md @@ -0,0 +1,31 @@ +Task Record: Fix User Quick Import Dropdown + +Date: 2026-04-26 +Related Module: User panel +Change Type: Fix + +Background + +The `/panel/user` quick import dropdown had three menu entries for Android, iOS, and Desktop. The entries were clickable, but the frontend did not render them visibly in the dropdown. + +Changes + +Updated the quick import dropdown menu to use Ant Design Vue's menu `theme` prop instead of applying the current theme as a plain CSS class. +Added a dedicated dropdown overlay class so the detached popup layer can inherit page theme styles. +Added scoped sizing and alignment styles for the quick import menu icons and items. + +Impact + +Affected file: `web/html/user.html`. +No API, database, configuration, build, or compatibility changes were made. +The existing Android, iOS, and Desktop click handlers are unchanged. + +Verification + +Ran `go test ./web/...`; it failed because the default Go build cache path `/root/.cache/go-build` is read-only in this environment. +Ran `GOCACHE=/tmp/go-build go test ./web/...`; it passed. +No local browser runtime verification was performed, following the project constraint to avoid local panel startup and integration runs. + +Risks And Follow-Up + +The fix targets the dropdown rendering path only. A remote browser check on `/panel/user` is recommended after deployment to confirm the dropdown is visible in both light and dark themes. diff --git a/web/html/user.html b/web/html/user.html index ccfd492d..7a88ccdd 100644 --- a/web/html/user.html +++ b/web/html/user.html @@ -131,21 +131,21 @@
- + {{ i18n "pages.user.quickImport" }} - + - + {{ i18n "pages.user.android" }} - + {{ i18n "pages.user.ios" }} - + {{ i18n "pages.user.desktop" }} @@ -300,5 +300,17 @@ .user-card .ant-card-body { padding: 16px; } + .user-quick-import-dropdown .ant-dropdown-menu { + min-width: 160px; + } + .user-quick-import-dropdown .ant-dropdown-menu-item { + display: flex; + align-items: center; + column-gap: 8px; + } + .user-quick-import-dropdown .quick-import-icon { + width: 16px; + font-size: 16px; + } {{ template "page/body_end" .}}