mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
feat(panels): render each panel's state classes from the store
A panel's collapsed, dock-pinned, dock-pinned-top, layout-auto-collapsed
and accordion-collapsed classes are drawn by its root's v-panel-state from
the gev-panel-chrome store. PanelChrome, its restore, the layout
controller, both rails and the side accordion present each panel's state
there instead of writing its classes; the rails call onCollapse(panel,
{collapsed, auto}). The directive applies a change in a synchronous
watcher, since the rails measure a panel in the task that opens or closes
it.
Destroying the chrome inside Cockpit now puts back the panels Cockpit's
entry closed while it can still present them. Without a shell, the voice
tools' set_panel_open reports that there is no panel to open. QA scripts
present the states they set instead of writing the classes.
This commit is contained in:
1 parent
dd3a2c87f9
commit
95523e09cd
37 files changed
+404
-135
No files matched your search
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { msg, t } from '../../i18n/index.js';
|
||||
import { vPanelState } from '../rail/panelState.js';
|
||||
import UiButton from '../kit/UiButton.vue';
|
||||
import { vClassToggle } from '../rail/classToggle.js';
|
||||
import { useDisplayStore } from '../stores/display.js';
|
||||
@@ -67,7 +68,7 @@ function selectMapSource(chip) {
|
||||
<div id="command-dock" class="ui-scroll" aria-label="Navigation, voice, and visual preset controls" data-i18n-aria-label>
|
||||
<template v-for="slot in dockOrder" :key="slot">
|
||||
<!-- Control panel -->
|
||||
<div v-if="slot === 'control'" id="control-panel" class="panel-collapsible collapsed">
|
||||
<div v-if="slot === 'control'" id="control-panel" v-panel-state="'control-panel'" class="panel-collapsible collapsed">
|
||||
<div class="panel-glow"></div>
|
||||
<div class="panel-inner">
|
||||
<button id="control-panel-toggle" class="panel-header dock-tray-toggle" type="button"
|
||||
@@ -128,7 +129,7 @@ function selectMapSource(chip) {
|
||||
<VoiceControl v-else-if="slot === 'voice'" :key="voice.id" :view="voice" />
|
||||
|
||||
<!-- Location bar -->
|
||||
<div v-else-if="slot === 'location'" id="location-bar" class="panel-collapsible collapsed">
|
||||
<div v-else-if="slot === 'location'" id="location-bar" v-panel-state="'location-bar'" class="panel-collapsible collapsed">
|
||||
<div class="panel-glow"></div>
|
||||
<div class="location-inner">
|
||||
<div class="location-toolbar">
|
||||
|
||||
Reference in new issue
Block a user