mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-22 03:02:20 +00:00
refactor(street-level): the panel cuts deferred until the new sources landed
HAL-530 left five panel cuts until Street View, KartaView and Panoramax were in: - SINCE is a select of the nine windows instead of a slider with its own thumb-sync code; a link's day count between them gets its own option and the tooltip names the cut-off date. - IMAGERY and FIT/FILL are toggle buttons (aria-pressed), each a tab stop, instead of ARIA radiogroups with roving tabindex and arrow-key handling. - The panel opens by itself only when a photo opens (a map or line click would load it out of sight); a switch-on no longer opens it, so the enable-origin subscription goes. - Clean View, recording and the cockpit call shrinkViewer() as they hide the panels, instead of a MutationObserver on <body> classes. - FIT/FILL stays (three providers use it) but is no longer kept in localStorage: each session starts at FIT. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
d983ef23d8
commit
bdf3848dbc
12 files changed
+203
-238
No files matched your search
@@ -35,7 +35,14 @@ export function sinceStopIndex(days) {
|
||||
function presentSince(days, now) {
|
||||
const value = Number(days) || 0;
|
||||
const index = sinceStopIndex(value);
|
||||
if (value <= 0) return { index, days: 0, label: t('ANY DATE') };
|
||||
if (value <= 0)
|
||||
return {
|
||||
index,
|
||||
days: 0,
|
||||
exact: true,
|
||||
window: t('ANY DATE'),
|
||||
label: t('ANY DATE'),
|
||||
};
|
||||
const stop = SINCE_STOPS[index];
|
||||
const window =
|
||||
stop.days === value
|
||||
@@ -44,6 +51,9 @@ function presentSince(days, now) {
|
||||
return {
|
||||
index,
|
||||
days: value,
|
||||
/** One of SINCE_STOPS; a link may carry any other day count. */
|
||||
exact: stop.days === value,
|
||||
window,
|
||||
label: t('{window} · SINCE {date}', {
|
||||
window,
|
||||
date: formatDate(now - value * DAY_MS),
|
||||
|
||||
Reference in new issue
Block a user