mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Port the Data Library Browse dialog to Vue and Pinia
The dialog is now DataLibraryDialog.vue (with DataLibraryCard.vue for each entry), placed with the Browse button by DataLibraryBrowse.vue in LayerPanelsView and teleported to the body. It renders what the gev-data-library store holds and sends clicks and typing to the owner. src/ui/libraryBrowser.js is now the framework-free owner: it presents the open state, filters, the rows they show, the stat summary and Remove all through `publish`, and its controls answer the view. Its text helpers are what the view renders with t(), so every label follows the locale without rebuilding anything. Only showModal/close and focus moves stay imperative; focus returns to Browse also when the browser closes the dialog on Escape itself. Component tests mount the view over the real owner (open, filters, Add to Remove keeping focus, Zoom, Remove all, a language switch, clean view).
This commit is contained in:
1 parent
24ccdd4dc3
commit
1a2589d4ef
11 files changed
+773
-474
No files matched your search
@@ -14,6 +14,7 @@ import StreetLevelPanel from './panels/StreetLevelPanel.vue';
|
||||
import DrawControls from './panels/DrawControls.vue';
|
||||
import GeoImport from './panels/GeoImport.vue';
|
||||
import UiSelect from '../kit/UiSelect.js';
|
||||
import DataLibraryBrowse from './panels/DataLibraryBrowse.vue';
|
||||
|
||||
// Scene sharing (src/scenes/sharing.js) offers its authoring bar and presents
|
||||
// its dialog through this store; without this view, neither is drawn.
|
||||
@@ -43,11 +44,8 @@ async function importChosen(event) {
|
||||
<!-- Data Layer Toggle Panel -->
|
||||
<RailPanel id="data-panel" start-collapsed class="active" :title="t('DATA LAYERS')">
|
||||
<div id="data-toggles" class="data-toggle-list ui-scroll"></div>
|
||||
<!-- Data Library: src/ui/libraryBrowser.js owns the dialog; the button
|
||||
shows once the library controller is mounted (src/app/tools.js). -->
|
||||
<div class="data-library-footer">
|
||||
<button id="data-library-browse" type="button" class="data-library-browse" aria-haspopup="dialog" aria-controls="data-library" hidden>{{ t('BROWSE DATA LIBRARY') }}</button>
|
||||
</div>
|
||||
<!-- Data Library: Browse and its dialog (src/ui/libraryBrowser.js). -->
|
||||
<DataLibraryBrowse />
|
||||
</RailPanel>
|
||||
|
||||
<!-- Utilities: Directions (LayerPanel renders its row here), Draw, Import -->
|
||||
|
||||
Reference in new issue
Block a user