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).
22 lines
644 B
ERB
22 lines
644 B
ERB
<div id="map"></div>
|
|
|
|
<div id="gpx-panel" class="gpx-panel" hidden>
|
|
<div class="gpx-panel__header">
|
|
<strong>GPX</strong>
|
|
<button type="button" class="gpx-panel__close" aria-label="Close">×</button>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|