From f5d3521cdadb05ecbf6257fb26267f2ea874ec91 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 17 Nov 2026 19:48:46 -0800 Subject: [PATCH] The title logo goes back to live at the starting view The logo in the title was only a picture. It is now a button, "Back to live at the starting view": the world clock goes live and the camera flies to the view the app started from, letting go of whatever it follows as Reset Globe does. The shell's returnToStart() does it. It flies to the `homeView` option of createApplicationControls, which is the start view unless given: an application that passes `startView` only to carry a view across a rebuild can keep the logo on its own first view. START_VIEW is exported from ./application/controls for that. The title heading keeps "GOD'S EYE VIEW" as its name beside the button. --- docs/CURRENT-STATE.md | 4 ++++ src/app/controls.js | 8 ++++++++ src/i18n/locales/ar.json | 3 ++- src/i18n/locales/de.json | 3 ++- src/i18n/locales/es.json | 3 ++- src/i18n/locales/fr.json | 3 ++- src/i18n/locales/he.json | 3 ++- src/i18n/locales/it.json | 3 ++- src/i18n/locales/ja.json | 3 ++- src/i18n/locales/pt.json | 3 ++- src/i18n/locales/ru.json | 3 ++- src/i18n/locales/sv.json | 3 ++- src/i18n/locales/uk.json | 3 ++- src/i18n/locales/zh-CN.json | 3 ++- src/i18n/locales/zh-Hant.json | 3 ++- src/locationReadouts.test.mjs | 2 +- src/locations.js | 24 +++++++++++++++++------- src/locations.test.mjs | 15 +++++++++++++++ src/ui/applicationShell.js | 12 +++++++++++- src/ui/frameRateView.test.mjs | 32 ++++++++++++++++++++++++++++++++ src/ui/locationNavigation.js | 32 +++++++++++++++++++++++++------- src/ui/shellFacade.js | 5 +++++ src/ui/shellLifetime.test.mjs | 28 ++++++++++++++++++++++++++-- src/ui/styles/foundation.css | 17 +++++++++++++++++ src/ui/views/SceneChromeView.vue | 5 ++++- 25 files changed, 191 insertions(+), 32 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 0dabb63f42..a196aa9fe1 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -4834,6 +4834,10 @@ down | auth-failed` (plus the unchanged `missing-key`/`unsupported`) with > The title and loading logos use a blue 10 px outer-eye stroke with a > translucent slate fill, while the globe-and-cage gaze travels up to 34 SVG > units toward the pointer for clearer feedback at the compact title size. +> The title logo is a button, "Back to live at the starting view": the world +> clock goes live and the camera flies to the view the app started from (the +> host's `homeView`, else its `startView`, else the whole planet), letting go +> of whatever it follows as Reset Globe does (`returnToStart()`). > - **Context, Cockpit, and Radio interaction contract:** explicit Contacts, > Space Missions, and successful Cockpit actions reveal the Context panel, while > restoration and replay preserve its prior collapsed state. Contacts uses the diff --git a/src/app/controls.js b/src/app/controls.js index bb53381c49..8e152a1e02 100644 --- a/src/app/controls.js +++ b/src/app/controls.js @@ -8,6 +8,9 @@ import { useDisplayStore } from '../ui/stores/display.js'; import { applicationPinia } from '../ui/vueRuntime.js'; import { t } from '../i18n/index.js'; +/** Where the camera starts unless a host gives a `startView`. */ +export { START_VIEW }; + /** * Construct the existing controls and camera presentation. `initialShareCode` * opens a share code (the `` of `/share/`) at start-up, for a host @@ -15,6 +18,9 @@ import { t } from '../i18n/index.js'; * picker, for a host that offers its own language choice (`switchLocale` from * the `./i18n` entry). `startView` is where the camera starts (the whole * planet by default; a host may pass a city); a shared view flies from there. + * `homeView` is where the title's logo goes back to (with the clock live): the + * start view unless given, for a host whose `startView` only carries a view + * across a rebuild. * `services.cockpitSubjects` adds the application's own first-person subjects * to the Cockpit (src/cockpitSubjectProviders.js). */ @@ -29,6 +35,7 @@ export function createApplicationControls({ initialShareCode = null, localePicker = true, startView = START_VIEW, + homeView = startView, }) { // Every boot starts from the same view, before share restoration flies on. applyStartView(viewer, startView); @@ -51,6 +58,7 @@ export function createApplicationControls({ // A share code to open at start-up instead of the page's address. initialShareCode, localePicker, + homeView, }); defer(() => styleManager.orbitController.stop()); defer(() => styleManager.hud.destroy()); diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json index 6b4c761e7d..803e63353c 100644 --- a/src/i18n/locales/ar.json +++ b/src/i18n/locales/ar.json @@ -4547,5 +4547,6 @@ "KT": "عقدة", "Course to {code}: {course}": "المسار إلى {code}: {course}", "Over {place}": "فوق {place}", - "Below": "في الأسفل" + "Below": "في الأسفل", + "Back to live at the starting view": "العودة إلى البث المباشر في العرض الأولي" } diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index 80ae71838f..f04bcd6347 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -4135,5 +4135,6 @@ "KT": "KT", "Course to {code}: {course}": "Kurs nach {code}: {course}", "Over {place}": "Über {place}", - "Below": "Darunter" + "Below": "Darunter", + "Back to live at the starting view": "Zurück zu Live in der Startansicht" } diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 5178fe730c..15abe0181a 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -4238,5 +4238,6 @@ "KT": "KT", "Course to {code}: {course}": "Rumbo a {code}: {course}", "Over {place}": "Sobre {place}", - "Below": "Debajo" + "Below": "Debajo", + "Back to live at the starting view": "Volver al directo en la vista inicial" } diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index df4bd75222..8d197c36f1 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -4238,5 +4238,6 @@ "KT": "KT", "Course to {code}: {course}": "Cap vers {code} : {course}", "Over {place}": "Au-dessus de {place}", - "Below": "En dessous" + "Below": "En dessous", + "Back to live at the starting view": "Revenir au direct dans la vue de départ" } diff --git a/src/i18n/locales/he.json b/src/i18n/locales/he.json index 63f34c0c57..d36c880db7 100644 --- a/src/i18n/locales/he.json +++ b/src/i18n/locales/he.json @@ -4238,5 +4238,6 @@ "KT": "KT", "Course to {code}: {course}": "כיוון אל {code}: {course}", "Over {place}": "מעל {place}", - "Below": "מתחת" + "Below": "מתחת", + "Back to live at the starting view": "חזרה לשידור החי בתצוגת הפתיחה" } diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index 20bb94c30c..33ebcbc8cd 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -4238,5 +4238,6 @@ "KT": "KT", "Course to {code}: {course}": "Rotta verso {code}: {course}", "Over {place}": "Sopra {place}", - "Below": "Sotto" + "Below": "Sotto", + "Back to live at the starting view": "Torna alla diretta nella vista iniziale" } diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 28f6828e5d..441930ae4f 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -4032,5 +4032,6 @@ "KT": "KT", "Course to {code}: {course}": "{code}への針路: {course}", "Over {place}": "{place}上空", - "Below": "直下" + "Below": "直下", + "Back to live at the starting view": "ライブに戻り、最初の表示へ" } diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index ea88f139f9..aea0212784 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -4238,5 +4238,6 @@ "KT": "KT", "Course to {code}: {course}": "Rumo para {code}: {course}", "Over {place}": "Sobre {place}", - "Below": "Abaixo" + "Below": "Abaixo", + "Back to live at the starting view": "Voltar ao vivo na vista inicial" } diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index ede804a5d6..a3aff0afb9 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -4341,5 +4341,6 @@ "KT": "УЗ", "Course to {code}: {course}": "Курс на {code}: {course}", "Over {place}": "Над: {place}", - "Below": "Под спутником" + "Below": "Под спутником", + "Back to live at the starting view": "Вернуться в прямой эфир в начальном виде" } diff --git a/src/i18n/locales/sv.json b/src/i18n/locales/sv.json index c9a4c32849..f2329a3526 100644 --- a/src/i18n/locales/sv.json +++ b/src/i18n/locales/sv.json @@ -4135,5 +4135,6 @@ "KT": "KT", "Course to {code}: {course}": "Kurs mot {code}: {course}", "Over {place}": "Över {place}", - "Below": "Nedanför" + "Below": "Nedanför", + "Back to live at the starting view": "Tillbaka till live i startvyn" } diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json index cc46dc2891..e22c9bfe2e 100644 --- a/src/i18n/locales/uk.json +++ b/src/i18n/locales/uk.json @@ -4341,5 +4341,6 @@ "KT": "ВУЗ", "Course to {code}: {course}": "Курс на {code}: {course}", "Over {place}": "Над: {place}", - "Below": "Під супутником" + "Below": "Під супутником", + "Back to live at the starting view": "Повернутися до прямого ефіру в початковому вигляді" } diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 419a3b0243..2bbd863f76 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -4032,5 +4032,6 @@ "KT": "kt", "Course to {code}: {course}": "前往 {code} 的航向:{course}", "Over {place}": "{place}上空", - "Below": "下方" + "Below": "下方", + "Back to live at the starting view": "回到实时并返回初始视图" } diff --git a/src/i18n/locales/zh-Hant.json b/src/i18n/locales/zh-Hant.json index bd9603fe57..97f1694b32 100644 --- a/src/i18n/locales/zh-Hant.json +++ b/src/i18n/locales/zh-Hant.json @@ -4032,5 +4032,6 @@ "KT": "kt", "Course to {code}: {course}": "前往 {code} 的航向:{course}", "Over {place}": "{place}上空", - "Below": "下方" + "Below": "下方", + "Back to live at the starting view": "回到實時並返回初始視圖" } diff --git a/src/locationReadouts.test.mjs b/src/locationReadouts.test.mjs index b36a615b78..3b1e7edd30 100644 --- a/src/locationReadouts.test.mjs +++ b/src/locationReadouts.test.mjs @@ -73,7 +73,7 @@ test('any other camera destination clears the search label too', () => { assert.match(shellMethod('_stampNavigation').toString(), /if \(clearSearchedLocation\) this\.clearLocation\(\);/); // The shared funnel is what the reset and voice seams actually reach. - for (const seam of ['resetToGlobeView() {', 'beginLocationNavigation() {', '_runExplicitNavigation(']) { + for (const seam of ['resetToGlobeView({ view = null } = {}) {', 'beginLocationNavigation() {', '_runExplicitNavigation(']) { const at = ui.indexOf(seam); assert.ok(at > 0, `missing navigation seam "${seam}"`); assert.match(shellMethod(seam.match(/^(\w+)/)[1]).toString(), /_stampNavigation\(/, `"${seam}" must stamp navigation`); diff --git a/src/locations.js b/src/locations.js index 3e390433ae..c241175d9b 100644 --- a/src/locations.js +++ b/src/locations.js @@ -32,21 +32,31 @@ export const GLOBE_VIEW = Object.freeze({ /** * Fly straight out to the full-earth globe view, keeping the current sub-camera - * point centered so the user's continent stays in front of them. + * point centered so the user's continent stays in front of them. With `view` + * (`{ lon, lat, height, heading?, pitch? }`, angles in degrees, as the start + * view is given), fly to that view instead. * @param {object} viewer - * @param {{duration?: number, onComplete?: Function, onCancel?: Function}} options + * @param {{duration?: number, onComplete?: Function, onCancel?: Function, + * view?: {lon: number, lat: number, height: number, heading?: number, + * pitch?: number}}} options * @returns {{latitude: number, longitude: number, heightM: number}} */ export function flyToGlobeView(viewer, options = {}) { const camera = cameraOf(viewer); - const { lon: longitude, lat: latitude } = camera.pose(); + const here = camera.pose(); + const view = options.view ?? { + lon: here.lon, + lat: here.lat, + height: GLOBE_VIEW.heightM, + }; + const { lon: longitude, lat: latitude, height: heightM } = view; camera.cancelFlight(); camera.flyTo( - { lon: longitude, lat: latitude, height: GLOBE_VIEW.heightM }, + { lon: longitude, lat: latitude, height: heightM }, { orientation: { - heading: 0, - pitch: toRadians(GLOBE_VIEW.pitchDeg), + heading: toRadians(view.heading ?? 0), + pitch: toRadians(view.pitch ?? GLOBE_VIEW.pitchDeg), roll: 0, }, durationS: finitePositive(options.duration) || GLOBE_VIEW.durationS, @@ -55,7 +65,7 @@ export function flyToGlobeView(viewer, options = {}) { onCancel: options.onCancel, }, ); - return { latitude, longitude, heightM: GLOBE_VIEW.heightM }; + return { latitude, longitude, heightM }; } /** diff --git a/src/locations.test.mjs b/src/locations.test.mjs index 20040a2266..049e763c60 100644 --- a/src/locations.test.mjs +++ b/src/locations.test.mjs @@ -631,6 +631,21 @@ test('a globe flight without callbacks still flies (both hooks are optional)', ( viewer.flights[0].complete(); }); +test('a globe flight to a given view flies there, not out over the current spot', () => { + const viewer = stubViewer(); + const target = flyToGlobeView(viewer, { + view: { lon: -82.5, lat: 35, height: 23000000 }, + }); + assert.deepEqual(target, { latitude: 35, longitude: -82.5, heightM: 23000000 }); + const flight = viewer.flights[0]; + const end = Cesium.Cartographic.fromCartesian(flight.destination); + assert.ok(Math.abs(Cesium.Math.toDegrees(end.longitude) + 82.5) < 1e-6); + assert.ok(Math.abs(Cesium.Math.toDegrees(end.latitude) - 35) < 1e-6); + assert.ok(Math.abs(end.height - 23000000) < 1); + assert.equal(flight.orientation.heading, 0); + assert.ok(Math.abs(flight.orientation.pitch + Math.PI / 2) < 1e-9); +}); + test('geocoded Location branches forward the resolved-navigation ownership hook', () => { const source = fs.readFileSync(new URL('./locations.js', import.meta.url), 'utf8'); const searchStart = source.indexOf('export async function searchAndFlyTo'); diff --git a/src/ui/applicationShell.js b/src/ui/applicationShell.js index 3546f38008..ed10b008f6 100644 --- a/src/ui/applicationShell.js +++ b/src/ui/applicationShell.js @@ -106,6 +106,9 @@ export class StyleManager extends ShellFacade { * @param {object} [options] * @param {boolean} [options.localePicker=true] - false removes the language * picker, for a host that offers its own language choice. + * @param {{lon: number, lat: number, height: number, heading?: number, + * pitch?: number}|null} [options.homeView] - where the title's logo goes + * back to (degrees): the view the app started from. */ constructor( viewer, @@ -116,6 +119,7 @@ export class StyleManager extends ShellFacade { requestServices, initialShareCode = null, localePicker = true, + homeView = null, } = {}, ) { super(); @@ -341,6 +345,7 @@ export class StyleManager extends ShellFacade { this._locationNavigation = new LocationNavigation({ viewer, placeSearch, + homeView, navigation: this._navigation, readCockpit: () => this.cockpitView, services: { @@ -1717,7 +1722,12 @@ export class StyleManager extends ShellFacade { const store = useGlobeActionsStore(applicationPinia()); if (this._resetToken) store.detach(this._resetToken); this._resetToken = controls - ? store.connect({ reset: () => controls.reset() }) + ? store.connect({ + reset: () => controls.reset(), + home: () => { + if (!this._disposed) void this.returnToStart(); + }, + }) : null; // A reset under way as the controls are replaced stays on the buttons. if (this._resetToken && this._globeResetting != null) diff --git a/src/ui/frameRateView.test.mjs b/src/ui/frameRateView.test.mjs index fa13e064a0..1b84641d34 100644 --- a/src/ui/frameRateView.test.mjs +++ b/src/ui/frameRateView.test.mjs @@ -48,3 +48,35 @@ test('the FPS readout sits in the title bar, hidden until the backquote key', as await nextTick(); assert.equal(readout(), null); }); + +test('the title logo is a button that asks for the way back to live at the start view', async (t) => { + document.body.replaceChildren(); + const pinia = createPinia(); + const app = createApp(SceneChromeView).use(pinia); + app.mount(document.body.appendChild(document.createElement('div'))); + t.after(() => app.unmount()); + const { useGlobeActionsStore } = await import('./stores/globeActions.js'); + const calls = []; + useGlobeActionsStore(pinia).connect({ home: () => calls.push('home') }); + const logo = document.querySelector('#title-bar h1 > button.title-logo'); + assert.ok(logo, 'the logo is the title heading’s button'); + assert.equal( + logo.getAttribute('aria-label'), + 'Back to live at the starting view', + ); + assert.ok(logo.hasAttribute('data-logo-gaze')); + logo.click(); + assert.deepEqual(calls, ['home']); +}); + +test('the title heading keeps its own name beside the logo button', async (t) => { + document.body.replaceChildren(); + const app = createApp(SceneChromeView).use(createPinia()); + app.mount(document.body.appendChild(document.createElement('div'))); + t.after(() => app.unmount()); + const heading = document.querySelector('#title-bar h1'); + const named = document.getElementById( + heading.getAttribute('aria-labelledby'), + ); + assert.equal(named.textContent.replace(/\s+/g, ' ').trim(), "GOD'S EYE VIEW"); +}); diff --git a/src/ui/locationNavigation.js b/src/ui/locationNavigation.js index e11447f033..233a314cab 100644 --- a/src/ui/locationNavigation.js +++ b/src/ui/locationNavigation.js @@ -3,6 +3,7 @@ import { stopFollowing } from '../data/followed.js'; import { t } from '../i18n/index.js'; import { createStateChannel } from '../app/stateChannel.js'; import { LocationControls } from './location.js'; +import { worldClock } from '../time/worldClock.js'; /** Own destination selection, lookup, orbit and world-jump lifetime. */ export class LocationNavigation { @@ -14,10 +15,11 @@ export class LocationNavigation { navigation, readCockpit, operations, + homeView = null, }) { Object.assign( this, - { viewer, placeSearch, services, navigation, readCockpit }, + { viewer, placeSearch, services, navigation, readCockpit, homeView }, elements, operations, ); @@ -315,7 +317,24 @@ export class LocationNavigation { } } - resetToGlobeView() { + /** + * Back to live, at the view the app started from (the logo): the world + * clock goes live and the camera flies to the start view as the globe reset + * does, letting go of whatever it follows. + */ + returnToStart() { + if (!this._disposed) worldClock.goLive(); + if (!this.homeView) return this.resetToGlobeView(); + // A globe reset under way flies elsewhere: this one replaces it. + this._cancelGlobeReset?.(); + return this.resetToGlobeView({ view: this.homeView }); + } + + /** + * Fly out to the full globe over the current spot, or to `view` (the start + * view's shape: `{ lon, lat, height, heading?, pitch? }`, degrees). + */ + resetToGlobeView({ view = null } = {}) { const { GLOBE_VIEW, flyToGlobeView, @@ -374,6 +393,7 @@ export class LocationNavigation { camera?.release(); this._beginWorldJumpTransition(); + const heightM = view?.height ?? GLOBE_VIEW.heightM; let resolveReset; const resetPromise = new Promise((resolve) => { resolveReset = resolve; @@ -391,7 +411,7 @@ export class LocationNavigation { ok: !cancelled, action: 'zoom_to_globe', cancelled, - heightKm: Math.round(GLOBE_VIEW.heightM / 1000), + heightKm: Math.round(heightM / 1000), centeredOn: { latitude: Number.isFinite(pose?.lat) ? Number(pose.lat.toFixed(2)) @@ -409,15 +429,13 @@ export class LocationNavigation { this._cancelGlobeReset = () => finish(true); timer = window.setTimeout(() => { const height = findCamera(this.viewer)?.pose().height; - finish( - !Number.isFinite(height) || - Math.abs(height - GLOBE_VIEW.heightM) > 1000, - ); + finish(!Number.isFinite(height) || Math.abs(height - heightM) > 1000); }, 4200); this._publishGlobeResetting?.(true); const target = flyToGlobeView(this.viewer, { onComplete: () => finish(false), onCancel: () => finish(true), + ...(view ? { view } : {}), }); if (!target) finish(true); return resetPromise; diff --git a/src/ui/shellFacade.js b/src/ui/shellFacade.js index bb428957de..a1e95bdf84 100644 --- a/src/ui/shellFacade.js +++ b/src/ui/shellFacade.js @@ -1294,6 +1294,11 @@ export class ShellFacade { return this._locationNavigation.resetToGlobeView(...args); } + /** Back to live, at the view the app started from (the title's logo). */ + returnToStart() { + return this._locationNavigation.returnToStart(); + } + /** * Displays a temporary toast notification for 2 seconds. * @param {string} message - Text to show in the toast. diff --git a/src/ui/shellLifetime.test.mjs b/src/ui/shellLifetime.test.mjs index 15528ed3b1..99ae7da0de 100644 --- a/src/ui/shellLifetime.test.mjs +++ b/src/ui/shellLifetime.test.mjs @@ -3,6 +3,7 @@ import test from 'node:test'; import { LocationNavigation } from './locationNavigation.js'; import { LayerBindings } from './layerBindings.js'; import { bindRenderer } from '../render/rendererOf.js'; +import { worldClock } from '../time/worldClock.js'; function replaceWindow(t, value) { const previous = Object.getOwnPropertyDescriptor(globalThis, 'window'); @@ -13,12 +14,13 @@ function replaceWindow(t, value) { }); } -function location(t) { +function location(t, { homeView = null } = {}) { t.mock.timers.enable({ apis: ['setTimeout'] }); replaceWindow(t, { setTimeout }); const calls = []; let hooks; const owner = new LocationNavigation({ + homeView, viewer: { camera: { cancelFlight() {}, lookAtTransform() {}, positionCartographic: { latitude: 0, longitude: 0, height: 20000000 }, @@ -26,7 +28,11 @@ function location(t) { services: { OrbitController: class { stop() { calls.push('orbit-stop'); } }, GLOBE_VIEW: { heightM: 20000000 }, - flyToGlobeView(_viewer, callbacks) { hooks = callbacks; return {}; }, + flyToGlobeView(_viewer, callbacks) { + hooks = callbacks; + calls.push(callbacks.view ? `fly ${callbacks.view.lat},${callbacks.view.lon}` : 'fly here'); + return {}; + }, interruptCameraMotion() {}, militaryAwarenessLayer: {}, satellitesLayer: {}, rocketLaunchesLayer: {}, trafficLayer: { @@ -60,6 +66,24 @@ test('shell disposal settles a pending globe reset once and revokes its timeout' assert.equal((await owner.resetToGlobeView()).cancelled, true); }); +test('the logo goes live and flies to the home view, replacing a globe reset under way', async (t) => { + const { owner, calls, readHooks } = location(t, { + homeView: { lon: -82.5, lat: 35, height: 23000000 }, + }); + worldClock.seek(Date.now() - 3 * 3600 * 1000); + assert.equal(worldClock.isLive(), false); + const reset = owner.resetToGlobeView(); + const home = owner.returnToStart(); + assert.notEqual(home, reset); + assert.equal((await reset).cancelled, true); + assert.equal(worldClock.isLive(), true); + assert.deepEqual(calls.filter((c) => c.startsWith('fly')), ['fly here', 'fly 35,-82.5']); + readHooks().onComplete(); + assert.equal((await home).cancelled, false); + assert.equal((await home).heightKm, 23000); + owner.destroy(); +}); + test('world jump completion cannot revive navigation after shell disposal', (t) => { const { owner, calls } = location(t); let complete; diff --git a/src/ui/styles/foundation.css b/src/ui/styles/foundation.css index 94a044b5a9..77a28c52d5 100644 --- a/src/ui/styles/foundation.css +++ b/src/ui/styles/foundation.css @@ -632,6 +632,23 @@ body.cockpit-mode #cockpit-cloud-effects.active { filter: drop-shadow(0 0 12px rgba(0, 246, 255, 0.5)); } +/* The logo is a button: back to live at the start view. */ +#title-bar button.title-logo { + padding: 0; + border: 0; + background: none; + color: inherit; + font: inherit; + cursor: pointer; + pointer-events: auto; +} + +#title-bar button.title-logo:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 4px; + border-radius: 8px; +} + #title-bar .title-logo::before, #title-bar .title-logo::after { --radio-broadcast-opacity: 0.28; diff --git a/src/ui/views/SceneChromeView.vue b/src/ui/views/SceneChromeView.vue index dea28933d5..b742ec0269 100644 --- a/src/ui/views/SceneChromeView.vue +++ b/src/ui/views/SceneChromeView.vue @@ -18,9 +18,12 @@ import ScreenAnnotations from './panels/ScreenAnnotations.vue'; import AwarenessDirection from './panels/AwarenessDirection.vue'; import UiButton from '../kit/UiButton.vue'; import GlobeActions from './panels/GlobeActions.vue'; +import { useGlobeActionsStore } from '../stores/globeActions.js'; import RenderFailure from './panels/RenderFailure.vue'; import WorldTimeline from './panels/WorldTimeline.vue'; +// The title's logo goes back to live at the start view, as the shell answers it. +const globeActions = useGlobeActionsStore(); // The ACTIVE STYLE corner shows the style VisualSettings publishes. const { style } = storeToRefs(useDisplayStore()); // The status chips, toast and FPS readout show what ShellFeedback, @@ -74,7 +77,7 @@ const vToastText = {
-

GOD'S EYE VIEW

+

GOD'S EYE VIEW

{{ t('NO PLACE LEFT BEHIND') }}

{{ fps.text }}