Merge main into feat/shipwrecks

Main added the News layer at the same places: both layers are kept in the
layer names, panel order (News stays last of Events), standalone sources,
voice manifest, credits, DATA_SOURCES and the CURRENT-STATE table. News took
share-link token 00 first, so Shipwrecks moves to 01 (ledger, registry,
CURRENT-STATE and the token tests). The catalog now has 40 layers and the
share-link registry 38. Shipwreck strings are added to the new Hebrew
catalog; the other catalogs keep both sides' strings.
This commit is contained in:
Sameh Khamis committed 2026-11-10 14:03:39 -08:00
commit 8ff22f1a12
466 files changed
+57748 -1865

No files matched your search

+26 -3
View File
@@ -11,14 +11,18 @@ import {
} from './layerNames.js';
export { localizeLayerName } from './layerNames.js';
import { createWeatherPanel } from './weatherPanel.js';
import { translateFeedError, translateStatusLine } from './statusText.js';
import { createNewsPanel } from './newsPanel.js';
import {
translateFeedError,
translateStatusLine,
translateStatusMessage,
} from './statusText.js';
import {
formatNumber,
getLocale,
msg,
onLocaleChange,
t,
translateKnown,
} from '../i18n/index.js';
// Feed-state values are machine ids (QA hooks, CSS feed-* classes); only the
@@ -79,6 +83,7 @@ const PANEL_GROUPS = [
'gnss-integrity',
's2-ghostmaps',
'shipwrecks',
'news',
],
},
{
@@ -315,6 +320,11 @@ export class LayerPanel {
container?.ownerDocument?.getElementById?.('weather-panel-body'),
setLayerParams: this.setLayerParams,
});
this._newsPanel?.destroy();
this._newsPanel = createNewsPanel({
container: container?.ownerDocument?.getElementById?.('news-panel-body'),
setLayerParams: this.setLayerParams,
});
this._mountRecentImagery();
this._renderToggles();
}
@@ -350,6 +360,8 @@ export class LayerPanel {
this._releaseBindings();
this._weatherPanel?.destroy();
this._weatherPanel = null;
this._newsPanel?.destroy();
this._newsPanel = null;
this._recentImageryPanel?.destroy();
this._recentImageryPanel = null;
this._recentImageryFactory = null;
@@ -414,10 +426,12 @@ export class LayerPanel {
onLocaleChange(() => {
this._paint();
this._refreshWeatherPanel();
this._refreshNewsPanel();
}),
);
this._paint();
this._refreshWeatherPanel();
this._refreshNewsPanel();
}
/** Present every row from the layers' current state and render them. */
@@ -665,6 +679,15 @@ export class LayerPanel {
}
this._paint();
this._refreshWeatherPanel();
this._refreshNewsPanel();
}
/** Feed the News rail panel the view the news layer publishes while on. */
_refreshNewsPanel() {
const layer = this.getAll().find(({ id }) => id === 'news');
this._newsPanel?.update(
layer?.enabled ? this._rowControlsFor(layer.id)?.feed || null : null,
);
}
_buildMetaText(layer) {
@@ -715,7 +738,7 @@ export class LayerPanel {
typeof stats.statusMessage === 'string' &&
stats.statusMessage.trim()
) {
return `${source} · ${translateKnown(stats.statusMessage.trim())}`;
return `${source} · ${translateStatusMessage(stats.statusMessage.trim())}`;
}
const ago = stats.lastUpdate ? this._timeAgo(stats.lastUpdate) : t('never');
if (stats.loading) {