mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(kit): render the status badges and empty states with UiBadge and UiEmpty
UiBadge takes a tone and carries Core's gev-status-badge class, with the density variants and colours left to its callers; the CCTV source and calibration badges and the rail card badges render through it. UiEmpty takes a title and hint, with the title as the line itself, since Core's empty states are one line; the Scene shot list, mission roster and imagery strip use it.
This commit is contained in:
1 parent
ecaf723035
commit
b9ecb9b9f5
12 files changed
+126
-19
No files matched your search
@@ -5,6 +5,7 @@ import { t } from '../../i18n/index.js';
|
||||
import { describeShot } from '../scenePresentation.js';
|
||||
import UiButton from '../kit/UiButton.vue';
|
||||
import { useSceneStore } from '../stores/scenes.js';
|
||||
import UiEmpty from '../kit/UiEmpty.vue';
|
||||
|
||||
// The selected scene's shots. Rows keep their identity across selection so a
|
||||
// click followed by a double-click lands on the same label.
|
||||
@@ -73,9 +74,11 @@ function onRenameKey(shot, event) {
|
||||
<template>
|
||||
<div id="scene-shot-list" class="scene-shot-list ui-scroll">
|
||||
<template v-if="attached">
|
||||
<div v-if="!scene?.shots.length" class="scene-shot-empty">{{
|
||||
t('No shots yet. Use CAPTURE SHOT to save current look.')
|
||||
}}</div>
|
||||
<UiEmpty
|
||||
v-if="!scene?.shots.length"
|
||||
class="scene-shot-empty"
|
||||
:title="t('No shots yet. Use CAPTURE SHOT to save current look.')"
|
||||
/>
|
||||
<template v-else>
|
||||
<div
|
||||
v-for="shot in scene.shots"
|
||||
|
||||
@@ -7,6 +7,7 @@ import RailPanel from '../../rail/RailPanel.vue';
|
||||
import CctvCalValue from '../../cctv/CctvCalValue.vue';
|
||||
import CctvPicker from '../../cctv/CctvPicker.vue';
|
||||
import { useCctvStore } from '../../stores/cctv.js';
|
||||
import UiBadge from '../../kit/UiBadge.vue';
|
||||
|
||||
// The CCTV panel, rendered from what CctvControls presents and publishes;
|
||||
// until it renders, the panel shows its initial markup. The controls draw
|
||||
@@ -35,7 +36,7 @@ const frameData = computed(() =>
|
||||
<img id="cctv-frame" alt="CCTV feed frame" :class="{ active: frame?.hasFrame }" :src="frame?.src || undefined" :hidden="live" v-bind="frameData" />
|
||||
<canvas id="cctv-video" class="cctv-frame" :hidden="!live"></canvas>
|
||||
</div>
|
||||
<div id="cctv-source-badge" class="gev-status-badge" role="status" aria-live="polite" :data-frame-state="sourceBadge?.state">{{ sourceBadge?.label ?? t('SOURCE · UNKNOWN') }}</div>
|
||||
<UiBadge id="cctv-source-badge" role="status" aria-live="polite" :data-frame-state="sourceBadge?.state">{{ sourceBadge?.label ?? t('SOURCE · UNKNOWN') }}</UiBadge>
|
||||
<div id="cctv-meta">{{ view?.meta ?? t('Enable CCTV to load camera intersections') }}</div>
|
||||
<div class="cctv-controls">
|
||||
<UiButton class="scene-btn" :pressed="Boolean(view?.enabled)" pressed-class="active" id="cctv-enable-btn">{{ view?.enabled ? t('CCTV ON') : t('CCTV OFF') }}</UiButton>
|
||||
@@ -53,7 +54,7 @@ const frameData = computed(() =>
|
||||
</div>
|
||||
<div class="cctv-controls">
|
||||
<UiButton class="scene-btn" :pressed="Boolean(view?.projection.active)" pressed-class="active" id="cctv-projection-btn" :disabled="view?.toggleDisabled">{{ view?.projection.text ?? t('PROJECTION ON') }}</UiButton>
|
||||
<span id="cctv-quality-chip" class="gev-status-badge gev-status-badge--box" :data-cal-badge="view?.quality.calBadge">{{ view?.quality.label ?? t('CAL · {badge}', { badge: '--' }) }}</span>
|
||||
<UiBadge id="cctv-quality-chip" class="gev-status-badge--box" :data-cal-badge="view?.quality.calBadge">{{ view?.quality.label ?? t('CAL · {badge}', { badge: '--' }) }}</UiBadge>
|
||||
</div>
|
||||
<div class="cctv-calibration-block">
|
||||
<div class="cctv-calibration-header">
|
||||
|
||||
@@ -3,6 +3,7 @@ import { storeToRefs } from 'pinia';
|
||||
import { onBeforeUpdate, onUpdated, ref } from 'vue';
|
||||
import { t } from '../../../i18n/index.js';
|
||||
import { useContextStore } from '../../stores/context.js';
|
||||
import UiEmpty from '../../kit/UiEmpty.vue';
|
||||
|
||||
// The Space Missions roster. The launches layer presents it; until it does,
|
||||
// the list shows its loading line. Hover and keyboard focus drive the
|
||||
@@ -69,8 +70,8 @@ onUpdated(() => {
|
||||
<output data-mission-roster-count>{{ roster ? roster.count : '—' }}</output>
|
||||
</div>
|
||||
<div class="space-mission-roster-list ui-scroll" data-mission-roster-list>
|
||||
<div v-if="!roster" class="space-mission-roster-empty">{{ t('LOADING 30-DAY MISSION INDEX') }}</div>
|
||||
<div v-else-if="!roster.entries.length" class="space-mission-roster-empty">{{ roster.empty }}</div>
|
||||
<UiEmpty v-if="!roster" class="space-mission-roster-empty" :title="t('LOADING 30-DAY MISSION INDEX')" />
|
||||
<UiEmpty v-else-if="!roster.entries.length" class="space-mission-roster-empty" :title="roster.empty" />
|
||||
<button v-for="entry in roster?.entries" v-else :key="entry.id" type="button" class="space-mission-roster-item" :data-mission-roster-index="entry.index" :data-mission-roster-id="entry.id" :aria-label="entry.ariaLabel" @click="layer?.selectMissionAt(entry.index)" @mouseenter="enter(entry.index)" @mousemove="move(entry.index)" @mouseleave="layer?.rosterPointerLeave()" @focus="layer?.rosterFocus(entry.index)" @blur="blur"><span class="space-mission-roster-marker" :style="{ '--mission-roster-color': entry.color }" aria-hidden="true"></span><span class="space-mission-roster-copy"><strong>{{ entry.label }}</strong><small>{{ entry.provider }} · {{ entry.date }}</small></span><span class="space-mission-roster-chevron" aria-hidden="true">›</span></button>
|
||||
</div>
|
||||
<p class="space-mission-roster-focus-continuation" tabindex="-1" data-mission-roster-focus-continuation data-i18n>TAB PREVIEWS · ENTER / SPACE SELECTS</p>
|
||||
|
||||
Reference in new issue
Block a user