mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
feat(ui): render the CCTV panel's buttons, CAL chip and meta line from a store
CctvControls presents the switch, navigation and toggle buttons, the CAL chip and the meta line with a pure presentCctvPanel() and publishes them to the gev-cctv store; CctvPanel renders them. The controls keep their listeners on the same elements, and still write the picker, frame, source badge, calibration readout and summary, which carry no bindings. A page that imports ui/cctv with its own markup no longer has these elements painted for it, as with Street Level.
This commit is contained in:
1 parent
e6aee52ea0
commit
5b8cb40fce
14 files changed
+469
-215
No files matched your search
+14
-2
@@ -17,11 +17,23 @@ import {
|
||||
_updateCctvSyncChip,
|
||||
} from './cctvPresentation.js';
|
||||
import { _initCctvPanel } from './cctvBindings.js';
|
||||
import { useCctvStore } from './stores/cctv.js';
|
||||
import { applicationPinia } from './vueRuntime.js';
|
||||
|
||||
/** Own camera-panel interaction and presentation; receive the camera port and application actions. */
|
||||
/**
|
||||
* Own camera-panel interaction and presentation; receive the camera port and
|
||||
* application actions. The panel view renders the buttons, CAL chip and meta
|
||||
* line from what this publishes (`gev-cctv` store).
|
||||
*/
|
||||
export class CctvControls {
|
||||
constructor({ elements, cctv, actions }) {
|
||||
constructor({
|
||||
elements,
|
||||
cctv,
|
||||
actions,
|
||||
store = useCctvStore(applicationPinia()),
|
||||
}) {
|
||||
Object.assign(this, elements);
|
||||
this.store = store;
|
||||
this.cctv = cctv;
|
||||
this.actions = actions;
|
||||
this.destroyed = false;
|
||||
|
||||
Reference in new issue
Block a user