mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
Merge remote-tracking branch 'origin/main' into samehkhamis/kit-sweep-display
# Conflicts: # docs/VUE-MIGRATION.md # scripts/format-scope.json
This commit is contained in:
commit
e9261d4586
20 files changed
+751
-296
No files matched your search
@@ -3,7 +3,9 @@ import { storeToRefs } from 'pinia';
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
import { msg, t } from '../../i18n/index.js';
|
||||
import { FIRST_RUN_LINKS, environmentalLabel } from '../../firstRunCopy.js';
|
||||
import UiButton from '../kit/UiButton.vue';
|
||||
import UiCheckbox from '../kit/UiCheckbox.vue';
|
||||
import UiIcon from '../kit/UiIcon.vue';
|
||||
import { useFirstRunStore } from '../stores/firstRun.js';
|
||||
import { useStoriesStore } from '../stores/stories.js';
|
||||
|
||||
@@ -165,10 +167,10 @@ function onSuppress(event) {
|
||||
<!-- A button, not just a hint: phones and tablets have no ESC key. It
|
||||
closes exactly as ESC does, for this session only. Touch screens
|
||||
see SKIP; a keyboard sees SKIP · ESC (first-run.css). -->
|
||||
<button type="button" class="first-run-dismiss" data-first-run-dismiss @click="controls?.dismiss()">
|
||||
<UiButton class="first-run-dismiss" data-first-run-dismiss @click="controls?.dismiss()">
|
||||
<span class="first-run-dismiss-key">{{ t('SKIP · ESC') }}</span>
|
||||
<span class="first-run-dismiss-touch">{{ t('SKIP') }}</span>
|
||||
</button>
|
||||
</UiButton>
|
||||
</header>
|
||||
<h2 id="first-run-title">{{ t(TITLES[step - 1]) }}</h2>
|
||||
<p class="first-run-step-announcement" role="status" aria-live="polite" aria-atomic="true">{{ t(TITLES[step - 1]) }}</p>
|
||||
@@ -207,22 +209,22 @@ function onSuppress(event) {
|
||||
<section class="first-run-section" aria-labelledby="first-run-start-heading">
|
||||
<h3 id="first-run-start-heading" class="first-run-section-title">{{ t('Start with') }}</h3>
|
||||
<div class="first-run-missions first-run-missions--tiles" role="group" aria-labelledby="first-run-start-heading">
|
||||
<button type="button" data-first-run-start="space-missions" :aria-pressed="String(start === 'space-missions')" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('space-missions')">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">rocket_launch</span>
|
||||
<UiButton data-first-run-start="space-missions" :pressed="start === 'space-missions'" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('space-missions')">
|
||||
<UiIcon name="rocket_launch" :size="null" />
|
||||
<span><strong>{{ t('SPACE MISSIONS') }}</strong><small>{{ t('Launches, spacecraft and orbital context') }}</small></span>
|
||||
</button>
|
||||
<button type="button" data-first-run-start="environmental" :aria-pressed="String(start === 'environmental')" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('environmental')">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">local_fire_department</span>
|
||||
</UiButton>
|
||||
<UiButton data-first-run-start="environmental" :pressed="start === 'environmental'" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('environmental')">
|
||||
<UiIcon name="local_fire_department" :size="null" />
|
||||
<!-- The title is ENVIRONMENTAL_LABEL_CHOICE's label once initialized. -->
|
||||
<!-- Subcopy names BOTH feeds this tile turns on, because the launcher
|
||||
optimizes for the fully configured experience (owner ruling,
|
||||
2026-08-23) — see the mission table in src/firstRunExperience.js. -->
|
||||
<span><strong data-first-run-environmental-title>{{ launcher?.environmentalTitle ?? environmentalLabel().title }}</strong><small>{{ launcher?.environmentalSub ?? t(ENVIRONMENTAL_SUB) }}</small></span>
|
||||
</button>
|
||||
<button type="button" data-first-run-start="explore" :aria-pressed="String(start === 'explore')" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('explore')">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">public</span>
|
||||
</UiButton>
|
||||
<UiButton data-first-run-start="explore" :pressed="start === 'explore'" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('explore')">
|
||||
<UiIcon name="public" :size="null" />
|
||||
<span><strong>{{ t('EXPLORE MANUALLY') }}</strong><small>{{ t('Begin with a clean globe') }}</small></span>
|
||||
</button>
|
||||
</UiButton>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -230,17 +232,17 @@ function onSuppress(event) {
|
||||
<div v-else key="3" class="first-run-step">
|
||||
<ul class="first-run-tips">
|
||||
<li class="first-run-tip first-run-tip--search">
|
||||
<span class="first-run-tip-art" aria-hidden="true"><span class="material-symbols-outlined">search</span><i class="first-run-tip-caret"></i></span>
|
||||
<span class="first-run-tip-art" aria-hidden="true"><UiIcon name="search" :size="null" /><i class="first-run-tip-caret"></i></span>
|
||||
<strong>{{ t('Search places') }}</strong>
|
||||
<small>{{ t('Type a place into the search bar.') }}</small>
|
||||
</li>
|
||||
<li class="first-run-tip first-run-tip--layers">
|
||||
<span class="first-run-tip-art" aria-hidden="true"><span class="material-symbols-outlined">layers</span><i class="first-run-tip-dot"></i></span>
|
||||
<span class="first-run-tip-art" aria-hidden="true"><UiIcon name="layers" :size="null" /><i class="first-run-tip-dot"></i></span>
|
||||
<strong>{{ t('Turn on layers') }}</strong>
|
||||
<small>{{ t('Turn layers on to see flights, ships, cameras, weather and more.') }}</small>
|
||||
</li>
|
||||
<li class="first-run-tip first-run-tip--context">
|
||||
<span class="first-run-tip-art" aria-hidden="true"><span class="material-symbols-outlined">my_location</span><i class="first-run-tip-ring"></i></span>
|
||||
<span class="first-run-tip-art" aria-hidden="true"><UiIcon name="my_location" :size="null" /><i class="first-run-tip-ring"></i></span>
|
||||
<strong>{{ t('Click anything') }}</strong>
|
||||
<small>{{ t('Select a map item to see its details.') }}</small>
|
||||
</li>
|
||||
@@ -248,12 +250,12 @@ function onSuppress(event) {
|
||||
<section class="first-run-section" aria-labelledby="first-run-deeper-heading">
|
||||
<h3 id="first-run-deeper-heading" class="first-run-section-title">{{ t('Go deeper') }}</h3>
|
||||
<div v-if="stories.available" class="first-run-link-card first-run-stories">
|
||||
<div class="first-run-preview first-run-preview--stories" aria-hidden="true"><span class="material-symbols-outlined">movie</span></div>
|
||||
<div class="first-run-preview first-run-preview--stories" aria-hidden="true"><UiIcon name="movie" :size="null" /></div>
|
||||
<div class="first-run-link-body">
|
||||
<p class="first-run-mode-title"><strong translate="no">GEV Stories</strong> <span class="first-run-tag">{{ t('NEW') }}</span></p>
|
||||
<p class="first-run-mode-copy">{{ t('Curated, interactive views of what is happening on Earth. Play one, take over the map whenever you like, then pick the story back up.') }}</p>
|
||||
</div>
|
||||
<button type="button" class="first-run-link-button" data-first-run-stories :aria-disabled="String(settling || launcher?.busy === 'true')" @click="openStories">{{ t('BROWSE STORIES') }}</button>
|
||||
<UiButton class="first-run-link-button" data-first-run-stories :aria-disabled="String(settling || launcher?.busy === 'true')" @click="openStories">{{ t('BROWSE STORIES') }}</UiButton>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -304,10 +306,10 @@ function onSuppress(event) {
|
||||
<p class="first-run-note" data-first-run-status role="status" aria-live="polite">{{ launcher?.status ?? '' }}</p>
|
||||
<!-- The card's main action: God mode, starting where the selected tile
|
||||
says (a clean globe by default). -->
|
||||
<button v-if="step > 1" type="button" class="first-run-back" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="go(step - 1, $event)">{{ t('BACK') }}</button>
|
||||
<button type="button" class="first-run-enter" :data-first-run-choice="step === STEPS ? start : undefined" :data-first-run-next="step < STEPS ? '' : undefined" data-first-run-primary aria-describedby="first-run-title first-run-description" @pointerdown="onPrimaryDown" @keydown.enter="onPrimaryKeydown" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="onPrimary">
|
||||
{{ step < STEPS ? t('NEXT') : t('ENTER GOD MODE') }} <span class="material-symbols-outlined" aria-hidden="true">arrow_forward</span>
|
||||
</button>
|
||||
<UiButton v-if="step > 1" class="first-run-back" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="go(step - 1, $event)">{{ t('BACK') }}</UiButton>
|
||||
<UiButton class="first-run-enter" :data-first-run-choice="step === STEPS ? start : undefined" :data-first-run-next="step < STEPS ? '' : undefined" data-first-run-primary aria-describedby="first-run-title first-run-description" @pointerdown="onPrimaryDown" @keydown.enter="onPrimaryKeydown" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="onPrimary">
|
||||
{{ step < STEPS ? t('NEXT') : t('ENTER GOD MODE') }} <UiIcon name="arrow_forward" :size="null" />
|
||||
</UiButton>
|
||||
</div>
|
||||
|
||||
</aside>
|
||||
|
||||
@@ -16,6 +16,8 @@ import { useGlobeActionsStore } from '../../stores/globeActions.js';
|
||||
import { useLocationStore } from '../../stores/location.js';
|
||||
import { useOmnibarStore } from '../../stores/omnibar.js';
|
||||
import { useVoiceStore } from '../../stores/voice.js';
|
||||
import UiButton from '../../kit/UiButton.vue';
|
||||
import UiIcon from '../../kit/UiIcon.vue';
|
||||
|
||||
// One field for places, layers and questions. Places run through the location
|
||||
// controls, layers through the shell's omnibar actions, and anything else can
|
||||
@@ -1028,7 +1030,7 @@ watch(
|
||||
<section id="gev-omnibar" :class="{ 'has-results': showResults }" :aria-label="t('Search')">
|
||||
<div class="omnibar-field">
|
||||
<span class="omnibar-edge" aria-hidden="true"></span>
|
||||
<span class="material-symbols-outlined omnibar-search-icon" aria-hidden="true">search</span>
|
||||
<UiIcon class="omnibar-search-icon" name="search" :size="null" />
|
||||
<input
|
||||
ref="input"
|
||||
id="gev-omnibar-input"
|
||||
@@ -1055,9 +1057,9 @@ watch(
|
||||
@blur="focused = false"
|
||||
/>
|
||||
<kbd class="omnibar-kbd" aria-hidden="true">{{ shortcut }}</kbd>
|
||||
<button type="button" class="omnibar-mic" :class="{ active: voiceOn }" :disabled="!voice.controls" :aria-pressed="String(voiceOn)" :aria-label="t('Talk to GEV')" :title="t('Talk to GEV')" @click="onMic(true)">
|
||||
<UiButton class="omnibar-mic" :pressed="voiceOn" pressed-class="active" :disabled="!voice.controls" :label="t('Talk to GEV')" @click="onMic(true)">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="9" y="3" width="6" height="11" rx="3" /><path d="M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21" /></svg>
|
||||
</button>
|
||||
</UiButton>
|
||||
</div>
|
||||
<div v-show="showResults" ref="results" class="omnibar-results" :class="{ 'has-feedback': showFeedback }">
|
||||
<p id="omnibar-error" v-show="showFeedback" role="alert">{{ feedback }}</p>
|
||||
@@ -1065,11 +1067,10 @@ watch(
|
||||
<li v-if="strip" class="omnibar-strip" role="group" :aria-label="strip.title">
|
||||
<span class="omnibar-strip__title" aria-hidden="true">{{ strip.title }}</span>
|
||||
<div ref="stripChips" class="omnibar-strip__chips" role="presentation" @wheel="onStripWheel">
|
||||
<button
|
||||
<UiButton
|
||||
v-for="(chip, index) in strip.chips"
|
||||
:id="`gev-omnibar-chip-${index}`"
|
||||
:key="chip.key"
|
||||
type="button"
|
||||
tabindex="-1"
|
||||
class="omnibar-strip__chip"
|
||||
:class="{ active: chip.pressed, focused: inStrip && index === chipIndex }"
|
||||
@@ -1079,8 +1080,8 @@ watch(
|
||||
@mousedown.prevent
|
||||
@click="chooseChip(chip)"
|
||||
>
|
||||
<span class="material-symbols-outlined" aria-hidden="true">{{ chip.icon }}</span>{{ chip.name }}
|
||||
</button>
|
||||
<UiIcon :name="chip.icon" :size="null" />{{ chip.name }}
|
||||
</UiButton>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
@@ -1095,7 +1096,7 @@ watch(
|
||||
@click="choose(item)"
|
||||
@mousemove="inStrip = false"
|
||||
>
|
||||
<span v-if="item.icon" class="material-symbols-outlined omnibar-item-icon" aria-hidden="true">{{ item.icon }}</span>
|
||||
<UiIcon v-if="item.icon" class="omnibar-item-icon" :name="item.icon" :size="null" />
|
||||
<svg v-else class="omnibar-item-icon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path d="M4 5h16v11H9l-5 4z" /></svg>
|
||||
<span class="omnibar-item-label">{{ item.label }}</span>
|
||||
<small>{{ item.hint }}</small>
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<script setup>
|
||||
import UiButton from '../../kit/UiButton.vue';
|
||||
import UiCloseButton from '../../kit/UiCloseButton.vue';
|
||||
|
||||
// The Omnibar's guided walk: the spotlight ring and the callout beside it,
|
||||
// teleported to the end of `to` (the page's body). `startGuide()` in
|
||||
// src/ui/omnibarGuide.js owns every decision and every word: it renders this
|
||||
// with the `view` it computes for each step and keeps the parts the template
|
||||
// never binds: the guide's `visible` class, the callout's entrance replay
|
||||
// (its `swap` class), place and side, the ring's and the extra rings' boxes,
|
||||
// and focus. It finds those elements in the rendered tree itself.
|
||||
defineProps({
|
||||
to: { type: Object, required: true },
|
||||
view: { type: Object, required: true },
|
||||
onClose: { type: Function, required: true },
|
||||
onSkip: { type: Function, required: true },
|
||||
onOffer: { type: Function, required: true },
|
||||
onNext: { type: Function, required: true },
|
||||
});
|
||||
|
||||
/** A progress segment's attributes: no class at all for one still to come. */
|
||||
const dot = (name) => (name ? { class: name } : {});
|
||||
</script>
|
||||
|
||||
<!-- Only line breaks inside tags: the markup has no whitespace between elements. -->
|
||||
<template><Teleport :to="to"
|
||||
><div class="gev-guide"
|
||||
><div class="gev-guide-ring"><i></i></div
|
||||
><div
|
||||
class="gev-guide-callout"
|
||||
role="dialog"
|
||||
aria-modal="false"
|
||||
tabindex="-1"
|
||||
aria-labelledby="gev-guide-title"
|
||||
aria-describedby="gev-guide-text"
|
||||
><div class="gev-guide-head"
|
||||
><p id="gev-guide-title" class="gev-guide-title">{{ view.title }}</p
|
||||
><p class="gev-guide-count">{{ view.count }}</p
|
||||
><UiCloseButton
|
||||
class="gev-guide-close"
|
||||
:label="view.endLabel"
|
||||
:title="view.endLabel"
|
||||
@click="onClose()" /></div
|
||||
><ol class="gev-guide-progress" aria-hidden="true"
|
||||
><li
|
||||
v-for="(name, i) in view.progress"
|
||||
:key="`${view.step}-${i}`"
|
||||
v-bind="dot(name)"></li></ol
|
||||
><div class="gev-guide-body"
|
||||
><p id="gev-guide-text" class="gev-guide-text">{{ view.text }}</p
|
||||
><p class="gev-guide-hint" :hidden="view.hintHidden"
|
||||
><span class="gev-guide-hint-dot"></span
|
||||
><span>{{ view.hint }}</span></p
|
||||
></div
|
||||
><div class="gev-guide-actions"
|
||||
><p class="gev-guide-keys" :hidden="view.keysHidden"
|
||||
><kbd>{{ view.keyCap }}</kbd><span>{{ view.keyText }}</span></p
|
||||
><span
|
||||
><UiButton
|
||||
class="gev-guide-skip"
|
||||
:hidden="view.skipHidden"
|
||||
@click="onSkip()"
|
||||
>{{ view.skipLabel }}</UiButton
|
||||
><UiButton
|
||||
class="gev-guide-offer"
|
||||
:hidden="view.offerHidden"
|
||||
@click="onOffer()"
|
||||
>{{ view.offerLabel }}</UiButton
|
||||
><UiButton
|
||||
class="gev-guide-next"
|
||||
:class="{ quiet: view.nextQuiet }"
|
||||
:hidden="view.nextHidden"
|
||||
@click="onNext()"
|
||||
>{{ view.nextLabel }}</UiButton
|
||||
></span
|
||||
></div
|
||||
><p class="gev-guide-status" role="status" aria-live="polite">{{
|
||||
view.status
|
||||
}}</p></div
|
||||
></div
|
||||
></Teleport
|
||||
></template>
|
||||
@@ -0,0 +1,110 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { t } from '../../../i18n/index.js';
|
||||
import UiButton from '../../kit/UiButton.vue';
|
||||
import UiCloseButton from '../../kit/UiCloseButton.vue';
|
||||
|
||||
// The Québec 511 camera's floating player and its map preview, teleported to
|
||||
// the end of the page. `createQuebecCctvOverlay()` owns every decision: it
|
||||
// renders this with the `view` it computes and keeps the imperative parts,
|
||||
// which the template never binds: each video's source, playback and load, the
|
||||
// panel's dragged position, and the marker's per-frame visibility and place.
|
||||
// The elements those parts need are exposed.
|
||||
defineProps({
|
||||
view: { type: Object, required: true },
|
||||
});
|
||||
const emit = defineEmits([
|
||||
'close',
|
||||
'play',
|
||||
'refresh',
|
||||
'keydown',
|
||||
'headerPointerdown',
|
||||
'liveError',
|
||||
'liveLoadeddata',
|
||||
'stillError',
|
||||
'stillLoadeddata',
|
||||
]);
|
||||
|
||||
const panel = ref(null);
|
||||
const header = ref(null);
|
||||
const close = ref(null);
|
||||
const live = ref(null);
|
||||
const marker = ref(null);
|
||||
const still = ref(null);
|
||||
defineExpose({ panel, header, close, live, marker, still });
|
||||
// Each video's load and failure go to the owner, which marks the source.
|
||||
const liveListeners = {
|
||||
error: () => emit('liveError'),
|
||||
loadeddata: () => emit('liveLoadeddata'),
|
||||
};
|
||||
const stillListeners = {
|
||||
error: () => emit('stillError'),
|
||||
loadeddata: () => emit('stillLoadeddata'),
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- Only line breaks inside tags: the markup has no whitespace between elements. -->
|
||||
<template><Teleport to="body"
|
||||
><section
|
||||
ref="panel"
|
||||
class="qci-panel"
|
||||
:hidden="view.panelHidden"
|
||||
role="region"
|
||||
:aria-label="t('CCTV camera')"
|
||||
@keydown="emit('keydown', $event)"
|
||||
><header
|
||||
ref="header"
|
||||
class="qci-header"
|
||||
@pointerdown="emit('headerPointerdown', $event)"
|
||||
><strong>{{ view.title }}</strong
|
||||
><UiCloseButton
|
||||
ref="close"
|
||||
:label="t('Close camera preview')"
|
||||
@click="emit('close')" /></header
|
||||
><p class="qci-coordinates">{{ view.coordinates }}</p
|
||||
><p class="qci-credit" :hidden="view.creditHidden">{{ view.credit }}</p
|
||||
><video
|
||||
ref="live"
|
||||
class="qci-live"
|
||||
controls
|
||||
muted
|
||||
autoplay
|
||||
loop
|
||||
playsinline
|
||||
:hidden="view.liveHidden"
|
||||
:aria-label="t('CCTV camera')"
|
||||
v-on="liveListeners"></video
|
||||
><div class="qci-actions" :hidden="view.actionsHidden"
|
||||
><UiButton
|
||||
class="qci-play"
|
||||
:hidden="view.playHidden"
|
||||
@click="emit('play')"
|
||||
>{{ t('Play') }}</UiButton
|
||||
><UiButton :hidden="view.refreshHidden" @click="emit('refresh')">{{
|
||||
t('Refresh map still')
|
||||
}}</UiButton></div
|
||||
><p class="qci-note" :hidden="view.noteHidden">{{ view.note }}</p
|
||||
><a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
:href="view.sourceHref"
|
||||
:hidden="view.sourceHidden"
|
||||
>{{ t("Open this image on the provider's site") }}</a
|
||||
></section
|
||||
><div
|
||||
ref="marker"
|
||||
class="qci-marker"
|
||||
:class="{ 'qci-marker-link-only': view.markerLinkOnly }"
|
||||
hidden
|
||||
><video
|
||||
ref="still"
|
||||
class="qci-marker-still"
|
||||
muted
|
||||
playsinline
|
||||
preload="none"
|
||||
:hidden="view.stillHidden"
|
||||
aria-hidden="true"
|
||||
v-on="stillListeners"></video
|
||||
><span class="qci-marker-label">{{ view.markerLabel }}</span></div
|
||||
></Teleport
|
||||
></template>
|
||||
Reference in new issue
Block a user