mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Rebuild the Context panel around the selected item and the view
Clicking anything a layer can identify opens one card in Context: a hero tile (route globe and 3D model for a flight, the camera for CCTV, headline figures otherwise), its facts, actions with Cockpit or the orbital view as the primary one, and a standard set of nearby blocks (weather and local time, flights, vessels, hazards, alerts) within one radius the user sets. Aircraft show altitude as a graph. Things that move are followed when picked, and a card closes when its layer is turned off. With nothing selected the panel describes the view: the layers that are on with a breakdown of what each holds, the camera's height, what is in view, then time, weather and local news. From far out it shows worldwide counts per layer. A search field in the header narrows whatever the panel shows. Prototype. Context reads weather and hazard feeds while its panel is closed, the two 3D previews on a flight card repaint continuously, Follow can show pressed after tracking has ended elsewhere, and most new strings are fixed English. Same-named sites are told apart by position, not by a stable id.
This commit is contained in:
1 parent
f7f18c2823
commit
cc83763452
21 files changed
+6595
-1
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
// The Context panel's own search: one field in its header that narrows what
|
||||
// the panel is showing (the selected item's details, and every list of what
|
||||
// is nearby or in view) to what holds the typed text.
|
||||
|
||||
/** Whether the search field is showing. */
|
||||
export const contextSearchOpen = ref(false);
|
||||
/** The text as typed. */
|
||||
export const contextSearchText = ref('');
|
||||
/** The text to match against: trimmed, lower case, '' when not searching. */
|
||||
export const contextNeedle = computed(() => (contextSearchOpen.value ? contextSearchText.value.trim().toLowerCase() : ''));
|
||||
|
||||
/** Whether any of the given strings holds the searched text (true when not searching). */
|
||||
export function matchesContextSearch(...parts) {
|
||||
const needle = contextNeedle.value;
|
||||
if (!needle) return true;
|
||||
return parts.some((part) => part !== null && part !== undefined && String(part).toLowerCase().includes(needle));
|
||||
}
|
||||
|
||||
export function closeContextSearch() {
|
||||
contextSearchOpen.value = false;
|
||||
contextSearchText.value = '';
|
||||
}
|
||||
Reference in new issue
Block a user