mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 13:52:19 +00:00
feat(ui): render the CCTV camera picker from the store
The picker's options are data: CctvControls computes the cameras in view and the closing note for those left out, keeps a focused picker's list and prepends a camera activated under it, and publishes the options, disabled state and selection. CctvPicker renders them keyed by camera id and applies the selection once the options are in place; it updates only when the controls publish, as the old picker did on layer notifications. A picker about to be disabled no longer counts as focused. This completes the CCTV panel: everything it shows is rendered from the gev-cctv store.
This commit is contained in:
1 parent
eef3dec759
commit
ce343c1c6d
10 files changed
+257
-196
No files matched your search
@@ -3,11 +3,12 @@ import { storeToRefs } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
import { t } from '../../../i18n/index.js';
|
||||
import CctvCalValue from '../../cctv/CctvCalValue.vue';
|
||||
import CctvPicker from '../../cctv/CctvPicker.vue';
|
||||
import { useCctvStore } from '../../stores/cctv.js';
|
||||
|
||||
// The CCTV panel, rendered from what CctvControls presents and publishes;
|
||||
// until it renders, the panel shows its initial markup. The controls fill
|
||||
// the picker's options, and draw the live video into its canvas.
|
||||
// until it renders, the panel shows its initial markup. The controls draw
|
||||
// the live video into its canvas.
|
||||
const { view, frame, live, sourceBadge, summary } = storeToRefs(useCctvStore());
|
||||
// The frame's request state, as data attributes that read "true" or are
|
||||
// empty; none until the controls first publish.
|
||||
@@ -47,7 +48,7 @@ const frameData = computed(() =>
|
||||
</div>
|
||||
<div class="cctv-controls">
|
||||
<button id="cctv-prev-btn" type="button" class="gev-action-button scene-btn" :disabled="view?.navDisabled" data-i18n>PREV</button>
|
||||
<select class="gev-field" id="cctv-camera-select" aria-label="CCTV camera" data-i18n-aria-label></select>
|
||||
<CctvPicker class="gev-field" id="cctv-camera-select" aria-label="CCTV camera" data-i18n-aria-label />
|
||||
<button id="cctv-next-btn" type="button" class="gev-action-button scene-btn" :disabled="view?.navDisabled" data-i18n>NEXT</button>
|
||||
</div>
|
||||
<div class="cctv-controls">
|
||||
|
||||
Reference in new issue
Block a user