STATION, LIVE and the station views use the kit's buttons and glyphs

Main now holds every view to the Vue kit: no hand-written button,
Material glyph or aria-pressed. STATION's, LIVE's and the Cockpit LIVE
page's buttons and the orbital view's station steps are ghost UiButtons
that keep their ids, classes and handlers; their glyphs are UiIcons
sized by the stylesheets. A station choice is a pressed toggle through
UiButton's pressed state and its is-active class. The Cockpit control
list counts the LIVE page, the LIVE tab and the two station steps.
This commit is contained in:
Denis Groshev committed 2026-11-20 10:51:57 +01:00
1 parent edbf3a234d
commit 07e89a7024
5 files changed
+27 -17

No files matched your search

+6 -2
View File
@@ -36,8 +36,12 @@ const views = {
'panels/CockpitContext.vue': { buttons: 4, icons: 4 },
// A signal row's target and its chevron.
'panels/CockpitSignalList.vue': { buttons: 1, icons: 1 },
// TLE, Nadir, Zoom out, Zoom in and Sensor.
'panels/CockpitOrbital.vue': { buttons: 5, icons: 0 },
// TLE, Nadir, Zoom out, Zoom in and Sensor, and a station's Previous and
// Next view, which draw the two glyphs.
'panels/CockpitOrbital.vue': { buttons: 7, icons: 2 },
// The LIVE page's Previous, Next, Play and Try again; the first three draw
// a glyph.
'panels/CockpitLivePage.vue': { buttons: 4, icons: 3 },
// The range step.
'panels/CockpitRadar.vue': { buttons: 1, icons: 0 },
// The flight plan's arrow.
+6 -4
View File
@@ -1,6 +1,8 @@
<script setup>
import { onBeforeUnmount, watch } from 'vue';
import { t } from '../../../i18n/index.js';
import UiButton from '../../kit/UiButton.vue';
import UiIcon from '../../kit/UiIcon.vue';
import { useLiveScreen } from '../../liveScreen.js';
// The Cockpit briefing's LIVE page: the LIVE section of Context, in the
@@ -42,19 +44,19 @@ onBeforeUnmount(() => act('hideLive', 'cockpit'));
<span class="live-badge"><span class="live-dot" :class="{ 'on-air': playing, waiting: loading }" aria-hidden="true"></span><span id="cockpit-live-badge-text">{{ badgeText }}</span></span>
</div>
<div class="cockpit-live-pick" role="group" :aria-label="t('Stream')">
<button v-if="view.count > 1" id="cockpit-live-previous" type="button" class="live-step" @click="act('cycleLive', -1)" :aria-label="t('Previous stream')" :title="t('Previous stream')"><span class="material-symbols-outlined" aria-hidden="true">chevron_left</span></button>
<UiButton v-if="view.count > 1" id="cockpit-live-previous" type="button" class="live-step" @click="act('cycleLive', -1)" :aria-label="t('Previous stream')" :title="t('Previous stream')"><UiIcon name="chevron_left" :size="null" /></UiButton>
<span id="cockpit-live-stream-title" class="live-stream-title" aria-live="polite">{{ t(view.current.title) }}<small v-if="view.count > 1"> · {{ view.index + 1 }}/{{ view.count }}</small></span>
<button v-if="view.count > 1" id="cockpit-live-next" type="button" class="live-step" @click="act('cycleLive', 1)" :aria-label="t('Next stream')" :title="t('Next stream')"><span class="material-symbols-outlined" aria-hidden="true">chevron_right</span></button>
<UiButton v-if="view.count > 1" id="cockpit-live-next" type="button" class="live-step" @click="act('cycleLive', 1)" :aria-label="t('Next stream')" :title="t('Next stream')"><UiIcon name="chevron_right" :size="null" /></UiButton>
</div>
<p class="live-privacy cockpit-live-privacy">{{ t('Video plays from YouTube, which sees your IP address.') }}</p>
<!-- The player's element stays put across re-renders: LiveControls mounts the player in it. -->
<div class="live-screen" :class="{ active: playing || loading }">
<div id="cockpit-live-player-host" class="live-player-host"></div>
<button v-if="idle" id="cockpit-live-play" type="button" class="live-play" @click="act('playLive')"><span class="material-symbols-outlined" aria-hidden="true">play_arrow</span>{{ t('Play') }}</button>
<UiButton v-if="idle" id="cockpit-live-play" class="live-play" @click="act('playLive')"><UiIcon name="play_arrow" :size="null" />{{ t('Play') }}</UiButton>
<div v-if="offline || unavailable" class="live-card" :class="{ offline, unavailable }">
<span class="live-card-dot" aria-hidden="true"></span>
<strong>{{ offline ? t('Stream is offline') : t('This stream cannot play here') }}</strong>
<button v-if="offline" id="cockpit-live-retry" type="button" @click="act('retryLive')">{{ t('Try again') }}</button>
<UiButton v-if="offline" id="cockpit-live-retry" @click="act('retryLive')">{{ t('Try again') }}</UiButton>
</div>
</div>
<p id="cockpit-live-status" class="cockpit-live-status" role="status" aria-live="polite">{{ statusText }}</p>
+3 -2
View File
@@ -15,6 +15,7 @@ import {
} from '../../ownerFlag.js';
import { useCockpitStore } from '../../stores/cockpit.js';
import UiButton from '../../kit/UiButton.vue';
import UiIcon from '../../kit/UiIcon.vue';
// The orbital view's HUD: a nadir reticle over the picture, the satellite's
// identity and orbit, and the optical zoom. The Cockpit controller presents
@@ -328,9 +329,9 @@ const lensStyle = computed(() => {
<p v-if="mount === null" class="cockpit-orbital-north">{{ trackUp ? t('TRACK UP') : t('NORTH UP') }}</p>
<!-- A station view: which one it is, and the step to the next. -->
<div v-if="mount !== null && mountViews > 1" class="cockpit-orbital-look cockpit-orbital-views">
<button id="cockpit-orbital-view-previous" type="button" class="cockpit-orbital-nadir cockpit-orbital-view-step" :aria-label="t('Previous station view')" :title="t('Previous station view')"><span class="material-symbols-outlined" aria-hidden="true">chevron_left</span></button>
<UiButton id="cockpit-orbital-view-previous" class="cockpit-orbital-nadir cockpit-orbital-view-step" :aria-label="t('Previous station view')" :title="t('Previous station view')"><UiIcon name="chevron_left" :size="null" /></UiButton>
<span id="cockpit-orbital-view-name" class="cockpit-orbital-look-readout" aria-live="polite">{{ mount }}</span>
<button id="cockpit-orbital-view-next" type="button" class="cockpit-orbital-nadir cockpit-orbital-view-step" :aria-label="t('Next station view')" :title="t('Next station view')"><span class="material-symbols-outlined" aria-hidden="true">chevron_right</span></button>
<UiButton id="cockpit-orbital-view-next" class="cockpit-orbital-nadir cockpit-orbital-view-step" :aria-label="t('Next station view')" :title="t('Next station view')"><UiIcon name="chevron_right" :size="null" /></UiButton>
</div>
<!-- Shown only while the view is tilted off nadir: where it looks and the way back. -->
<div v-if="look.offset" class="cockpit-orbital-look">
+6 -4
View File
@@ -2,6 +2,8 @@
import { storeToRefs } from 'pinia';
import { computed, onBeforeUnmount, watch } from 'vue';
import { t } from '../../../i18n/index.js';
import UiButton from '../../kit/UiButton.vue';
import UiIcon from '../../kit/UiIcon.vue';
import RailPanel from '../../rail/RailPanel.vue';
import { vClassToggle } from '../../rail/classToggle.js';
import { useLiveScreen } from '../../liveScreen.js';
@@ -51,19 +53,19 @@ const liveWords = computed(() => ({
<template v-if="view">
<div class="live-subject">{{ view.label }}</div>
<div class="live-pick" role="group" :aria-label="t('Stream')">
<button v-if="view.count > 1" id="live-previous-btn" type="button" class="live-step" @click="act('cycleLive', -1)" :aria-label="t('Previous stream')" :title="t('Previous stream')"><span class="material-symbols-outlined" aria-hidden="true">chevron_left</span></button>
<UiButton v-if="view.count > 1" id="live-previous-btn" type="button" class="live-step" @click="act('cycleLive', -1)" :aria-label="t('Previous stream')" :title="t('Previous stream')"><UiIcon name="chevron_left" :size="null" /></UiButton>
<span id="live-stream-title" class="live-stream-title" aria-live="polite">{{ t(view.current.title) }}<small v-if="view.count > 1"> · {{ view.index + 1 }}/{{ view.count }}</small></span>
<button v-if="view.count > 1" id="live-next-btn" type="button" class="live-step" @click="act('cycleLive', 1)" :aria-label="t('Next stream')" :title="t('Next stream')"><span class="material-symbols-outlined" aria-hidden="true">chevron_right</span></button>
<UiButton v-if="view.count > 1" id="live-next-btn" type="button" class="live-step" @click="act('cycleLive', 1)" :aria-label="t('Next stream')" :title="t('Next stream')"><UiIcon name="chevron_right" :size="null" /></UiButton>
</div>
<p class="live-privacy">{{ t('Video plays from YouTube, which sees your IP address.') }}</p>
<!-- The player's element stays put across re-renders: LiveControls mounts the player in it. -->
<div class="live-screen" :class="{ active: playing || loading }">
<div id="live-player-host" class="live-player-host"></div>
<button v-if="idle" id="live-play-btn" type="button" class="live-play" @click="act('playLive')"><span class="material-symbols-outlined" aria-hidden="true">play_arrow</span>{{ t('Play') }}</button>
<UiButton v-if="idle" id="live-play-btn" class="live-play" @click="act('playLive')"><UiIcon name="play_arrow" :size="null" />{{ t('Play') }}</UiButton>
<div v-if="offline || unavailable" class="live-card" :class="{ offline, unavailable }">
<span class="live-card-dot" aria-hidden="true"></span>
<strong>{{ offline ? t('Stream is offline') : t('This stream cannot play here') }}</strong>
<button v-if="offline" id="live-retry-btn" type="button" @click="act('retryLive')">{{ t('Try again') }}</button>
<UiButton v-if="offline" id="live-retry-btn" @click="act('retryLive')">{{ t('Try again') }}</UiButton>
</div>
</div>
<p id="live-status" class="live-status" role="status" aria-live="polite">{{ statusText }}</p>
+6 -5
View File
@@ -2,6 +2,7 @@
import { storeToRefs } from 'pinia';
import { computed } from 'vue';
import { formatDate, formatNumber, t } from '../../../i18n/index.js';
import UiButton from '../../kit/UiButton.vue';
import RailPanel from '../../rail/RailPanel.vue';
import { vClassToggle } from '../../rail/classToggle.js';
import UiSlider from '../../kit/UiSlider.js';
@@ -88,8 +89,8 @@ const stationWords = computed(() => ({
<template v-if="view">
<div class="station-subject">{{ view.subject }}</div>
<div class="station-modes" role="radiogroup" :aria-label="t('Mode')" @keydown.left.prevent="stepMode" @keydown.right.prevent="stepMode" @keydown.up.prevent="stepMode" @keydown.down.prevent="stepMode">
<button id="station-automatic-btn" type="button" role="radio" class="station-mode" :tabindex="manual ? -1 : 0" :aria-checked="String(!manual)" v-class-toggle="{ 'is-active': !manual }" @click="act('setStationMode', 'automatic')">{{ t('Automatic') }}</button>
<button id="station-manual-btn" type="button" role="radio" class="station-mode" :tabindex="manual ? 0 : -1" :aria-checked="String(manual)" v-class-toggle="{ 'is-active': manual }" @click="act('setStationMode', 'manual')">{{ t('Manual') }}</button>
<UiButton id="station-automatic-btn" role="radio" class="station-mode" :tabindex="manual ? -1 : 0" :aria-checked="String(!manual)" v-class-toggle="{ 'is-active': !manual }" @click="act('setStationMode', 'automatic')">{{ t('Automatic') }}</UiButton>
<UiButton id="station-manual-btn" role="radio" class="station-mode" :tabindex="manual ? 0 : -1" :aria-checked="String(manual)" v-class-toggle="{ 'is-active': manual }" @click="act('setStationMode', 'manual')">{{ t('Manual') }}</UiButton>
</div>
<p id="station-telemetry" class="station-telemetry" :data-tone="telemetryTone" role="status" aria-live="polite"><span class="station-telemetry-dot" aria-hidden="true"></span>{{ telemetryText }}</p>
<p v-if="!manual && sunText" id="station-sun" class="station-note">{{ sunText }}</p>
@@ -98,7 +99,7 @@ const stationWords = computed(() => ({
<div v-for="group in view.groups" :key="group.id" class="station-group">
<div class="station-label">{{ t(group.label) }}</div>
<div v-if="group.kind === 'choices'" class="station-row" role="group" :aria-label="t(group.label)">
<button v-for="choice in group.choices" :key="choice.id" type="button" class="station-button" :data-station-choice="`${group.id}:${choice.id}`" v-class-toggle="{ 'is-active': choice.active }" :aria-pressed="String(choice.active)" @click="act('chooseStation', group.id, choice.id)">{{ t(choice.label) }}</button>
<UiButton v-for="choice in group.choices" :key="choice.id" class="station-button" :data-station-choice="`${group.id}:${choice.id}`" :pressed="Boolean(choice.active)" pressed-class="is-active" @click="act('chooseStation', group.id, choice.id)">{{ t(choice.label) }}</UiButton>
</div>
<div v-else class="station-sliders">
<label v-for="slider in group.sliders" :key="slider.id" class="station-slider">
@@ -106,12 +107,12 @@ const stationWords = computed(() => ({
<UiSlider :id="`station-slider-${slider.id}`" :min="slider.min" :max="slider.max" :model-value="slider.value" :aria-label="t(slider.label)" @update:model-value="act('slideStation', slider.id, $event)" />
<output class="gev-slider-value">{{ formatNumber(slider.value) }}°</output>
</label>
<button v-if="group.resume" type="button" class="station-button" :data-station-resume="group.id" @click="act('resumeStationArm', group.id)">{{ t(group.resume) }}</button>
<UiButton v-if="group.resume" class="station-button" :data-station-resume="group.id" @click="act('resumeStationArm', group.id)">{{ t(group.resume) }}</UiButton>
</div>
<p v-if="group.note" class="station-note">{{ t(group.note) }}</p>
</div>
</template>
<button v-if="view.zoom.offered" id="station-zoom-btn" type="button" class="station-button station-zoom" @click="act('zoomStation')">{{ t(view.zoom.label) }}</button>
<UiButton v-if="view.zoom.offered" id="station-zoom-btn" class="station-button station-zoom" @click="act('zoomStation')">{{ t(view.zoom.label) }}</UiButton>
</template>
</RailPanel>
</template>