+ {/* Header */}
+
+
+ K
+
+
+
+ Select your Traktor collection
+
+
+ Choose a collection.nml file to open.
+
+
+ {onCancel && (
+
+ )}
+
+
+ {/* Path bar */}
+
+
+
+
+ {data?.path ?? 'Loading…'}
+
+
+
+ {/* Listing */}
+
+ {listing.isLoading &&
Loading…
}
+ {data && data.dirs.length === 0 && data.files.length === 0 && (
+
No folders or .nml files here.
+ )}
+ {data?.dirs.map((d) => (
+
+ ))}
+ {data?.files.map((f) => (
+
+ ))}
+
+
+ {/* Manual path + errors */}
+
+ {open.isError && (
+
+ {(open.error as Error).message}
+
+ )}
+
+ setManual(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && manual.trim()) open.mutate(manual.trim())
+ }}
+ placeholder="…or paste a full path to collection.nml"
+ className="min-w-0 flex-1 rounded-md border border-line bg-ink-850 px-3 py-2 font-mono text-xs text-text outline-none placeholder:text-faint focus:border-accent"
+ />
+
+
+
+