mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
Every hand-written <button> in the locale picker, phone tab bar, globe actions (Clear, Share, Reset) and compass, imagery divider handle, scene sharing dialog, layer group index, title logo, Exit clean view, the HUD's cockpit entry, News card face, rail card header, layer row toggle, credits line's Data attribution and the camera calibration chips is a ghost UiButton keeping its id, classes, data-*, aria-* and listeners. Their Material Symbols spans (tab icons, globe actions, compass needle, cockpit entry, celestial ring sun and moon) are UiIcons with :size="null". The Omnibar guide's extra rings, one per further target of a step, are now drawn by OmnibarGuide.vue from view.subRings instead of being built in script; startGuide() still reads them from the rendered tree and sets their boxes each frame. A UiButton's slot renders inside the button, so under an owner that patches synchronously (News cards, rail cards, the credits line, the Omnibar guide's Skip, Offer and Next) a change the button's attributes do not carry would land a tick late. Those slots are given under a named condition that is always true (v-if="redrawWithView"), which Vue redraws with the view. src/ui/kit/smallSurfacesControls.test.mjs pins it; docs/VUE-MIGRATION.md describes the surface and the conditional slot. Co-authored-by: Manjunath Paparaju <[email protected]>
18 lines
1.4 KiB
Vue
18 lines
1.4 KiB
Vue
<script setup>
|
|
import { storeToRefs } from 'pinia';
|
|
import { useImagerySplitStore } from '../../stores/imagerySplit.js';
|
|
import UiButton from '../../kit/UiButton.vue';
|
|
|
|
// The before/after imagery dividers, as their splits (src/ui/imagerySplit.js)
|
|
// present them. Each line is a direct child of the body, above the rails; its
|
|
// handle reports pointer and keyboard input back to its split.
|
|
const { splits } = storeToRefs(useImagerySplitStore());
|
|
const optional = (value) => value ?? undefined;
|
|
</script>
|
|
|
|
<template>
|
|
<Teleport to="body">
|
|
<div v-for="split in splits" :key="split.key" :id="optional(split.view.id)" data-globe-overlay :hidden="split.view.hidden"><span class="before" :title="optional(split.view.beforeTitle)">{{ split.view.beforeLabel }}</span><UiButton :class="optional(split.view.handleClass)" role="slider" :aria-label="optional(split.view.ariaLabel)" aria-valuemin="0" aria-valuemax="100" aria-orientation="horizontal" :aria-valuenow="split.view.valueNow" :aria-valuetext="split.view.valueText" @pointerdown="split.controls.pointerdown($event)" @pointermove="split.controls.pointermove($event)" @pointerup="split.controls.pointerup($event)" @pointercancel="split.controls.pointerup($event)" @keydown="split.controls.keydown($event)">↔</UiButton><span class="after" :title="optional(split.view.afterTitle)">{{ split.view.afterLabel }}</span></div>
|
|
</Teleport>
|
|
</template>
|