mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
feat(ui): show and hide the Cockpit surfaces from a store
The Cockpit controller publishes which surfaces are shown (the entry button and TR-3B chip, the HUD with its exit and reset buttons and briefing card, and the Contact card) and the views bind them. Focus moves to the exit button, and back to the entry, after Vue renders them. Layout scheduling counts the published presence as visible, so entry still lays out the cards. The Display portal restores only focus its move dropped. The Missions layer no longer hides the Contact card directly.
This commit is contained in:
1 parent
484243fe4b
commit
f279200af5
18 files changed
+422
-74
No files matched your search
@@ -10,7 +10,7 @@ import CockpitSignalList from './CockpitSignalList.vue';
|
||||
// cycle toggle, regional news and local conditions; until it does, the card
|
||||
// shows the state it starts in. The controls keep the controller's
|
||||
// listeners. The route card and the signal rows render themselves.
|
||||
const { brief } = storeToRefs(useCockpitStore());
|
||||
const { presence, brief } = storeToRefs(useCockpitStore());
|
||||
const initial = createBriefState();
|
||||
const b = computed(() => brief.value ?? initial);
|
||||
// The card's page and the region's answer, as state hooks on the card.
|
||||
@@ -32,7 +32,7 @@ function leaveSignals() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside id="cockpit-signal-stream" class="cockpit-signal-window" aria-label="Cockpit briefing carousel" hidden data-i18n-aria-label v-bind="streamState" ref="stream">
|
||||
<aside id="cockpit-signal-stream" class="cockpit-signal-window" aria-label="Cockpit briefing carousel" :hidden="!presence?.active" data-i18n-aria-label v-bind="streamState" ref="stream">
|
||||
<CockpitRoute />
|
||||
<header class="cockpit-signal-header">
|
||||
<div class="cockpit-brief-heading">
|
||||
|
||||
@@ -10,7 +10,7 @@ import { useCockpitStore } from '../../stores/cockpit.js';
|
||||
// navigation, cohort counts, nearest contact and weather toggle; until it
|
||||
// does, the card shows the state it starts in. Its visibility, collapse and
|
||||
// layout stay with the controller, and the controls keep its listeners.
|
||||
const { context } = storeToRefs(useCockpitStore());
|
||||
const { presence, context } = storeToRefs(useCockpitStore());
|
||||
const initial = createContextState();
|
||||
const c = computed(() => context.value ?? initial);
|
||||
const directionStyle = computed(() =>
|
||||
@@ -26,7 +26,7 @@ const weatherLabel = computed(() =>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside id="cockpit-context" class="cockpit-context-window" aria-label="Contact cockpit summary" hidden data-i18n-aria-label :data-state="c.state ?? undefined">
|
||||
<aside id="cockpit-context" class="cockpit-context-window" aria-label="Contact cockpit summary" :hidden="!presence?.context" data-i18n-aria-label :data-state="c.state ?? undefined">
|
||||
<header class="cockpit-context-header">
|
||||
<div>
|
||||
<span data-i18n class="cockpit-context-kicker">CONTACT</span>
|
||||
|
||||
Reference in new issue
Block a user