mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
fix(launches): cancel mission flights on exit and name a failed index load
Review fixes on top of #1578: - Exiting Space Missions cancels the layer's own camera flights again (entry, roster preview, mission focus); only a flight navigation started after releaseCameraOwnership() runs on. - A failed first index load says so: "Space Missions unavailable: the mission index could not load. Try again later." on both the Context and Data Layers routes, instead of a generic transition toast. Translated. - Regression tests for both; docs and changelog describe the real feedback. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3cd7ed68aa
commit
13219828e3
22 files changed
+98
-16
No files matched your search
@@ -4,6 +4,18 @@ import {
|
||||
contextModeWord,
|
||||
} from '../contextModePolicy.js';
|
||||
|
||||
/** Why a Space Missions entry failed, when its mission index never loaded. */
|
||||
export function spaceMissionsIndexFailure(dataManager) {
|
||||
const stats = dataManager?.layers
|
||||
?.get('rocket-launches')
|
||||
?.module?.getStats?.();
|
||||
return stats?.error && stats.lastUpdate == null
|
||||
? t(
|
||||
'Space Missions unavailable: the mission index could not load. Try again later.',
|
||||
)
|
||||
: null;
|
||||
}
|
||||
|
||||
export async function _runUserFacingContextAction(
|
||||
operation,
|
||||
message = t('Context could not restore every layer; try again'),
|
||||
@@ -19,7 +31,10 @@ export async function _runUserFacingContextAction(
|
||||
onFailure: (error) => {
|
||||
if (this.destroyed) return;
|
||||
console.warn('[Context] user-facing transition failed', error);
|
||||
this.showToast(localizedMessage || message);
|
||||
this.showToast(
|
||||
localizedMessage ||
|
||||
(typeof message === 'function' ? message() : message),
|
||||
);
|
||||
},
|
||||
});
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user