Add GPX drag & drop, folder management, delete, and folder-first sort
Uploading is now drag & drop (or click to browse) instead of a form; folders can be created any time, not just during upload; files can be dragged onto a folder to move them, or dropped elsewhere in the tree to move back to the top level; files and folders can be deleted. Both drag sources (an OS file drag and dragging an existing tree entry) land on the same drop targets, told apart by a custom drag payload type versus the browser's own "Files" type. Also sort folders before files in the tree (previously interleaved alphabetically).
This commit is contained in:
1 parent
4e0d2abbd0
commit
d813dd0b20
6 files changed
+440
-66
No files matched your search
+9
-5
@@ -6,11 +6,15 @@
|
||||
<button type="button" class="gpx-panel__close" aria-label="Close">×</button>
|
||||
</div>
|
||||
|
||||
<form class="gpx-upload">
|
||||
<input type="file" name="file" accept=".gpx" required>
|
||||
<input type="text" name="folder" placeholder="folder/subfolder (optional)">
|
||||
<button type="submit">Upload</button>
|
||||
<p class="gpx-upload__status" hidden></p>
|
||||
<div class="gpx-dropzone">
|
||||
Drop .gpx files here, or click to browse
|
||||
<input type="file" class="gpx-dropzone__input" accept=".gpx" multiple hidden>
|
||||
</div>
|
||||
<p class="gpx-upload__status" hidden></p>
|
||||
|
||||
<form class="gpx-new-folder">
|
||||
<input type="text" name="path" placeholder="new folder path (e.g. Hiking/2026)">
|
||||
<button type="submit">+ folder</button>
|
||||
</form>
|
||||
|
||||
<div class="gpx-tree"></div>
|
||||
|
||||
Reference in new issue
Block a user