feat(ui): render the Display panel's imported file list from the store

The file import publishes its rows and hint to the gev-display store and DisplayPanel renders them, keyed by file, so a toggled row keeps its controls. Keyboard focus is given back once the list has rendered: a removed row's next row, else the previous one, else the Import button; a second change before the render keeps the first target, and focus moved elsewhere meanwhile stays there.
This commit is contained in:
Sameh Khamis committed 2026-10-31 00:05:25 -07:00
1 parent 9eb969c682
commit a068a45a89
7 files changed
+327 -131

No files matched your search

+21 -4
View File
@@ -3,9 +3,9 @@ import { markRaw, shallowRef } from 'vue';
/**
* The Display panel as its view renders it. VisualSettings presents its
* groups (`_presentDisplay()`), AircraftDisplay the 3D aircraft group and
* the draw tool its controls, and each publishes here; each keeps its
* listeners on the controls.
* groups (`_presentDisplay()`), AircraftDisplay the 3D aircraft group, the
* draw tool its controls and the file import its list, and each publishes
* here; each keeps its listeners on the controls.
*/
export const useDisplayStore = defineStore('gev-display', () => {
/** The presented panel; null until VisualSettings first renders. */
@@ -32,5 +32,22 @@ export const useDisplayStore = defineStore('gev-display', () => {
draw.value = markRaw(next);
}
return { view, publish, models3d, publishModels3d, draw, publishDraw };
/** The imported files and hint; null until the file import renders. */
const geoImport = shallowRef(null);
/** @param {object} next A fresh presentation of the imported files. */
function publishGeoImport(next) {
geoImport.value = markRaw(next);
}
return {
view,
publish,
models3d,
publishModels3d,
draw,
publishDraw,
geoImport,
publishGeoImport,
};
});