mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
Merge main into fix/earthquake-click-details
Resolves conflicts with main: a world focus target's own range past its framed radius replaces the kind's range (#1832), so a quake asks for its own range only past M6 and the earthquake framing stays its floor; FIRMS keeps main's marker stand-in under the card-on-top rule; launches keep main's label click and also read the card on top through the pick registry.
This commit is contained in:
commit
e87aa5190d
1337 files changed
+38638
-9950
No files matched your search
+56
-25
@@ -30,7 +30,7 @@ import { LocationNavigation } from './locationNavigation.js';
|
||||
import { bindCameraOrientationControls } from './cameraOrientationControls.js';
|
||||
import { createMapSourceControls } from './mapSource.js';
|
||||
import { STYLES } from './effects.js';
|
||||
import { isHudLayout } from '../hudLayouts.js';
|
||||
import { isHudLayout, isLegacySonarHudLayout } from '../hudLayouts.js';
|
||||
import {
|
||||
getCyberSonarControlState,
|
||||
setCyberSonarControls,
|
||||
@@ -62,6 +62,8 @@ import { applyLocaleChoice } from './localePicker.js';
|
||||
import { PanelNavigation } from './panelNavigation.js';
|
||||
import { applicationPinia, createUiRuntime } from './vueRuntime.js';
|
||||
import { useContextStore } from './stores/context.js';
|
||||
import { useSpaceMissionsStore } from './stores/spaceMissions.js';
|
||||
import { SpaceMissionsControls } from './spaceMissionsControls.js';
|
||||
import { useMissionReplayStore } from './stores/missionReplay.js';
|
||||
import { useCelestialRingStore } from './stores/celestialRing.js';
|
||||
import { icrfToFixedAxes } from '../sky/icrf.js';
|
||||
@@ -78,6 +80,12 @@ import { useCockpitStore } from './stores/cockpit.js';
|
||||
import { useGlobeActionsStore } from './stores/globeActions.js';
|
||||
import { useRecordingStore } from './stores/recording.js';
|
||||
import { onPlacePacksLoadingChange } from '../data/placeBelow.js';
|
||||
import {
|
||||
hideOsmCredit,
|
||||
registerDynamicCredit,
|
||||
showOsmCredit,
|
||||
WIKIDATA_PLACES_CREDIT,
|
||||
} from '../data/dataCredits.js';
|
||||
import { withPlacePacks } from './placePacksLoading.js';
|
||||
import { preloadOwnerFlags } from './ownerFlag.js';
|
||||
|
||||
@@ -106,6 +114,9 @@ export class StyleManager extends ShellFacade {
|
||||
* @param {object} [options]
|
||||
* @param {boolean} [options.localePicker=true] - false removes the language
|
||||
* picker, for a host that offers its own language choice.
|
||||
* @param {{lon: number, lat: number, height: number, heading?: number,
|
||||
* pitch?: number}|null} [options.homeView] - where the title's logo goes
|
||||
* back to (degrees): the view the app started from.
|
||||
*/
|
||||
constructor(
|
||||
viewer,
|
||||
@@ -116,6 +127,7 @@ export class StyleManager extends ShellFacade {
|
||||
requestServices,
|
||||
initialShareCode = null,
|
||||
localePicker = true,
|
||||
homeView = null,
|
||||
} = {},
|
||||
) {
|
||||
super();
|
||||
@@ -178,6 +190,14 @@ export class StyleManager extends ShellFacade {
|
||||
layers: () => this._dataManager?.getAll?.() || [],
|
||||
setLayer: (id, enabled) =>
|
||||
this._dataManager?.setEnabled(id, enabled, { origin: 'user' }),
|
||||
// The Omnibar shows names from the bundled Wikidata packs.
|
||||
creditPlaces: () =>
|
||||
registerDynamicCredit(this.viewer, WIKIDATA_PLACES_CREDIT),
|
||||
// Photon's suggestions are OpenStreetMap data: credited while shown.
|
||||
creditSuggestions: (shown) =>
|
||||
shown
|
||||
? showOsmCredit(this.viewer, 'omnibar')
|
||||
: hideOsmCredit(this.viewer, 'omnibar'),
|
||||
});
|
||||
// Scrolling at a screen edge steps through that side's rail panels.
|
||||
this._removeRailEdgeScroll = installRailEdgeScroll();
|
||||
@@ -307,6 +327,7 @@ export class StyleManager extends ShellFacade {
|
||||
readControls: () => ({
|
||||
hud: this.hud,
|
||||
_contextControls: this._contextControls,
|
||||
_spaceMissionsControls: this._spaceMissionsControls,
|
||||
_cctvControls: this._cctvControls,
|
||||
_radioControls: this._radioControls,
|
||||
_streetLevelControls: this._streetLevelControls,
|
||||
@@ -340,6 +361,7 @@ export class StyleManager extends ShellFacade {
|
||||
this._locationNavigation = new LocationNavigation({
|
||||
viewer,
|
||||
placeSearch,
|
||||
homeView,
|
||||
navigation: this._navigation,
|
||||
readCockpit: () => this.cockpitView,
|
||||
services: {
|
||||
@@ -669,6 +691,7 @@ export class StyleManager extends ShellFacade {
|
||||
this._initStreetLevelPanel();
|
||||
this._initWildlifeSightingCard();
|
||||
this._initGlobalContextPanel();
|
||||
this._initSpaceMissionsPanel();
|
||||
this._initLocationBar();
|
||||
this._initMobileShell();
|
||||
this._initShareButton();
|
||||
@@ -1005,17 +1028,12 @@ export class StyleManager extends ShellFacade {
|
||||
}
|
||||
|
||||
_initGlobalContextPanel() {
|
||||
const {
|
||||
radioLayer,
|
||||
militaryInstallationsLayer,
|
||||
militaryAwarenessLayer,
|
||||
rocketLaunchesLayer,
|
||||
} = this.services;
|
||||
const { radioLayer, militaryInstallationsLayer, militaryAwarenessLayer } =
|
||||
this.services;
|
||||
const contextStore = useContextStore(applicationPinia());
|
||||
this._contextControls = new ContextControls({
|
||||
elements: {
|
||||
_globalContextFlightsBtn: this._globalContextFlightsBtn,
|
||||
_globalContextMissionsBtn: this._globalContextMissionsBtn,
|
||||
_installationsSearchBtn: this._installationsSearchBtn,
|
||||
},
|
||||
installations: militaryInstallationsLayer,
|
||||
@@ -1051,13 +1069,24 @@ export class StyleManager extends ShellFacade {
|
||||
militaryAwarenessLayer?.subscribeDirectionOverlay?.((view) =>
|
||||
awarenessDirectionStore.publish(view),
|
||||
);
|
||||
}
|
||||
|
||||
_initSpaceMissionsPanel() {
|
||||
const { rocketLaunchesLayer } = this.services;
|
||||
// The Space Missions layer publishes its roster and selected mission.
|
||||
contextStore.connectMissions(rocketLaunchesLayer);
|
||||
this._missionsPanelUnsubscribe?.();
|
||||
contextStore.publishMissions(null);
|
||||
this._missionsPanelUnsubscribe = rocketLaunchesLayer?.subscribePanel?.(
|
||||
(view) => contextStore.publishMissions(view),
|
||||
);
|
||||
this._spaceMissionsControls?.destroy();
|
||||
this._spaceMissionsControls = new SpaceMissionsControls({
|
||||
layer: rocketLaunchesLayer,
|
||||
store: useSpaceMissionsStore(applicationPinia()),
|
||||
actions: {
|
||||
setPanelCollapsed: (...args) => this.setPanelCollapsed(...args),
|
||||
isCockpitActive: () => Boolean(this.cockpitView?.active),
|
||||
// After the panel has rendered as shown: the phone shell will not
|
||||
// open the Missions sheet over a hidden panel.
|
||||
revealPanel: () =>
|
||||
nextTick(() => this.revealPanel('space-missions-panel')),
|
||||
},
|
||||
});
|
||||
// And its replay vehicle overlay, which the scene chrome renders.
|
||||
const missionReplayStore = useMissionReplayStore(applicationPinia());
|
||||
this._missionReplayUnsubscribe?.();
|
||||
@@ -1370,17 +1399,18 @@ export class StyleManager extends ShellFacade {
|
||||
}
|
||||
|
||||
/**
|
||||
* Switches the HUD layout variant.
|
||||
* Switches the HUD layout variant. The removed Cyber layout is accepted
|
||||
* as an alias: it opens Tactical with the Sonar style on.
|
||||
* @param {'tactical'|'minimal'|'cyber'} variantName - Layout variant.
|
||||
* @returns {{ok: boolean, layout?: string, visible?: boolean, error?: string}}
|
||||
*/
|
||||
setHudLayout(variantName) {
|
||||
const variant = String(variantName ?? '').toLowerCase();
|
||||
if (!isHudLayout(variant)) {
|
||||
if (!isHudLayout(variant) && !isLegacySonarHudLayout(variant)) {
|
||||
return { ok: false, error: `Unknown HUD layout: ${variantName}` };
|
||||
}
|
||||
this.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
this._setHudVariant(variant, { applyVisualDefaults: true });
|
||||
this._setHudVariant(variant);
|
||||
return {
|
||||
ok: true,
|
||||
layout: this.hud.getVariant(),
|
||||
@@ -1499,7 +1529,7 @@ export class StyleManager extends ShellFacade {
|
||||
};
|
||||
}
|
||||
|
||||
/** Apply Cyber-only sonar settings through the shared visual controls. */
|
||||
/** Apply sonar visual-style settings through the shared visual controls. */
|
||||
setCyberSonar(settings) {
|
||||
return setCyberSonarControls(this, settings);
|
||||
}
|
||||
@@ -1635,8 +1665,6 @@ export class StyleManager extends ShellFacade {
|
||||
* @param {string} styleName - Target style ('normal'|'retro'|'surveillance'|'thermal'|'anime'|'noir').
|
||||
* @param {object} [options]
|
||||
* @param {boolean} [options.applyPreset=true] - Whether to apply STYLE_PRESET_DEFAULTS for the new style.
|
||||
* @param {boolean} [options.userInitiated=false] - Whether a direct user preset choice owns the Cyber exit style.
|
||||
* @param {boolean} [options.preserveCyberRestore=false] - Whether an automatic style update keeps the Cyber entry snapshot.
|
||||
* @returns {void}
|
||||
*/
|
||||
setStyle(
|
||||
@@ -1716,7 +1744,12 @@ export class StyleManager extends ShellFacade {
|
||||
const store = useGlobeActionsStore(applicationPinia());
|
||||
if (this._resetToken) store.detach(this._resetToken);
|
||||
this._resetToken = controls
|
||||
? store.connect({ reset: () => controls.reset() })
|
||||
? store.connect({
|
||||
reset: () => controls.reset(),
|
||||
home: () => {
|
||||
if (!this._disposed) void this.returnToStart();
|
||||
},
|
||||
})
|
||||
: null;
|
||||
// A reset under way as the controls are replaced stays on the buttons.
|
||||
if (this._resetToken && this._globeResetting != null)
|
||||
@@ -1931,16 +1964,14 @@ export class StyleManager extends ShellFacade {
|
||||
this._awarenessDirectionUnsubscribe?.();
|
||||
this._awarenessDirectionUnsubscribe = null;
|
||||
useAwarenessDirectionStore(applicationPinia()).publish(null);
|
||||
this._missionsPanelUnsubscribe?.();
|
||||
this._missionsPanelUnsubscribe = null;
|
||||
this._spaceMissionsControls?.destroy();
|
||||
this._spaceMissionsControls = null;
|
||||
this._missionReplayUnsubscribe?.();
|
||||
this._missionReplayUnsubscribe = null;
|
||||
useMissionReplayStore(applicationPinia()).publish(null);
|
||||
const contextStore = useContextStore(applicationPinia());
|
||||
contextStore.connectAwareness(null);
|
||||
contextStore.publishAwareness(null);
|
||||
contextStore.connectMissions(null);
|
||||
contextStore.publishMissions(null);
|
||||
this._cockpitCoordinator.stop();
|
||||
this._visualSettings.stop();
|
||||
this.shareLinkManager?.destroy();
|
||||
|
||||
Reference in new issue
Block a user