Files
maptool/views/index.erb
T
randy 37bc14f3ba
CI / check (push) Successful in 47s
CI / deploy (push) Successful in 27s
Show the deployed commit as a hover tooltip on the topbar brand
ASSET_VERSION only proves *a* deploy happened recently, not *which*
commit -- not enough to answer "did my push actually deploy, or am I
looking at a stale browser cache" (today's actual answer: neither --
deploy was current, a GeoJSON cache predating a code change was just
never invalidated, since it only checks the source .gpx's mtime).

The CI deploy job now writes REVISION (short SHA) before dropping
.git; app.rb reads it at boot, falling back to "dev" locally/in CI's
own check job where the file never exists.
2026-09-07 23:54:24 +02:00

70 lines
2.4 KiB
ERB

<div id="app">
<header class="topbar">
<span class="topbar__brand" title="rev <%= revision %>">MapTool</span>
<div class="topbar__auth">
<% if logged_in %>
<span><%= user %></span>
<a href="/logout">Log out</a>
<% else %>
<a href="/login">Log in</a>
<% end %>
</div>
</header>
<div class="app-body">
<nav id="sidebar" class="sidebar"></nav>
<div id="map"></div>
</div>
</div>
<div id="profile-panel" class="profile-panel" hidden>
<div class="profile-panel__header">
<strong class="profile-panel__title"></strong>
<span class="profile-panel__stats"></span>
<button type="button" class="profile-panel__close" aria-label="Close">&times;</button>
</div>
<div class="profile-panel__charts"></div>
</div>
<div id="basemap-panel" class="basemap-panel" hidden>
<div class="basemap-panel__header">
<strong>Base map</strong>
<button type="button" class="basemap-panel__close" aria-label="Close">&times;</button>
</div>
<div class="basemap-panel__list">
<button type="button" class="basemap-panel__option" data-style="online">
<span>Online</span>
<span class="basemap-panel__check">&check;</span>
</button>
<button type="button" class="basemap-panel__option" data-style="offline">
<span>Offline</span>
<span class="basemap-panel__check">&check;</span>
</button>
</div>
</div>
<div id="gpx-panel" class="gpx-panel" hidden>
<div class="gpx-panel__header">
<strong>Tracks</strong>
<div class="gpx-panel__actions">
<button type="button" class="gpx-panel__action" data-action="new-folder" title="New folder" aria-label="New folder"></button>
<button type="button" class="gpx-panel__action" data-action="upload" title="Upload GPX/FIT/GeoJSON file" aria-label="Upload GPX/FIT/GeoJSON file"></button>
<button type="button" class="gpx-panel__close" aria-label="Close">&times;</button>
</div>
</div>
<input type="file" class="gpx-file-input" accept=".gpx,.fit,.geojson,.zip" multiple hidden>
<p class="gpx-upload__status" hidden></p>
<div class="gpx-tree"></div>
<div class="gpx-legend" hidden></div>
</div>
<div id="livetrack-panel" class="basemap-panel" hidden>
<div class="basemap-panel__header">
<strong>LiveTrack sessions</strong>
<button type="button" class="basemap-panel__close" aria-label="Close">&times;</button>
</div>
<ul class="livetrack-panel__list"></ul>
</div>