From 66bfde575d973fea9fb26139af421ab5b18c5bea Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 3 Jan 2026 00:03:54 +0900 Subject: feat(import): display expected CSV format dynamically per note type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show actual note types and their fields in the expected format section instead of a hardcoded example. Fields are sorted by order. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/client/components/ImportNotesModal.tsx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/client/components/ImportNotesModal.tsx') diff --git a/src/client/components/ImportNotesModal.tsx b/src/client/components/ImportNotesModal.tsx index 2eb0922..d3a2c0c 100644 --- a/src/client/components/ImportNotesModal.tsx +++ b/src/client/components/ImportNotesModal.tsx @@ -313,11 +313,25 @@ export function ImportNotesModal({

Expected format:

- - note_type,Front,Back -
- Basic,hello,world -
+ {noteTypes.length === 0 ? ( +

Loading note types...

+ ) : ( +
+ {noteTypes.map((nt) => { + const sortedFields = [...nt.fields].sort( + (a, b) => a.order - b.order, + ); + const fieldNames = sortedFields.map((f) => f.name); + return ( + + note_type,{fieldNames.join(",")} +
+ {nt.name},{fieldNames.map(() => "...").join(",")} +
+ ); + })} +
+ )}
)} -- cgit v1.2.3-70-g09d2