Improved drag to import dialog

This commit is contained in:
patben8 committed 2026-10-17 22:53:37 +02:00
1 parent bf427a628e
commit 518542c7bb
15 files changed
+180 -35

No files matched your search

+5
View File
@@ -52,6 +52,11 @@ export type DragPayload =
/** What a playlist or export row takes: track rows, or files from the OS. */
export type TracksOrFiles = Exclude<DragPayload, { kind: 'node' }>
/** From outside the library: files from the OS, or a Files folder's or a
* device's rows — what has to be ADDED before a playlist can hold it. */
export const isForeign = (p: DragPayload): p is TracksOrFiles =>
p.kind === 'files' || (p.kind === 'tracks' && (p.origin === 'folder' || p.origin === 'device'))
export interface DropPoint {
x: number
y: number