From 81c028949bee458c0275ce3de4df370e9ee240ab Mon Sep 17 00:00:00 2001 From: oliver Date: Fri, 5 Jun 2026 15:00:01 +0800 Subject: [PATCH] ui(managed-ne): replace import hint with help popover Move bulk import and bastion/jump notes into a toolbar help popover to keep the action bar clean. Co-authored-by: Cursor --- web/src/components/HelpHint.tsx | 5 +- web/src/i18n/en.ts | 17 +++- web/src/i18n/zh.ts | 16 +++- web/src/index.css | 14 ++++ web/src/pages/NePage.tsx | 140 ++++++++++++++++---------------- 5 files changed, 114 insertions(+), 78 deletions(-) diff --git a/web/src/components/HelpHint.tsx b/web/src/components/HelpHint.tsx index b7f0c3b..211e328 100644 --- a/web/src/components/HelpHint.tsx +++ b/web/src/components/HelpHint.tsx @@ -3,9 +3,10 @@ import { useEffect, useRef, useState } from "react"; type Props = { text: string; ariaLabel: string; + align?: "start" | "end"; }; -export function HelpHint({ text, ariaLabel }: Props) { +export function HelpHint({ text, ariaLabel, align = "start" }: Props) { const [open, setOpen] = useState(false); const rootRef = useRef(null); @@ -26,7 +27,7 @@ export function HelpHint({ text, ariaLabel }: Props) { }, [open]); return ( - + - - - {t("managedNe.importHint")} - { - const file = e.target.files?.[0]; - e.target.value = ""; - if (file) importMutation.mutate(file); - }} - /> - - - - +
+
+ + + + { + const file = e.target.files?.[0]; + e.target.value = ""; + if (file) importMutation.mutate(file); + }} + /> + + + + +
+
@@ -643,7 +646,6 @@ export function NePage() { value={form.password} onChange={(e) => setForm({ ...form, password: e.target.value })} /> - {t("managedNe.form.passwordHint")}