Consolidate original/GeoJSON download into one menu button
The file name doubling as a GeoJSON-only download link was easy to miss as a link at all, and only ever covered half of what's actually downloadable. One button next to delete now opens a small menu (Original file / GeoJSON) instead -- costs a click when downloading several files in a row, but both formats are reachable from one, discoverable place. Only one menu open at a time, closed on any outside click. Verified in a real browser: opens with both items, closes on outside click, no console errors.
This commit is contained in:
1 parent
45567fc520
commit
1b4463a3c1
3 files changed
+149
-62
No files matched your search
@@ -379,11 +379,20 @@ html, body {
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.gpx-tree__download-wrapper {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.gpx-tree__download {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
border: none;
|
||||
background: none;
|
||||
color: #999;
|
||||
padding: 0 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.gpx-tree__download svg {
|
||||
@@ -395,6 +404,38 @@ html, body {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.gpx-tree__download-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
z-index: 20;
|
||||
min-width: max-content;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
padding: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.gpx-tree__download-menu[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.gpx-tree__download-menu-item {
|
||||
display: block;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.gpx-tree__download-menu-item:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
.gpx-tree__delete {
|
||||
flex-shrink: 0;
|
||||
border: none;
|
||||
|
||||
Reference in new issue
Block a user