mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
Merge main into denis/iss-live-telemetry
Conflicts: the locale catalogs, package boundaries and format scope are three-way merges (entries main removed, such as displayPanelScroll.js, stay removed); applicationShell.js and ContextView.vue keep main's Space Missions panel and the STATION and LIVE wiring, moved back into _initGlobalContextPanel; installations take main's feedback module, and their label box joins main's card-on-top click rule; ports.test.mjs lists modelParts and modelNodes; CURRENT-STATE.md keeps both edits. zh-Hant is regenerated from zh-CN, as main now requires. "Below" keeps main's translations.
This commit is contained in:
commit
0620d01140
1526 files changed
+52168
-11320
No files matched your search
@@ -5,9 +5,9 @@ import { markRaw, shallowRef } from 'vue';
|
||||
* The Context panel's mode switch as its view renders it. ContextControls
|
||||
* presents the selected mode, the transition busy state and the nearby
|
||||
* sites search (`_presentContext()`) and publishes them here; it
|
||||
* keeps its listeners and transactions. The Contacts and Space Missions
|
||||
* layers publish their panels beside it, and the app connects each layer's
|
||||
* commands.
|
||||
* keeps its listeners and transactions. The Contacts layer publishes its
|
||||
* panel beside it, and the app connects the layer's commands. Space Missions
|
||||
* has its own store (stores/spaceMissions.js).
|
||||
*/
|
||||
export const useContextStore = defineStore('gev-context', () => {
|
||||
/** The presented mode switch; null until the controls first render. */
|
||||
@@ -37,29 +37,6 @@ export const useContextStore = defineStore('gev-context', () => {
|
||||
awarenessLayer.value = layer && markRaw(layer);
|
||||
}
|
||||
|
||||
/** The Space Missions roster; null until the layer first presents it. */
|
||||
const missionRoster = shallowRef(null);
|
||||
|
||||
/** The selected space mission; null while none is selected. */
|
||||
const mission = shallowRef(null);
|
||||
|
||||
/**
|
||||
* @param {?{roster: ?object, mission: ?object}} next The layer's view. The
|
||||
* layer keeps an unchanged roster's object, which re-renders nothing.
|
||||
*/
|
||||
function publishMissions(next) {
|
||||
missionRoster.value = next?.roster ? markRaw(next.roster) : null;
|
||||
mission.value = next?.mission ? markRaw(next.mission) : null;
|
||||
}
|
||||
|
||||
/** The Space Missions layer whose panel commands the components call. */
|
||||
const missionsLayer = shallowRef(null);
|
||||
|
||||
/** @param {?object} layer The Space Missions layer, or null to disconnect. */
|
||||
function connectMissions(layer) {
|
||||
missionsLayer.value = layer && markRaw(layer);
|
||||
}
|
||||
|
||||
return {
|
||||
view,
|
||||
publish,
|
||||
@@ -67,10 +44,5 @@ export const useContextStore = defineStore('gev-context', () => {
|
||||
publishAwareness,
|
||||
awarenessLayer,
|
||||
connectAwareness,
|
||||
missionRoster,
|
||||
mission,
|
||||
publishMissions,
|
||||
missionsLayer,
|
||||
connectMissions,
|
||||
};
|
||||
});
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
describeEntity,
|
||||
layerBreakdown,
|
||||
nearbyByKind,
|
||||
nearbyEntities,
|
||||
layerMatches,
|
||||
searchEntities,
|
||||
viewSummary,
|
||||
@@ -204,6 +205,10 @@ export const useEntityCardStore = defineStore('gev-entity-card', () => {
|
||||
return nearbyByKind(shell.value?.dataManager?.(), { lat, lon }, options);
|
||||
}
|
||||
|
||||
function nearbySelected() {
|
||||
return nearbyEntities(dataManager(), card.value);
|
||||
}
|
||||
|
||||
/** Whether a card's layer is known to the layer manager and switched off. */
|
||||
function layerOff(layerId) {
|
||||
const dm = dataManager();
|
||||
@@ -333,6 +338,7 @@ export const useEntityCardStore = defineStore('gev-entity-card', () => {
|
||||
following,
|
||||
search,
|
||||
nearbyGroups,
|
||||
nearbySelected,
|
||||
alertsAt,
|
||||
liveLayers,
|
||||
breakdown,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { markRaw, shallowRef } from 'vue';
|
||||
*/
|
||||
export const useFirstRunStore = defineStore('gev-first-run', () => {
|
||||
/**
|
||||
* `{removed, shown, visible, closing, state, busy, status, description,
|
||||
* `{removed, shown, visible, closing, state, busy, status,
|
||||
* environmentalTitle, environmentalSub, scrollable}`, or null until the
|
||||
* launcher is initialized (the card stays hidden).
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ export const useFirstRunStore = defineStore('gev-first-run', () => {
|
||||
launcher.value = next && markRaw(next);
|
||||
}
|
||||
|
||||
/** `{choose(choice), dismiss(), suppress(wanted) → boolean}`, or null. */
|
||||
/** `{choose(choice), dismiss(), suppress(wanted) → boolean, refreshLayout()}`, or null. */
|
||||
const controls = shallowRef(null);
|
||||
|
||||
/** @param {?object} next The launcher's controls, or null to disconnect. */
|
||||
|
||||
@@ -79,6 +79,8 @@ export const useGlobeActionsStore = defineStore('gev-globe-actions', () => {
|
||||
}
|
||||
|
||||
const { act, owns } = owners;
|
||||
/** Whether a connected owner answers this action at all. */
|
||||
const answers = (name) => Boolean(owners.ownerOf(name));
|
||||
|
||||
return {
|
||||
clearBusy,
|
||||
@@ -91,5 +93,6 @@ export const useGlobeActionsStore = defineStore('gev-globe-actions', () => {
|
||||
detach,
|
||||
act,
|
||||
owns,
|
||||
answers,
|
||||
};
|
||||
});
|
||||
@@ -5,11 +5,14 @@ import { markRaw, shallowRef } from 'vue';
|
||||
* The top-bar omnibar's link to the shell. The shell connects the actions
|
||||
* the omnibar offers: `layers()` lists the data layers as `{id, name,
|
||||
* enabled}`, and `setLayer(id, enabled)` turns one on or off as a user click
|
||||
* would. Place search runs through the location controls and Ask GEV through
|
||||
* the voice controls, so neither is repeated here.
|
||||
* would. `creditPlaces()`, optional, credits the bundled Wikidata place
|
||||
* packs once a name from them is shown, and `creditSuggestions(shown)`,
|
||||
* optional, shows the OpenStreetMap credit while Photon's suggestions are. Place search runs through the
|
||||
* location controls and Ask GEV through the voice controls, so neither is
|
||||
* repeated here.
|
||||
*/
|
||||
export const useOmnibarStore = defineStore('gev-omnibar', () => {
|
||||
/** `{layers(), setLayer(id, enabled)}`, or null while disconnected. */
|
||||
/** `{layers(), setLayer(id, enabled), creditPlaces?()}`, or null while disconnected. */
|
||||
const controls = shallowRef(null);
|
||||
|
||||
/** @param {?object} next The shell's omnibar actions, or null. */
|
||||
|
||||
@@ -8,6 +8,8 @@ import { computed, markRaw, shallowRef } from 'vue';
|
||||
* @property {(sceneId: string, shotId: string, title: string) => void} rename
|
||||
* @property {(sceneId: string, shotId: string) => void} load
|
||||
* @property {(sceneId: string, shotId: string) => void} remove
|
||||
* @property {(sceneId: string, shotId: string, index: number) => void} move
|
||||
* Move a shot to `index` in its scene's playback order.
|
||||
* @property {(file: File) => Promise<void>|void} importFile A chosen file.
|
||||
* @property {() => void} create, deleteScene, stories, thumb, capture, update,
|
||||
* start, stop, next, export, download The panel's buttons.
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { markRaw, shallowRef } from 'vue';
|
||||
|
||||
/**
|
||||
* The Space Missions panel as its views render it. The Space Missions layer
|
||||
* publishes its roster and selected mission here, and SpaceMissionsControls
|
||||
* publishes whether the layer is on. Nothing here belongs to Context.
|
||||
*/
|
||||
export const useSpaceMissionsStore = defineStore('gev-space-missions', () => {
|
||||
/** Whether the Space Missions layer is on or starting. */
|
||||
const enabled = shallowRef(false);
|
||||
|
||||
/** @param {boolean} next Whether the layer is on or starting. */
|
||||
function setEnabled(next) {
|
||||
enabled.value = Boolean(next);
|
||||
}
|
||||
|
||||
/** The roster; null until the layer first presents it. */
|
||||
const roster = shallowRef(null);
|
||||
|
||||
/** The selected space mission; null while none is selected. */
|
||||
const mission = shallowRef(null);
|
||||
|
||||
/**
|
||||
* @param {?{roster: ?object, mission: ?object}} next The layer's view. The
|
||||
* layer keeps an unchanged roster's object, which re-renders nothing.
|
||||
*/
|
||||
function publish(next) {
|
||||
roster.value = next?.roster ? markRaw(next.roster) : null;
|
||||
mission.value = next?.mission ? markRaw(next.mission) : null;
|
||||
}
|
||||
|
||||
/** The Space Missions layer whose panel commands the components call. */
|
||||
const layer = shallowRef(null);
|
||||
|
||||
/** @param {?object} next The Space Missions layer, or null to disconnect. */
|
||||
function connect(next) {
|
||||
layer.value = next && markRaw(next);
|
||||
}
|
||||
|
||||
return { enabled, setEnabled, roster, mission, publish, layer, connect };
|
||||
});
|
||||
Reference in new issue
Block a user