Stories: remove unreachable prototype paths

GEV stories never explore, carry no world time and are never live:
drop the resume play state, Jump to live, the exploring branches and
world-time arguments, the overridden play button rules, and the hidden
rail and fill. The legend reads a plain field instead of a mock one.
This commit is contained in:
Sameh Khamis committed 2026-11-16 13:35:05 -08:00
1 parent f4b535d89e
commit 7a0b649bf5
22 files changed
+26 -232

No files matched your search

-2
View File
@@ -4092,11 +4092,9 @@
"Resize context panel": "تغيير حجم لوحة السياق",
"Swipe up for context": "اسحب لأعلى لعرض السياق",
"Chapter start": "بداية الفصل",
"Resume story": "استئناف القصة",
"Story time": "وقت القصة",
"chapter": "الفصل",
"Key moment: {label}": "لحظة رئيسية: {label}",
"Jump to live": "الانتقال إلى المباشر",
"Exit expanded map": "الخروج من الخريطة الموسّعة",
"Expand map": "توسيع الخريطة",
"Exit cockpit to open Stories": "اخرج من القمرة لفتح القصص",
-2
View File
@@ -3732,11 +3732,9 @@
"Resize context panel": "Größe des Kontextbereichs ändern",
"Swipe up for context": "Nach oben wischen für Kontext",
"Chapter start": "Kapitelanfang",
"Resume story": "Story fortsetzen",
"Story time": "Story-Zeit",
"chapter": "Kapitel",
"Key moment: {label}": "Schlüsselmoment: {label}",
"Jump to live": "Zu live springen",
"Exit expanded map": "Vergrößerte Karte verlassen",
"Expand map": "Karte vergrößern",
"Exit cockpit to open Stories": "Cockpit verlassen, um Storys zu öffnen",
-2
View File
@@ -3822,11 +3822,9 @@
"Resize context panel": "Cambiar el tamaño del panel de contexto",
"Swipe up for context": "Desliza hacia arriba para ver el contexto",
"Chapter start": "Inicio del capítulo",
"Resume story": "Reanudar historia",
"Story time": "Hora de la historia",
"chapter": "capítulo",
"Key moment: {label}": "Momento clave: {label}",
"Jump to live": "Ir al directo",
"Exit expanded map": "Salir del mapa ampliado",
"Expand map": "Ampliar mapa",
"Exit cockpit to open Stories": "Sal de la cabina para abrir Historias",
-2
View File
@@ -3822,11 +3822,9 @@
"Resize context panel": "Redimensionner le panneau de contexte",
"Swipe up for context": "Balayez vers le haut pour le contexte",
"Chapter start": "Début du chapitre",
"Resume story": "Reprendre le récit",
"Story time": "Heure du récit",
"chapter": "chapitre",
"Key moment: {label}": "Moment clé : {label}",
"Jump to live": "Revenir au direct",
"Exit expanded map": "Quitter la carte agrandie",
"Expand map": "Agrandir la carte",
"Exit cockpit to open Stories": "Quittez le cockpit pour ouvrir les Récits",
-2
View File
@@ -3822,11 +3822,9 @@
"Resize context panel": "שינוי גודל לוח ההקשר",
"Swipe up for context": "החלק למעלה להקשר",
"Chapter start": "תחילת הפרק",
"Resume story": "המשך הסיפור",
"Story time": "זמן הסיפור",
"chapter": "פרק",
"Key moment: {label}": "רגע מפתח: {label}",
"Jump to live": "מעבר לזמן אמת",
"Exit expanded map": "יציאה מהמפה המורחבת",
"Expand map": "הרחבת המפה",
"Exit cockpit to open Stories": "צא מתא הטייס כדי לפתוח את הסיפורים",
-2
View File
@@ -3822,11 +3822,9 @@
"Resize context panel": "Ridimensiona il pannello contesto",
"Swipe up for context": "Scorri verso l'alto per il contesto",
"Chapter start": "Inizio del capitolo",
"Resume story": "Riprendi la storia",
"Story time": "Ora della storia",
"chapter": "capitolo",
"Key moment: {label}": "Momento chiave: {label}",
"Jump to live": "Vai alla diretta",
"Exit expanded map": "Esci dalla mappa espansa",
"Expand map": "Espandi la mappa",
"Exit cockpit to open Stories": "Esci dal cockpit per aprire le Storie",
-2
View File
@@ -3642,11 +3642,9 @@
"Resize context panel": "コンテキストパネルのサイズを変更",
"Swipe up for context": "上にスワイプしてコンテキストを表示",
"Chapter start": "章の始まり",
"Resume story": "ストーリーを再開",
"Story time": "ストーリー時刻",
"chapter": "章",
"Key moment: {label}": "重要な場面: {label}",
"Jump to live": "ライブに移動",
"Exit expanded map": "拡大地図を終了",
"Expand map": "地図を拡大",
"Exit cockpit to open Stories": "ストーリーを開くにはコックピットを終了してください",
-2
View File
@@ -3822,11 +3822,9 @@
"Resize context panel": "Redimensionar o painel de contexto",
"Swipe up for context": "Deslize para cima para ver o contexto",
"Chapter start": "Início do capítulo",
"Resume story": "Retomar história",
"Story time": "Horário da história",
"chapter": "capítulo",
"Key moment: {label}": "Momento-chave: {label}",
"Jump to live": "Ir para o ao vivo",
"Exit expanded map": "Sair do mapa ampliado",
"Expand map": "Ampliar mapa",
"Exit cockpit to open Stories": "Saia da cabine para abrir Histórias",
-2
View File
@@ -3912,11 +3912,9 @@
"Resize context panel": "Изменить размер панели контекста",
"Swipe up for context": "Проведите вверх, чтобы увидеть контекст",
"Chapter start": "Начало главы",
"Resume story": "Продолжить историю",
"Story time": "Время истории",
"chapter": "глава",
"Key moment: {label}": "Ключевой момент: {label}",
"Jump to live": "К реальному времени",
"Exit expanded map": "Выйти из развёрнутой карты",
"Expand map": "Развернуть карту",
"Exit cockpit to open Stories": "Выйдите из кабины, чтобы открыть Истории",
-2
View File
@@ -3732,11 +3732,9 @@
"Resize context panel": "Ändra storlek på kontextpanelen",
"Swipe up for context": "Svep uppåt för kontext",
"Chapter start": "Kapitlets början",
"Resume story": "Fortsätt berättelsen",
"Story time": "Berättelsens tid",
"chapter": "kapitel",
"Key moment: {label}": "Nyckelögonblick: {label}",
"Jump to live": "Hoppa till live",
"Exit expanded map": "Lämna den förstorade kartan",
"Expand map": "Förstora kartan",
"Exit cockpit to open Stories": "Lämna cockpiten för att öppna Berättelser",
-2
View File
@@ -3912,11 +3912,9 @@
"Resize context panel": "Змінити розмір панелі контексту",
"Swipe up for context": "Проведіть угору, щоб побачити контекст",
"Chapter start": "Початок розділу",
"Resume story": "Продовжити історію",
"Story time": "Час історії",
"chapter": "розділ",
"Key moment: {label}": "Ключовий момент: {label}",
"Jump to live": "До реального часу",
"Exit expanded map": "Вийти з розгорнутої карти",
"Expand map": "Розгорнути карту",
"Exit cockpit to open Stories": "Вийдіть із кабіни, щоб відкрити Історії",
-2
View File
@@ -3642,11 +3642,9 @@
"Resize context panel": "调整背景信息面板大小",
"Swipe up for context": "上滑查看背景信息",
"Chapter start": "章节开始",
"Resume story": "继续故事",
"Story time": "故事时间",
"chapter": "章节",
"Key moment: {label}": "关键时刻:{label}",
"Jump to live": "跳转到实时",
"Exit expanded map": "退出放大地图",
"Expand map": "放大地图",
"Exit cockpit to open Stories": "请先退出座舱,再打开故事",
-2
View File
@@ -3642,11 +3642,9 @@
"Resize context panel": "調整背景資訊面板大小",
"Swipe up for context": "上滑查看背景資訊",
"Chapter start": "章節開始",
"Resume story": "繼續故事",
"Story time": "故事時間",
"chapter": "章節",
"Key moment: {label}": "關鍵時刻:{label}",
"Jump to live": "跳轉到即時",
"Exit expanded map": "退出放大地圖",
"Expand map": "放大地圖",
"Exit cockpit to open Stories": "請先退出座艙,再開啟故事",
+1 -1
View File
@@ -184,7 +184,7 @@ function sceneContext(recipe) {
places: own.places ?? [],
moments: own.moments ?? [],
// The layers' own names on the legend.
mock: { legend: layers.map((l) => ['dot', '#6be8ff', l.label]) },
legend: layers.map((l) => ['dot', '#6be8ff', l.label]),
sources: [...(own.sources ?? []), ...layers.flatMap((l) => l.sources)],
// Each part is translated on its own, as shown.
background: own.background ?? layers.map((l) => l.about),
+1 -6
View File
@@ -710,10 +710,8 @@ export function createStoriesController({
function onTick(state) {
store.playback = {
wallMs: state.wallMs,
worldMs: state.worldMs,
durationMs: state.durationMs,
playing: state.playing,
exploring: state.exploring,
chapterIndex: state.chapterIndex,
};
if (state.playing) store.bigPlay = false;
@@ -919,7 +917,7 @@ export function createStoriesController({
id: story.id,
title: story.title,
atMs,
when: anchorStamp(story, atMs, null),
when: anchorStamp(story, atMs),
};
}
@@ -1051,10 +1049,8 @@ export function createStoriesController({
: 0;
store.playback = {
wallMs: atMs,
worldMs: null,
durationMs: story.durationMs,
playing: false,
exploring: false,
chapterIndex: 0,
};
const start = () => {
@@ -1143,7 +1139,6 @@ export function createStoriesController({
play: () => player?.play(),
pause: () => player?.pause(),
seek: (ms) => player?.seek(ms),
resume: () => player?.resume(),
focusEvent: (event) => player?.focus(event),
get kind() {
return player ? 'gev' : null;
-5
View File
@@ -57,10 +57,8 @@ export function createGevPlayer(director, story, hooks = {}) {
const state = () => ({
wallMs,
worldMs: null,
durationMs,
playing,
exploring: false,
chapterIndex: Math.min(shotIndex, story.chapters.length - 1),
});
const tick = () => {
@@ -158,9 +156,6 @@ export function createGevPlayer(director, story, hooks = {}) {
shotIndex = chapterAt(story, wallMs);
seekToCurrentTime(options);
},
resume() {
return this.play();
},
/** A key moment: go to that point of the scene. */
focus(event) {
if (event?.wallMs != null) this.seek(event.wallMs);
+4 -4
View File
@@ -96,7 +96,7 @@ export function topicsOf(stories) {
}
/** The clock overlay: big line and small line. */
export function clockText(s, wallMs, worldMs, chapterIndex) {
export function clockText(s, chapterIndex) {
return {
big: t('Shot {n} of {total}', {
n: chapterIndex + 1,
@@ -133,12 +133,12 @@ export function anchorStamp(s, wallMs) {
/** Legend entries [shape, colour, label]. */
export function layersFor(s) {
if (s.mock?.legend?.length) return s.mock.legend;
if (s.legend?.length) return s.legend;
return (s.tags ?? []).map((tag) => ['dot', '#e8eaed', tag]);
}
/** "Right now" facts per story (prototype nowFacts): [value, label, warn]. */
export function nowFacts(s, worldMs, wallMs = 0) {
/** "Right now" facts per story: [value, label]. */
export function nowFacts(s) {
const out = [[String(s.chapters.length), msg('Shots')]];
if (s.tags?.length) out.push([String(s.tags.length), msg('Layers on')]);
return out;
-2
View File
@@ -24,10 +24,8 @@ export const useStoriesStore = defineStore('stories', {
thumbs: {},
playback: {
wallMs: 0,
worldMs: null,
durationMs: 0,
playing: false,
exploring: false,
chapterIndex: 0,
},
/** The big Play button over a story that opened paused. */
+3 -99
View File
@@ -1565,21 +1565,6 @@
background: rgba(10, 10, 16, 0.94);
border-top: 1px solid var(--glass-border);
}
#gev-stories .tl-play {
width: 42px;
height: 42px;
flex: none;
border-radius: 13px;
display: grid;
place-items: center;
background: var(--accent);
color: #001820;
box-shadow: 0 0 20px -6px var(--accent-glow);
}
#gev-stories .tl-play svg {
width: 18px;
height: 18px;
}
#gev-stories .tl-track {
position: relative;
flex: 1;
@@ -1589,22 +1574,6 @@
cursor: pointer;
border-radius: 6px;
}
#gev-stories .tl-rail {
position: absolute;
left: 0;
right: 0;
top: 50%;
height: 6px;
margin-top: -3px;
border-radius: 6px;
background: rgba(255, 255, 255, 0.12);
}
#gev-stories .tl-fill {
position: absolute;
inset: 0 auto 0 0;
border-radius: inherit;
background: linear-gradient(90deg, rgba(0, 212, 255, 0.5), var(--accent));
}
#gev-stories .tl-pip {
position: absolute;
top: 50%;
@@ -1702,11 +1671,6 @@
width: 18px;
height: 18px;
}
#gev-stories .tl-play.resume {
background: var(--warn);
color: #241400;
box-shadow: 0 0 20px -6px rgba(255, 180, 90, 0.6);
}
#gev-stories .tl-track:focus-visible {
outline: 2px solid var(--text-primary);
}
@@ -1731,6 +1695,9 @@
#gev-stories .tl-play {
width: 40px;
height: 40px;
flex: none;
display: grid;
place-items: center;
border-radius: 12px;
background: rgba(0, 212, 255, 0.14);
color: var(--accent);
@@ -1752,20 +1719,10 @@
width: 16px;
height: 16px;
}
#gev-stories .tl-play.resume {
background: rgba(255, 180, 90, 0.16);
color: var(--warn);
border-color: rgba(255, 180, 90, 0.55);
box-shadow: 0 0 18px -8px rgba(255, 180, 90, 0.6);
}
#gev-stories .tl-track {
height: 36px;
margin: 0 4px;
}
#gev-stories .tl-rail,
#gev-stories .tl-fill {
display: none;
}
#gev-stories #tlTicks {
position: absolute;
left: 0;
@@ -2066,50 +2023,6 @@
min-width: 0;
color: var(--text-secondary);
}
#gev-stories .tl-live {
flex: none;
display: inline-flex;
align-items: center;
gap: 6px;
height: 26px;
padding: 0 9px;
border-radius: 8px;
border: 1px solid var(--glass-border-hover);
font: 600 10px var(--font-mono);
letter-spacing: 0.14em;
color: var(--text-dim);
background: transparent;
}
#gev-stories .tl-live[hidden] {
display: none;
}
#gev-stories .tl-live i {
width: 6px;
height: 6px;
border-radius: 50%;
background: currentColor;
}
#gev-stories .tl-live:hover {
color: var(--text-primary);
}
#gev-stories .tl-live.edge {
color: var(--live);
border-color: rgba(255, 77, 77, 0.5);
}
#gev-stories .tl-live.edge i {
animation: gsx-pulse 1.6s ease-out infinite;
}
#gev-stories .timeline[data-kind='live'] #tlTicks::after {
content: '';
position: absolute;
right: -1px;
top: -5px;
bottom: -5px;
width: 2px;
border-radius: 2px;
background: var(--live);
box-shadow: 0 0 8px var(--live);
}
@container app (max-width: 1100px) {
#gev-stories .tl-time .tt-c {
display: none;
@@ -2129,9 +2042,6 @@
#gev-stories #tlHeadTime {
display: inline;
}
#gev-stories .tl-live {
display: none;
}
#gev-stories .tl-pip {
width: 26px;
height: 18px;
@@ -2148,9 +2058,6 @@
#gev-stories #tlTicks {
transition: none !important;
}
#gev-stories .tl-live.edge i {
animation: none;
}
}
#gev-stories .cx-sec {
padding: 14px 16px;
@@ -2730,9 +2637,6 @@
#gev-stories .ov-legend {
display: none;
}
#gev-stories .scr-story.exploring .ov-clock {
display: none;
}
#gev-stories .ov-hint {
bottom: 54px;
font-size: 11px;
+4 -6
View File
@@ -39,10 +39,8 @@ const background = computed(() =>
.map((part) => storyText(part))
.join(' '),
);
const stamp = (ms, world) => anchorStamp(props.story, ms, world);
const facts = computed(() =>
nowFacts(props.story, playback.value.worldMs, playback.value.wallMs),
);
const stamp = (ms) => anchorStamp(props.story, ms);
const facts = computed(() => nowFacts(props.story));
const peekFacts = computed(() => facts.value.slice(0, 3));
const sheetSum = computed(
() =>
@@ -77,7 +75,7 @@ const results = computed(() => {
k: i,
ev,
title: storyText(ev.label),
sub: `${t('Key moments')} · ${stamp(ev.wallMs, ev.tMs)}`,
sub: `${t('Key moments')} · ${stamp(ev.wallMs)}`,
}))
.filter(hit);
const srcs = props.story.sources
@@ -363,7 +361,7 @@ defineExpose({ dragging });
:class="{ past: playback.wallMs >= ev.wallMs }"
@click="emit('anchor', ev)"
>
<span class="tchip">{{ stamp(ev.wallMs, ev.tMs) }}</span>
<span class="tchip">{{ stamp(ev.wallMs) }}</span>
<span class="al"
><i :style="{ background: ev.color }"></i
>{{ storyText(ev.label) }}</span
+4 -21
View File
@@ -47,18 +47,9 @@ const title = computed(() => titleOf(props.story));
const k = computed(() => chapterAt(props.story, playback.value.wallMs));
const chapter = computed(() => props.story.chapters[k.value]);
const chTitle = (c) => chapterTitle(props.story, c);
const clock = computed(() =>
clockText(
props.story,
playback.value.wallMs,
playback.value.worldMs,
k.value,
),
);
const clock = computed(() => clockText(props.story, k.value));
const layers = computed(() => layersFor(props.story));
const facts = computed(() =>
nowFacts(props.story, playback.value.worldMs, playback.value.wallMs),
);
const facts = computed(() => nowFacts(props.story));
const posText = computed(() => {
const { lat, lon, altKm } = camera.value;
return {
@@ -80,7 +71,6 @@ const legendClass = (l) => (l[0] === 'dot' ? 'dot' : l[0] === 'sq' ? 'sq' : '');
const timelineRef = ref(null);
function goChapter(i) {
store.controller.seek(props.story.chapters[i].wallMs + 1);
if (playback.value.exploring) store.controller.resume();
}
function goAnchor(ev) {
store.controller.focusEvent(ev);
@@ -88,8 +78,7 @@ function goAnchor(ev) {
}
function bigPlayClick() {
bigPlay.value = false;
if (playback.value.exploring) store.controller.resume();
else store.controller.play();
store.controller.play();
}
// ── Story card: Chapter · On the map · Right now ──
@@ -201,12 +190,7 @@ let pokeTimer = 0;
function pokeControls() {
controlsHidden.value = false;
clearTimeout(pokeTimer);
if (
expanded.value &&
playback.value.playing &&
!playback.value.exploring &&
innerWidth <= 720
)
if (expanded.value && playback.value.playing && innerWidth <= 720)
pokeTimer = setTimeout(() => (controlsHidden.value = true), 3000);
}
watch([expanded, () => playback.value.playing], pokeControls);
@@ -331,7 +315,6 @@ watch([k, page], () => nextTick(sizeCard));
id="scrStory"
class="scr scr-story"
:class="{
exploring: playback.exploring,
expanded,
'ctx-open': ctxOpen,
'ctx-sized': !!contextWidth,
+9 -62
View File
@@ -14,7 +14,7 @@ import {
/**
* The story timeline (prototype `.timeline`): chapter segments with
* magnetic ticks, key-moment pips, a scrub bubble, sound and expand.
* magnetic ticks, key-moment pips, a scrub bubble and expand.
* Positions are wall milliseconds on the GEV scene's own clock.
*/
const props = defineProps({ story: { type: Object, required: true } });
@@ -34,24 +34,15 @@ const chTitle = (c) => chapterTitle(props.story, c);
const events = computed(() => props.story.events ?? []);
const seek = (ms) => store.controller.seek(clamp(ms, 0, dur.value - 10));
// ── Play button: pause while playing, resume while exploring, otherwise play ──
// ── Play button: pause while playing, otherwise play ──
const ICON = {
pause:
'<rect x="6.5" y="5" width="4" height="14" rx="1.4"/><rect x="13.5" y="5" width="4" height="14" rx="1.4"/>',
play: '<path d="M8 5.7v12.6c0 .9 1 1.4 1.7.9l9.7-6.3a1.1 1.1 0 0 0 0-1.8L9.7 4.8C9 4.3 8 4.8 8 5.7Z"/>',
resume:
'<path d="M4.5 12a7.5 7.5 0 1 0 2.2-5.3" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"/><path d="M3.5 3.8v4.6h4.6" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/>',
};
const playMode = computed(() =>
playback.value.exploring && !playback.value.playing
? 'resume'
: playback.value.playing
? 'pause'
: 'play',
);
const playMode = computed(() => (playback.value.playing ? 'pause' : 'play'));
function togglePlay() {
if (playMode.value === 'resume') store.controller.resume();
else if (playback.value.playing) store.controller.pause();
if (playback.value.playing) store.controller.pause();
else store.controller.play();
}
@@ -76,19 +67,9 @@ const segs = computed(() =>
);
// ── Readout ──
const clock = computed(() =>
clockText(
props.story,
tNow.value,
previewMs.value == null ? playback.value.worldMs : null,
k.value,
),
);
const clock = computed(() => clockText(props.story, k.value));
const stampAt = (ms) => fmtDur(ms);
const headTime = computed(() => `${fmtDur(tNow.value)} / ${fmtDur(dur.value)}`);
const atEdge = computed(
() => props.story.live && tNow.value >= dur.value - 600,
);
// ── Scrubbing: preview locally, seek the globe once on release ──
const track = ref(null);
@@ -216,14 +197,7 @@ function onLeave() {
// The bubble follows the knob while playing and the pointer while hovering.
const bubbleT = computed(() => bubbleAt.value ?? tNow.value);
const bubbleK = computed(() => chapterAt(props.story, bubbleT.value));
const bubbleClock = computed(() =>
clockText(
props.story,
bubbleT.value,
bubbleAt.value == null ? playback.value.worldMs : null,
bubbleK.value,
),
);
const bubbleClock = computed(() => clockText(props.story, bubbleK.value));
const bubbleEm = computed(() => {
if (snap.value >= 0) return { text: t('Chapter start'), color: null };
if (snap.value <= -2) {
@@ -278,7 +252,6 @@ function pipClick(i) {
// ── Keyboard on the track ──
function goChapter(i) {
seek(chapters.value[i].wallMs + 1);
if (playback.value.exploring) store.controller.resume();
}
// Previous goes to the start of this chapter first, like a video player.
function stepChapter(d) {
@@ -339,28 +312,17 @@ function toggleExpand() {
store.ctxOpen = false;
setTimeout(() => store.controller.reframe(), 320);
}
function jumpLive() {
seek(dur.value);
if (playback.value.exploring) store.controller.resume();
}
defineExpose({ goChapter });
</script>
<template>
<div id="timeline" class="timeline" :data-kind="story.live ? 'live' : ''">
<div id="timeline" class="timeline">
<button
id="tlPlay"
class="tl-play"
:class="{ resume: playMode === 'resume' }"
type="button"
:aria-label="
playMode === 'resume'
? t('Resume story')
: playMode === 'pause'
? t('Pause')
: t('Play')
"
:aria-label="playMode === 'pause' ? t('Pause') : t('Play')"
@click="togglePlay"
>
<svg
@@ -390,9 +352,6 @@ defineExpose({ goChapter });
@pointerleave="onLeave"
@keydown="onKey"
>
<div class="tl-rail">
<div id="tlFill" class="tl-fill" :style="{ width: `${pct}%` }"></div>
</div>
<div id="tlTicks">
<span
v-for="s in segs"
@@ -478,20 +437,8 @@ defineExpose({ goChapter });
</div>
</div>
<span id="tlTime" class="tl-time" aria-hidden="true">
<b v-if="story.live">{{ clock.big }}</b>
<span v-else class="tt-c">{{ headTime }}</span>
<span class="tt-c">{{ headTime }}</span>
</span>
<button
v-if="story.live"
id="tlLive"
class="tl-live"
:class="{ edge: atEdge }"
type="button"
:aria-label="t('Jump to live')"
@click="jumpLive"
>
<i></i>{{ t('LIVE') }}
</button>
<button
id="stExpand"
class="tl-vol"