mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
The Weather panel kept a second time transport of its own: a slider, step buttons, Latest and Play, backed by a replay in the weather clock that stepped the observed frames every two seconds and went round from the last to the first. The weather clock also attached itself to the world clock as a driver, so the timeline's Play became that replay whenever weather was on. The panel now shows the frame time only: the newest frame and its age while live, the timeline time alone at a past time. The weather clock no longer has setTarget, step, latest, play, pause or togglePlay, its state no longer has playing, and it no longer drives the world clock. It still follows the world time, registers each product's frames as marks the timeline's arrow keys step to, holds its products, and gates the world's continuous play at each next frame until it loads. weatherClock.world names the world clock it follows. A weather row's play, latest and step params move the world clock as the timeline does: play toggles continuous play (from the start of the covered time when live), latest goes live, and step goes to the previous or next mark. The rail timeline component, which only the panel used, is removed, along with its unused messages in every locale.
45 lines
1.4 KiB
Vue
45 lines
1.4 KiB
Vue
<script setup>
|
|
import { t } from '../../i18n/index.js';
|
|
import RailCards from '../rail/RailCards.vue';
|
|
|
|
// Active weather: forecast and event cards, then the observed products with
|
|
// the time of the frame they show. The world timeline moves time; the owner
|
|
// computes every value shown.
|
|
defineProps({
|
|
view: { type: Object, required: true },
|
|
onParams: { type: Function, default: () => {} },
|
|
onOpen: { type: Function, default: () => {} },
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<section
|
|
class="weather-readout"
|
|
:hidden="view.hidden"
|
|
:aria-label="t('Active weather')"
|
|
><div class="weather-cards"
|
|
><RailCards
|
|
:cards="view.cards"
|
|
card-class-name="weather-card"
|
|
badge-class-name="weather-coverage"
|
|
:on-params="onParams"
|
|
:on-open="onOpen" /></div
|
|
><section
|
|
class="weather-observed-group"
|
|
:hidden="!view.observed"
|
|
:aria-label="t('Observed history')"
|
|
><h3 class="panel-title">{{ t('Observed history') }}</h3
|
|
><div class="weather-observed-scope">{{ view.scope }}</div
|
|
><div class="weather-frame-time" :hidden="!view.frameTime">{{
|
|
view.frameTime
|
|
}}</div
|
|
><div class="weather-cards"
|
|
><RailCards
|
|
:cards="view.observedCards"
|
|
card-class-name="weather-card"
|
|
badge-class-name="weather-coverage"
|
|
:on-params="onParams"
|
|
:on-open="onOpen" /></div></section
|
|
></section>
|
|
</template>
|