mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Merge main and switch Cesium and Navara in place through Vue
Preserve the camera, map source and layer selection across engine sessions. Restore the previous engine if startup fails and retain local history navigation.
This commit is contained in:
commit
b8f4d097c4
1691 files changed
+225876
-41594
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { t } from '../../i18n/index.js';
|
||||
import {
|
||||
BIKESHARE_SELECTED_OVERLAY_SOURCE_ID,
|
||||
BIKESHARE_SELECTED_OVERLAY_SOURCE_OPTIONS,
|
||||
@@ -7,7 +8,9 @@ export function buildBikeshareSelectionLabel(record) {
|
||||
const stationName = String(record?.stationName || '').trim();
|
||||
const stationLabel =
|
||||
stationName ||
|
||||
(record?.stationId ? `Station ${record.stationId}` : 'Station');
|
||||
(record?.stationId
|
||||
? t('Station {id}', { id: record.stationId })
|
||||
: t('Station'));
|
||||
const bikes = Number.isFinite(record?.bikesAvailable)
|
||||
? record.bikesAvailable
|
||||
: '?';
|
||||
@@ -15,15 +18,25 @@ export function buildBikeshareSelectionLabel(record) {
|
||||
? record.docksAvailable
|
||||
: '?';
|
||||
const capacity = Number.isFinite(record?.capacity) ? record.capacity : '?';
|
||||
|
||||
const lines = [
|
||||
stationLabel,
|
||||
`🚲 ${bikes} avail · ${docks} docks · ${capacity} cap`,
|
||||
t('🚲 {bikes} avail · {docks} docks · {capacity} cap', {
|
||||
bikes,
|
||||
docks,
|
||||
capacity,
|
||||
}),
|
||||
];
|
||||
|
||||
// Append warnings for stations that are offline or partially non-operational
|
||||
const abnormal = [];
|
||||
if (record?.isInstalled === false) abnormal.push('⚠️ Not installed');
|
||||
if (record?.isRenting === false) abnormal.push('⚠️ Not renting');
|
||||
if (record?.isReturning === false) abnormal.push('⚠️ Not returning');
|
||||
if (abnormal.length) lines.push(abnormal.join(' · '));
|
||||
if (record?.isInstalled === false) abnormal.push(t('⚠️ Not installed'));
|
||||
if (record?.isRenting === false) abnormal.push(t('⚠️ Not renting'));
|
||||
if (record?.isReturning === false) abnormal.push(t('⚠️ Not returning'));
|
||||
if (abnormal.length > 0) {
|
||||
lines.push(abnormal.join(' · '));
|
||||
}
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user