mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Remove the Cyber HUD layout and keep its sonar as a visual style
Display > HUD > Sonar now turns the sonar sweep on over Tactical or Minimal. It is off by default, ON reveals its five sliders, and it keeps its guards: an OFF control, the sweep only while the HUD is visible and outside Cockpit, no animation under reduced motion, and repaint timers re-armed only after a drawn frame that still shows contacts. The Cyber layout, its shell skin and its Cockpit lanes are removed. Share links, scenes, saved views and set_hud that name Cyber open Tactical with Sonar on; links and scene shots record Tactical with Sonar under the same code, and a restored state that names another layout turns Sonar off. set_cyber_sonar keeps its name and works under any layout. A newer Sonar toggle or voice setting wins over a share-link restore that lands later. From 1200px wide the command dock and World Timeline sit 74px above the bottom edge, as in the Omnibar layout, leaving the bottom row to the map attribution (left) and the Power Up corner row (right). The attribution moves to the bottom right when the page runs right to left, where the corner row sits at the bottom left, and a long credit line wraps upward before reaching the corner row. The Tactical bottom-right readout sits 8px above Power Up and the coordinates start level with it. The World Timeline is narrowed to sit between the corners. Toasts keep clear of the raised dock and the chat and voice panel height budgets subtract its rise. Below 1200px the layout is unchanged. The left rail treats the centered World Timeline and voice control as obstacles only where they reach a laid-out panel. On top of the Omnibar: sonar.css replaces cyber.css after the Omnibar imports, the Omnibar's HUD guide step now says Layout picks Tactical or Minimal, and the Omnibar's Tactical bottom-right readout keeps the same 8px above Power Up. Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
1 parent
35b87c75f2
commit
d68adcea21
112 files changed
+1433
-5239
No files matched your search
@@ -595,7 +595,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
|
||||
const portal = CockpitDisplayPortal.toString();
|
||||
assert.match(
|
||||
portal,
|
||||
/this\.standardScrollTop =\s*displayPanelScroller\(standardPanel\)\?\.scrollTop \|\| 0/,
|
||||
/this\.standardScrollTop = standardPanel\?\.scrollTop \|\| 0/,
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
@@ -603,7 +603,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
/if \(!this\.active\)[\s\S]*?this\.standardScrollTop =\s*displayPanelScroller\(standardPanel\)\.scrollTop/,
|
||||
/if \(!this\.active\)[\s\S]*?this\.standardScrollTop = standardPanel\.scrollTop/,
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
@@ -611,7 +611,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
/this\.cockpitPanel\.scrollTop = this\.cockpitScrollTop[\s\S]*?displayPanelScroller\(this\.standardPanel\)\.scrollTop =\s*this\.standardScrollTop/,
|
||||
/this\.cockpitPanel\.scrollTop = this\.cockpitScrollTop[\s\S]*?this\.standardPanel\.scrollTop = this\.standardScrollTop/,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* @param {number} [input.signalGap] Clearance above the briefing card.
|
||||
* @param {number} [input.minTopFloor] Absolute ceiling for the strip, in px.
|
||||
* @param {number} [input.minTopRatio] Viewport-relative ceiling, 0..1.
|
||||
* @param {boolean} [input.signalCollapsed] Whether the briefing card is collapsed.
|
||||
* @param {boolean} [input.utilityExpanded] Whether Display or Radio is expanded.
|
||||
* @param {number} [input.bottomInset] Reserved viewport space below an expanded panel.
|
||||
* @param {number} [input.signalHeight] Collapsed briefing header reserved below the utility.
|
||||
* @param {boolean} [input.reserveViewportLane] Theme relocates the briefing below the expanded utility.
|
||||
* @returns {{ top: number, maxHeight: number }}
|
||||
*/
|
||||
export function resolveCockpitUtilityAnchor({
|
||||
@@ -34,29 +29,13 @@ export function resolveCockpitUtilityAnchor({
|
||||
signalGap = 8,
|
||||
minTopFloor = 96,
|
||||
minTopRatio = 0.12,
|
||||
signalCollapsed = false,
|
||||
utilityExpanded = false,
|
||||
bottomInset = 80,
|
||||
signalHeight = 0,
|
||||
reserveViewportLane = false,
|
||||
}) {
|
||||
const viewport = Math.max(0, Number(viewportHeight) || 0);
|
||||
const minTop = Math.max(minTopFloor, viewport * minTopRatio);
|
||||
const anchoredTop = Math.max(minTop, (Number(recBottom) || 0) + recGap);
|
||||
const strip = Math.max(0, Number(stripHeight) || 0);
|
||||
const signal = Number(signalTop);
|
||||
const expandedLaneBottom = Math.max(
|
||||
0,
|
||||
viewport -
|
||||
Math.max(0, Number(bottomInset) || 0) -
|
||||
Math.max(0, Number(signalHeight) || 0),
|
||||
);
|
||||
const lowerBound =
|
||||
reserveViewportLane && signalCollapsed && utilityExpanded
|
||||
? expandedLaneBottom
|
||||
: Number.isFinite(signal)
|
||||
? signal
|
||||
: viewport;
|
||||
const lowerBound = Number.isFinite(signal) ? signal : viewport;
|
||||
const clearedTop = lowerBound - signalGap - strip;
|
||||
const top = Math.max(minTop, Math.min(anchoredTop, clearedTop));
|
||||
const floor = Math.max(0, Number(collapsedHeight) || 0) || 50;
|
||||
@@ -100,25 +79,3 @@ export function resolveCockpitUtilityLayout({
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
/** Shared Cyber panel slot, with footer controls above the lower frame (83vh). */
|
||||
export function resolveCyberCockpitPanelLane({
|
||||
viewportHeight,
|
||||
top,
|
||||
launcherHeight = 60,
|
||||
signalHeight = 44,
|
||||
contactHeight = 64,
|
||||
}) {
|
||||
const gap = 8;
|
||||
const footerHeight = Math.max(
|
||||
contactHeight + gap,
|
||||
launcherHeight + signalHeight + gap * 2,
|
||||
);
|
||||
const bottom = viewportHeight * 0.82;
|
||||
const panelHeight = Math.max(120, bottom - top - footerHeight);
|
||||
return {
|
||||
panelHeight,
|
||||
utilityHeight: panelHeight + gap + launcherHeight,
|
||||
signalTop: top + panelHeight + launcherHeight + gap * 2,
|
||||
};
|
||||
}
|
||||
@@ -4,58 +4,11 @@ import assert from 'node:assert/strict';
|
||||
import {
|
||||
resolveCockpitUtilityAnchor,
|
||||
resolveCockpitUtilityLayout,
|
||||
resolveCyberCockpitPanelLane,
|
||||
} from './cockpitUtilityLayout.js';
|
||||
|
||||
// 1512x790, the height the strip used to collide with the briefing card at.
|
||||
const desktop = { viewportHeight: 790, stripHeight: 107, collapsedHeight: 50 };
|
||||
|
||||
test('Cyber shared panel slot reserves both footer lanes above the decorative frame', () => {
|
||||
for (const viewportHeight of [600, 673, 713, 986, 1376]) {
|
||||
for (const signalHeight of [44, 76]) {
|
||||
for (const contactHeight of [44, 84, 120]) {
|
||||
const top = Math.max(164, Math.min(204, viewportHeight * 0.19));
|
||||
const lane = resolveCyberCockpitPanelLane({ viewportHeight, top, signalHeight, contactHeight });
|
||||
assert.ok(lane.panelHeight >= 120);
|
||||
assert.ok(top + lane.panelHeight + 8 + contactHeight <= viewportHeight * 0.82 + .01);
|
||||
assert.ok(lane.signalTop + signalHeight <= viewportHeight * 0.82 + .01);
|
||||
assert.equal(lane.signalTop, top + lane.utilityHeight + 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('Cyber keeps the Data Layers top while reserving briefing clearance', () => {
|
||||
for (const viewportHeight of [673, 713, 986, 1376]) {
|
||||
const leftTop = Math.max(164, Math.min(204, viewportHeight * 0.19));
|
||||
const collapsed = resolveCockpitUtilityAnchor({
|
||||
viewportHeight, stripHeight: 128, collapsedHeight: 60, recBottom: 0,
|
||||
signalTop: leftTop + 128 + 28, minTopFloor: leftTop, minTopRatio: 0,
|
||||
});
|
||||
assert.equal(collapsed.top, leftTop);
|
||||
assert.ok(collapsed.maxHeight >= 128);
|
||||
const expanded = resolveCockpitUtilityAnchor({
|
||||
viewportHeight, stripHeight: 700, collapsedHeight: 60, recBottom: 0,
|
||||
signalTop: 255, minTopFloor: leftTop, minTopRatio: 0,
|
||||
signalCollapsed: true, utilityExpanded: true, reserveViewportLane: true, signalHeight: 44,
|
||||
});
|
||||
assert.equal(expanded.top, leftTop);
|
||||
assert.equal(expanded.top + expanded.maxHeight + 8 + 44 + 80, viewportHeight);
|
||||
}
|
||||
});
|
||||
|
||||
test('expanded utilities reserve the visible collapsed briefing header at every desktop height', () => {
|
||||
for (const viewportHeight of [640, 720, 987, 1376]) {
|
||||
for (const signalHeight of [48, 76, 100]) {
|
||||
const { top, maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop, viewportHeight, recBottom: 0, signalTop: 255,
|
||||
signalCollapsed: true, utilityExpanded: true, signalHeight, reserveViewportLane: true,
|
||||
});
|
||||
assert.equal(top + maxHeight + 8, viewportHeight - 80 - signalHeight);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('the strip hangs 12px under the REC readout when the briefing card leaves room', () => {
|
||||
const { top } = resolveCockpitUtilityAnchor({ ...desktop, recBottom: 148.1, signalTop: 420 });
|
||||
assert.equal(Number(top.toFixed(1)), 160.1);
|
||||
@@ -101,34 +54,11 @@ test('a missing REC readout leaves the strip on the viewport ceiling', () => {
|
||||
assert.equal(top, 96);
|
||||
});
|
||||
|
||||
test('an expanded utility claims the vertical lane released by a collapsed briefing', () => {
|
||||
const { top, maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop,
|
||||
recBottom: 148.1,
|
||||
signalTop: 265.4,
|
||||
signalCollapsed: true,
|
||||
utilityExpanded: true,
|
||||
reserveViewportLane: true,
|
||||
});
|
||||
assert.equal(Number(top.toFixed(1)), 160.1);
|
||||
assert.equal(Number(maxHeight.toFixed(1)), 541.9);
|
||||
});
|
||||
|
||||
test('non-relocating themes preserve the visible briefing boundary even when collapsed', () => {
|
||||
test('the visible briefing card bounds the utility strip, collapsed or not', () => {
|
||||
const { top, maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop, recBottom: 148.1, signalTop: 265.4,
|
||||
signalCollapsed: true, utilityExpanded: true,
|
||||
});
|
||||
assert.equal(Number((top + maxHeight).toFixed(1)), 257.4);
|
||||
});
|
||||
|
||||
test('a collapsed briefing still bounds the utility strip until a panel expands', () => {
|
||||
const { maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop,
|
||||
recBottom: 148.1,
|
||||
signalTop: 265.4,
|
||||
signalCollapsed: true,
|
||||
});
|
||||
assert.equal(Number(maxHeight.toFixed(1)), 107);
|
||||
});
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ test('Context reads as one segmented control with legible type and no halo', ()
|
||||
// open Context title legible; no Context-only rule dims it again.
|
||||
assert.equal(
|
||||
rule(
|
||||
":root:not([data-ui-theme='cyber']) #global-context-panel:not(.collapsed) .panel-title",
|
||||
":root #global-context-panel:not(.collapsed) .panel-title",
|
||||
),
|
||||
'',
|
||||
);
|
||||
|
||||
+8
-6
@@ -527,10 +527,15 @@ export function cyberSonarLabelIntensity(
|
||||
return labelDimFactor + (1 - labelDimFactor) * normalized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sonar is an opt-in visual style over any HUD layout: it is on only after
|
||||
* the Display panel's Sonar toggle, a voice request or a legacy Cyber link
|
||||
* turns it on.
|
||||
*/
|
||||
export function isCyberSonarEnabled(
|
||||
root = globalThis.document?.documentElement,
|
||||
) {
|
||||
return root?.dataset?.cyberSonar !== 'off';
|
||||
return root?.dataset?.cyberSonar === 'on';
|
||||
}
|
||||
|
||||
export function setCyberSonarEnabled(
|
||||
@@ -539,9 +544,7 @@ export function setCyberSonarEnabled(
|
||||
) {
|
||||
if (!root?.dataset) return false;
|
||||
root.dataset.cyberSonar = enabled ? 'on' : 'off';
|
||||
if (root.dataset.uiTheme === 'cyber') {
|
||||
applyCyberSonarThemePhase(root, enabled);
|
||||
}
|
||||
applyCyberSonarThemePhase(root, enabled);
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@@ -566,7 +569,6 @@ export function isCyberSonarActive({
|
||||
globalThis.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches ??
|
||||
false;
|
||||
return !!(
|
||||
root?.dataset?.uiTheme === 'cyber' &&
|
||||
isCyberSonarEnabled(root) &&
|
||||
(hudActive ?? hud?.classList?.contains?.('active')) &&
|
||||
!body?.classList?.contains?.('cockpit-mode') &&
|
||||
@@ -583,7 +585,7 @@ export function isCyberMapThemeActive({
|
||||
if (hud === undefined)
|
||||
hud = globalThis.document?.getElementById?.('intel-hud');
|
||||
return !!(
|
||||
root?.dataset?.uiTheme === 'cyber' &&
|
||||
isCyberSonarEnabled(root) &&
|
||||
(hudActive ?? hud?.classList?.contains?.('active')) &&
|
||||
!body?.classList?.contains?.('cockpit-mode')
|
||||
);
|
||||
|
||||
+13
-9
@@ -39,7 +39,7 @@ test('production-transformed sonar defaults retain the document method receiver'
|
||||
const previous = Object.getOwnPropertyDescriptor(globalThis, 'document');
|
||||
const hud = { classList: { contains: (name) => name === 'active' } };
|
||||
const document = {
|
||||
documentElement: { dataset: { uiTheme: 'cyber' } },
|
||||
documentElement: { dataset: { cyberSonar: 'on' } },
|
||||
body: { classList: { contains: () => false } },
|
||||
getElementById(id) {
|
||||
assert.equal(this, document);
|
||||
@@ -57,7 +57,7 @@ test('production-transformed sonar defaults retain the document method receiver'
|
||||
assert.ok(
|
||||
Number.isFinite(compiled.createCyberSonarSampler(800, 600).at(400, 300)),
|
||||
);
|
||||
document.documentElement.dataset.uiTheme = 'tactical';
|
||||
document.documentElement.dataset.cyberSonar = 'off';
|
||||
assert.equal(compiled.isCyberSonarActive(), false);
|
||||
assert.equal(compiled.isCyberMapThemeActive(), false);
|
||||
} finally {
|
||||
@@ -139,8 +139,8 @@ test('the sweep brightens contacts inside its sector and dims the remainder', ()
|
||||
);
|
||||
});
|
||||
|
||||
test('the sonar activates only for a visible Cyber map HUD with motion enabled', () => {
|
||||
const root = { dataset: { uiTheme: 'cyber' } };
|
||||
test('the sonar activates only while on, over a visible map HUD with motion enabled', () => {
|
||||
const root = { dataset: { cyberSonar: 'on' } };
|
||||
const classes = (...values) => ({
|
||||
contains: (value) => values.includes(value),
|
||||
});
|
||||
@@ -220,14 +220,18 @@ test('the opacity setting controls every contact floor and preserves brighter la
|
||||
);
|
||||
});
|
||||
|
||||
test('the sonar control defaults on and records explicit operator state', () => {
|
||||
test('the sonar control defaults off and records explicit operator state', () => {
|
||||
const root = { dataset: {} };
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
// The removed Cyber theme no longer turns it on.
|
||||
root.dataset.uiTheme = 'cyber';
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
assert.equal(setCyberSonarEnabled(true, root), true);
|
||||
assert.equal(root.dataset.cyberSonar, 'on');
|
||||
assert.equal(isCyberSonarEnabled(root), true);
|
||||
assert.equal(setCyberSonarEnabled(false, root), false);
|
||||
assert.equal(root.dataset.cyberSonar, 'off');
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
assert.equal(setCyberSonarEnabled(true, root), true);
|
||||
assert.equal(root.dataset.cyberSonar, 'on');
|
||||
});
|
||||
|
||||
test('real Cesium points and billboards recover after repeated low/high opacity cycles', () => {
|
||||
@@ -349,10 +353,10 @@ test('the sweep corrects delayed starts and reacquires restarted animations with
|
||||
assert.doesNotThrow(() => syncCyberSonarAnimation({}));
|
||||
});
|
||||
|
||||
test('the selected Cyber theme seeds and releases the compositor sweep phase', () => {
|
||||
test('turning Sonar on seeds and releases the compositor sweep phase', () => {
|
||||
const values = new Map();
|
||||
const root = {
|
||||
dataset: {},
|
||||
dataset: { cyberSonar: 'on' },
|
||||
style: {
|
||||
setProperty: (name, value) => values.set(name, value),
|
||||
removeProperty: (name) => values.delete(name),
|
||||
|
||||
@@ -45,7 +45,7 @@ test('frame sampler matches reference without per-contact settings access', () =
|
||||
});
|
||||
|
||||
test('removed CSS mode cannot disable GPU contacts; unsupported renderers fail closed', () => {
|
||||
const root = { dataset: { uiTheme: 'cyber' }, style: { setProperty() {} } };
|
||||
const root = { dataset: { cyberSonar: 'on' }, style: { setProperty() {} } };
|
||||
const options = {
|
||||
root,
|
||||
body: { classList: { contains: () => false } },
|
||||
@@ -97,7 +97,7 @@ function fixture({ modulation = true, lists = true } = {}) {
|
||||
document: globalThis.document,
|
||||
matchMedia: globalThis.matchMedia,
|
||||
};
|
||||
const root = { dataset: { uiTheme: 'cyber', cyberSonar: 'on' } };
|
||||
const root = { dataset: { cyberSonar: 'on' } };
|
||||
const status = { textContent: '' };
|
||||
const state = { cockpit: false, reducedMotion: false };
|
||||
globalThis.document = {
|
||||
@@ -232,36 +232,47 @@ test('the sweep sets its sector on drawing ticks and at the cadence, and changes
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 4, 'a resize sets it at once');
|
||||
assert.deepEqual(f.sets[3].center, { x: 300, y: 400 });
|
||||
f.root.dataset.cyberSonar = 'off';
|
||||
f.root.dataset.cyberSonarOpacity = '50';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[4].radius, 0, 'Sonar OFF rests every contact');
|
||||
assert.equal(f.sets.length, 5, 'a setting change sets it at once');
|
||||
assert.equal(
|
||||
f.sets[4].floor,
|
||||
0.5,
|
||||
'while sweeping the floor is the opacity',
|
||||
);
|
||||
f.state.reducedMotion = true;
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[5].radius, 0, 'reduced motion rests the sweep');
|
||||
assert.equal(f.sets[5].floor, 0.5 + 0.5 * 0.46, 'at rest it lifts');
|
||||
clock += 1000;
|
||||
f.tick(true);
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 5, 'at rest only changes set it');
|
||||
f.root.dataset.cyberSonarOpacity = '50';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 6);
|
||||
assert.equal(f.sets[5].floor, 0.5 + 0.5 * 0.46);
|
||||
assert.equal(f.sets.length, 6, 'at rest only changes set it');
|
||||
f.state.reducedMotion = false;
|
||||
f.state.cockpit = true;
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[6], null, 'out of the map theme it clears');
|
||||
assert.equal(f.sets[6], null, 'out of the map it clears');
|
||||
f.tick(true);
|
||||
assert.equal(f.sets.length, 7, 'cleared once');
|
||||
f.state.cockpit = false;
|
||||
f.root.dataset.cyberSonar = 'off';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 7, 'Sonar OFF leaves contacts untreated');
|
||||
f.root.dataset.cyberSonar = 'on';
|
||||
f.state.reducedMotion = true;
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[7].radius, 0, 'reduced motion rests the sweep');
|
||||
f.state.reducedMotion = false;
|
||||
f.root.dataset.uiTheme = 'tactical';
|
||||
assert.ok(f.sets[7]?.radius > 0, 'Sonar ON sweeps at once');
|
||||
f.root.dataset.cyberSonar = 'off';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[8], null, 'another HUD style clears it');
|
||||
assert.equal(f.sets[8], null, 'Sonar OFF clears it');
|
||||
f.tick(true);
|
||||
assert.equal(f.sets.length, 9);
|
||||
// The removed Cyber theme attribute alone does nothing.
|
||||
f.root.dataset.uiTheme = 'cyber';
|
||||
f.tick(false);
|
||||
assert.ok(f.sets[9]?.radius > 0, 'back in Cyber it sweeps at once');
|
||||
assert.equal(f.sets.length, 9);
|
||||
f.root.dataset.cyberSonar = 'on';
|
||||
f.tick(false);
|
||||
assert.ok(f.sets[9]?.radius > 0, 'back on, it sweeps at once');
|
||||
assert.deepEqual(f.requests, [], 'the scene itself never asks for frames');
|
||||
dispose();
|
||||
assert.equal(f.sets[10], null, 'disposal clears it');
|
||||
|
||||
@@ -53,7 +53,7 @@ test('the echo bracket pulses outward from the contact bracket and fades', (t) =
|
||||
assert.ok(half.spreadPx > echo.spreadPx * 0.5);
|
||||
assert.ok(half.spreadPx < echo.spreadPx);
|
||||
assert.ok(half.band < STEPS && half.band >= 1);
|
||||
// The bracket's own dimming (keyhole fade, Cyber sonar sweep) carries
|
||||
// The bracket's own dimming (keyhole fade, sonar sweep) carries
|
||||
// over, and the echo is never drawn brighter than its bracket: a bracket
|
||||
// too dim for even one band draws no echo.
|
||||
assert.equal(at(arrival, 0.25).band, 2);
|
||||
|
||||
@@ -941,13 +941,13 @@ test('a Global Context echo bracket is drawn outside its contact bracket and dim
|
||||
}
|
||||
});
|
||||
|
||||
test('under the Cyber sonar sweep an echo is never brighter than its own bracket', () => {
|
||||
test('under the sonar sweep an echo is never brighter than its own bracket', () => {
|
||||
const env = installEnvironment();
|
||||
// The cyber theme with its HUD open turns the contact sonar on; its sweep
|
||||
// dims brackets it is not passing over.
|
||||
// Sonar on with its HUD open turns the contact sonar on; its sweep dims
|
||||
// brackets it is not passing over.
|
||||
env.document.documentElement = {
|
||||
// The lowest sweep floor, so dimmed brackets drop a whole alpha band.
|
||||
dataset: { uiTheme: 'cyber', cyberSonarOpacity: '35' },
|
||||
dataset: { cyberSonar: 'on', cyberSonarOpacity: '35' },
|
||||
style: { setProperty() {}, removeProperty() {} },
|
||||
};
|
||||
const hud = env.document.createElement('div');
|
||||
|
||||
@@ -998,9 +998,9 @@ test('the voice TOOL SCHEMA matches the pinned contract — the mission mapping
|
||||
);
|
||||
const hudLayout = legacyTools.find((tool) => tool.name === 'set_hud')
|
||||
.parameters.properties.layout;
|
||||
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal', 'cyber']);
|
||||
// Cyber deliberately adds one layout and Operator was retired; first-run
|
||||
// missions still change no tools.
|
||||
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal']);
|
||||
// Operator and then Cyber were retired; first-run missions still change
|
||||
// no tools.
|
||||
hudLayout.enum = ['tactical', 'operator', 'minimal'];
|
||||
const cameraMotion = legacyTools.find((tool) => tool.name === 'move_camera')
|
||||
.parameters.properties.motion;
|
||||
|
||||
+4
-10
@@ -14,7 +14,7 @@ import { applicationServices } from './services/application.js';
|
||||
* on independent fixed cadences.
|
||||
*
|
||||
* The HUD auto-activates when a military-style shader (NVG, FLIR, CRT) is
|
||||
* selected and supports the layout variants: tactical, minimal, cyber.
|
||||
* selected and supports the layout variants: tactical, minimal.
|
||||
*
|
||||
* Color theming is driven by the active shader mode via CSS custom properties.
|
||||
*/
|
||||
@@ -50,11 +50,7 @@ import {
|
||||
provenanceLine,
|
||||
provenanceTag,
|
||||
} from './data/layerSnapshot.js';
|
||||
import {
|
||||
applyHudUiTheme,
|
||||
DEFAULT_HUD_LAYOUT,
|
||||
normalizeHudLayout,
|
||||
} from './hudLayouts.js';
|
||||
import { DEFAULT_HUD_LAYOUT, normalizeHudLayout } from './hudLayouts.js';
|
||||
import {
|
||||
formatNumber,
|
||||
getLocale,
|
||||
@@ -1168,14 +1164,12 @@ export class IntelHUD {
|
||||
|
||||
/**
|
||||
* Switch the HUD layout variant. Falls back to `'tactical'` if the
|
||||
* name is unrecognized. Cyber also applies a coordinated skin to the full
|
||||
* application shell; leaving Cyber restores the standard shell tokens.
|
||||
* @param {string} variantName - One of `'tactical'`, `'minimal'`, `'cyber'`.
|
||||
* name is unrecognized.
|
||||
* @param {string} variantName - One of `'tactical'`, `'minimal'`.
|
||||
*/
|
||||
setVariant(variantName) {
|
||||
this._variant = normalizeHudLayout(variantName);
|
||||
this._present({ variant: this._variant });
|
||||
applyHudUiTheme(document.documentElement, this._variant);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,2 +1,9 @@
|
||||
/** Browser-free layout vocabulary shared by UI and server-side voice tools. */
|
||||
export const HUD_LAYOUTS = Object.freeze(['tactical', 'minimal', 'cyber']);
|
||||
export const HUD_LAYOUTS = Object.freeze(['tactical', 'minimal']);
|
||||
|
||||
/**
|
||||
* Removed layouts that old share links, scenes and saved views may still
|
||||
* name. Cyber became the Sonar visual style: it opens in Tactical with
|
||||
* Sonar on.
|
||||
*/
|
||||
export const LEGACY_SONAR_HUD_LAYOUTS = Object.freeze(['cyber']);
|
||||
+6
-43
@@ -1,18 +1,10 @@
|
||||
import { applyCyberSonarThemePhase } from './cyberSonar.js';
|
||||
import { syncRadioPanelPlacement } from './ui/radioPanelPlacement.js';
|
||||
import { HUD_LAYOUTS } from './hudLayoutPolicy.js';
|
||||
export { HUD_LAYOUTS } from './hudLayoutPolicy.js';
|
||||
import { HUD_LAYOUTS, LEGACY_SONAR_HUD_LAYOUTS } from './hudLayoutPolicy.js';
|
||||
export { HUD_LAYOUTS, LEGACY_SONAR_HUD_LAYOUTS } from './hudLayoutPolicy.js';
|
||||
|
||||
/** Canonical HUD layouts shared by the UI, voice schema and HUD renderer. */
|
||||
|
||||
export const DEFAULT_HUD_LAYOUT = 'tactical';
|
||||
|
||||
/** Visual treatment applied only when an operator explicitly enters Cyber. */
|
||||
export const CYBER_VISUAL_DEFAULTS = Object.freeze({
|
||||
style: 'thermal',
|
||||
ironbow: 0.42,
|
||||
});
|
||||
|
||||
const HUD_LAYOUT_SET = new Set(HUD_LAYOUTS);
|
||||
|
||||
/** @param {unknown} value */
|
||||
@@ -27,38 +19,9 @@ export function normalizeHudLayout(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the opt-in visual defaults for an explicit layout transition.
|
||||
* Restores and repeated Cyber selections return null so they never overwrite
|
||||
* a shared link or a user's subsequent FLIR tuning.
|
||||
* Whether a layout name is a removed layout that now means "Sonar on".
|
||||
* @param {unknown} value
|
||||
*/
|
||||
export function cyberVisualDefaultsForHudTransition(
|
||||
previousLayout,
|
||||
nextLayout,
|
||||
{ explicit = false } = {},
|
||||
) {
|
||||
if (!explicit) return null;
|
||||
if (normalizeHudLayout(previousLayout) === 'cyber') return null;
|
||||
if (normalizeHudLayout(nextLayout) !== 'cyber') return null;
|
||||
return CYBER_VISUAL_DEFAULTS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Keep the global shell skin derived from the selected HUD layout. The data
|
||||
* attribute lives on <html> so theme tokens are available to every UI surface.
|
||||
* @param {HTMLElement|{dataset?: Record<string, string>}|null|undefined} root
|
||||
* @param {unknown} layout
|
||||
* @returns {'cyber'|null}
|
||||
*/
|
||||
export function applyHudUiTheme(root, layout) {
|
||||
if (!root?.dataset) return null;
|
||||
if (normalizeHudLayout(layout) === 'cyber') {
|
||||
root.dataset.uiTheme = 'cyber';
|
||||
applyCyberSonarThemePhase(root, true);
|
||||
syncRadioPanelPlacement(root.ownerDocument);
|
||||
return 'cyber';
|
||||
}
|
||||
delete root.dataset.uiTheme;
|
||||
applyCyberSonarThemePhase(root, false);
|
||||
syncRadioPanelPlacement(root.ownerDocument);
|
||||
return null;
|
||||
export function isLegacySonarHudLayout(value) {
|
||||
return LEGACY_SONAR_HUD_LAYOUTS.includes(String(value ?? '').toLowerCase());
|
||||
}
|
||||
@@ -3276,7 +3276,7 @@
|
||||
"Control cockpit": "التحكم في القمرة",
|
||||
"Change visual style": "تغيير النمط البصري",
|
||||
"Adjust HUD": "ضبط HUD",
|
||||
"Adjust cyber sonar": "ضبط السونار السيبراني",
|
||||
"Adjust sonar": "ضبط السونار",
|
||||
"Adjust detection overlay": "ضبط طبقة الكشف",
|
||||
"Change map stack": "تغيير حزمة الخرائط",
|
||||
"Adjust post-processing": "ضبط المعالجة اللاحقة",
|
||||
@@ -3366,9 +3366,8 @@
|
||||
"SEEK ▶": "بحث ▶",
|
||||
"SDR VOL": "صوت SDR",
|
||||
"Local SDR volume": "مستوى صوت SDR المحلي",
|
||||
"Cyber": "سيبراني",
|
||||
"Sonar": "السونار",
|
||||
"Cyber sonar contact scanner": "ماسح الأهداف بالسونار السيبراني",
|
||||
"Sonar contact scanner": "ماسح الأهداف بالسونار",
|
||||
"Rings": "الحلقات",
|
||||
"Sonar ring count": "عدد حلقات السونار",
|
||||
"Range": "المدى",
|
||||
@@ -3376,7 +3375,7 @@
|
||||
"Power": "القوة",
|
||||
"Sonar intensity": "شدة السونار",
|
||||
"Opacity": "العتامة",
|
||||
"Cyber contact and label opacity": "عتامة الأهداف والتسميات في النمط السيبراني",
|
||||
"Sonar contact and label opacity": "عتامة الأهداف والتسميات للسونار",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "الحد الأدنى لعتامة نقاط الخريطة والأيقونات والنماذج والأقواس والتسميات بين مرّات السونار",
|
||||
"Sector": "القطاع",
|
||||
"Sonar sector width": "عرض قطاع السونار",
|
||||
@@ -4569,7 +4568,7 @@
|
||||
"Show settings": "عرض الإعدادات",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "اختر نمطًا: عادي أو CRT أو NVG أو FLIR أو أنمي أو نوار (المفاتيح 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "اختر خريطة الأساس ضمن مصدر الخريطة: Google 3D أو Bing أو Esri أو OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "فعّل شاشة العرض الأمامية أو أوقفها هنا. يتيح التخطيط اختيار تكتيكي أو مبسّط أو سيبراني",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "فعّل شاشة العرض الأمامية أو أوقفها هنا. يتيح التخطيط اختيار تكتيكي أو مبسّط",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "يؤطر المنظار العرض داخل دائرة. ينعّم التنعيم حافة الدائرة، ويحدد التعتيم درجة قتامة المنطقة خارجها.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "تخفي الواجهة النظيفة اللوحات والقراءات لإظهار العرض بوضوح",
|
||||
"Press search, then type part of a layer name or source": "اضغط على البحث، ثم اكتب جزءًا من اسم الطبقة أو مصدرها",
|
||||
|
||||
@@ -2957,7 +2957,7 @@
|
||||
"Control cockpit": "Cockpit steuern",
|
||||
"Change visual style": "Visuellen Stil ändern",
|
||||
"Adjust HUD": "HUD anpassen",
|
||||
"Adjust cyber sonar": "Cyber-Sonar anpassen",
|
||||
"Adjust sonar": "Sonar anpassen",
|
||||
"Adjust detection overlay": "Erkennungs-Overlay anpassen",
|
||||
"Change map stack": "Kartenstapel ändern",
|
||||
"Adjust post-processing": "Nachbearbeitung anpassen",
|
||||
@@ -3047,9 +3047,8 @@
|
||||
"SEEK ▶": "SUCHEN ▶",
|
||||
"SDR VOL": "SDR-LAUTST.",
|
||||
"Local SDR volume": "Lautstärke des lokalen SDR",
|
||||
"Cyber": "Cyber",
|
||||
"Sonar": "Sonar",
|
||||
"Cyber sonar contact scanner": "Cyber-Sonar-Kontaktscanner",
|
||||
"Sonar contact scanner": "Sonar-Kontaktscanner",
|
||||
"Rings": "Ringe",
|
||||
"Sonar ring count": "Anzahl der Sonarringe",
|
||||
"Range": "Reichweite",
|
||||
@@ -3057,7 +3056,7 @@
|
||||
"Power": "Leistung",
|
||||
"Sonar intensity": "Sonarintensität",
|
||||
"Opacity": "Deckkraft",
|
||||
"Cyber contact and label opacity": "Deckkraft von Cyber-Kontakten und Beschriftungen",
|
||||
"Sonar contact and label opacity": "Deckkraft von Sonar-Kontakten und Beschriftungen",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Minimale Deckkraft für Kartenpunkte, Symbole, Modelle, Klammern und Beschriftungen zwischen Sonardurchläufen",
|
||||
"Sector": "Sektor",
|
||||
"Sonar sector width": "Breite des Sonarsektors",
|
||||
@@ -4157,7 +4156,7 @@
|
||||
"Show settings": "Einstellungen anzeigen",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Wähle einen Stil: Normal, CRT, NVG, FLIR, Anime oder Noir (Tasten 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Wähle unter Kartenquelle die Grundkarte: Google 3D, Bing, Esri oder OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Schalte hier das HUD ein oder aus. Wähle unter Layout Taktisch, Minimal oder Cyber.",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Schalte hier das HUD ein oder aus. Wähle unter Layout Taktisch oder Minimal.",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Der Scope rahmt die Ansicht kreisförmig ein. Weichzeichnung glättet den Rand, die Deckkraft bestimmt die Abdunklung außen.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "Reine Ansicht blendet Bedienfelder und Anzeigen aus",
|
||||
"Press search, then type part of a layer name or source": "Drücke die Suchtaste und gib einen Teil des Ebenennamens oder der Quellenbezeichnung ein",
|
||||
|
||||
@@ -1833,11 +1833,11 @@
|
||||
"POSITIONED": "POSICIONADAS",
|
||||
"SDR VOL": "VOL. SDR",
|
||||
"LOCAL RTL-SDR": "RTL-SDR LOCAL",
|
||||
"Cyber sonar contact scanner": "Escáner de contactos del sonar Ciber",
|
||||
"Sonar contact scanner": "Escáner de contactos del sonar",
|
||||
"Sonar ring count": "Número de anillos del sonar",
|
||||
"Sonar ring range": "Alcance de los anillos del sonar",
|
||||
"Sonar intensity": "Intensidad del sonar",
|
||||
"Cyber contact and label opacity": "Opacidad de contactos y etiquetas Ciber",
|
||||
"Sonar contact and label opacity": "Opacidad de contactos y etiquetas del sonar",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacidad mínima de puntos, iconos, modelos, corchetes y etiquetas del mapa entre pasadas del sonar",
|
||||
"Sonar sector width": "Ancho del sector del sonar",
|
||||
"Rings": "Anillos",
|
||||
@@ -1845,7 +1845,6 @@
|
||||
"Power": "Potencia",
|
||||
"Opacity": "Opacidad",
|
||||
"Sector": "Sector",
|
||||
"Cyber": "Ciber",
|
||||
"Sonar": "Sonar",
|
||||
"Turn Street Level on or off": "Activar o desactivar A pie de calle",
|
||||
"Toggle straight-down and tilted map views": "Alternar entre la vista cenital y la vista inclinada del mapa",
|
||||
@@ -2931,7 +2930,7 @@
|
||||
"Control cockpit": "Controlar la cabina",
|
||||
"Change visual style": "Cambiar el estilo visual",
|
||||
"Adjust HUD": "Ajustar el HUD",
|
||||
"Adjust cyber sonar": "Ajustar el sonar Ciber",
|
||||
"Adjust sonar": "Ajustar el sonar",
|
||||
"Adjust detection overlay": "Ajustar la superposición de detección",
|
||||
"Change map stack": "Cambiar el conjunto de mapas",
|
||||
"Adjust post-processing": "Ajustar el posprocesado",
|
||||
@@ -4260,7 +4259,7 @@
|
||||
"Show settings": "Mostrar ajustes",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Elige un estilo: Normal, CRT, NVG, FLIR, Anime o Noir (teclas 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "En Fuente del mapa, elige el mapa base: Google 3D, Bing, Esri u OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Activa o desactiva aquí el HUD. En Disposición, elige Táctica, Mínima o Ciber.",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Activa o desactiva aquí el HUD. En Disposición, elige Táctica o Mínima.",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Mirilla encuadra la vista en un círculo. Difuminado suaviza el borde y Opacidad regula la sombra exterior.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "Interfaz limpia oculta los paneles y los indicadores para despejar la vista",
|
||||
"Press search, then type part of a layer name or source": "Pulsa el botón de búsqueda y escribe parte del nombre o la fuente de una capa",
|
||||
|
||||
@@ -2802,7 +2802,7 @@
|
||||
"Control cockpit": "Piloter le cockpit",
|
||||
"Change visual style": "Changer le style visuel",
|
||||
"Adjust HUD": "Régler le HUD",
|
||||
"Adjust cyber sonar": "Régler le sonar Cyber",
|
||||
"Adjust sonar": "Régler le sonar",
|
||||
"Adjust detection overlay": "Régler la surcouche de détection",
|
||||
"Change map stack": "Changer de fond de carte",
|
||||
"Adjust post-processing": "Régler le post-traitement",
|
||||
@@ -3054,9 +3054,8 @@
|
||||
"HUD layout": "Disposition du HUD",
|
||||
"Tactical": "Tactique",
|
||||
"Minimal": "Minimal",
|
||||
"Cyber": "Cyber",
|
||||
"Sonar": "Sonar",
|
||||
"Cyber sonar contact scanner": "Scanner de contacts du sonar Cyber",
|
||||
"Sonar contact scanner": "Scanner de contacts du sonar",
|
||||
"Rings": "Anneaux",
|
||||
"Sonar ring count": "Nombre d'anneaux du sonar",
|
||||
"Range": "Portée",
|
||||
@@ -3064,7 +3063,7 @@
|
||||
"Power": "Puissance",
|
||||
"Sonar intensity": "Intensité du sonar",
|
||||
"Opacity": "Opacité",
|
||||
"Cyber contact and label opacity": "Opacité des contacts et étiquettes Cyber",
|
||||
"Sonar contact and label opacity": "Opacité des contacts et étiquettes du sonar",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacité minimale des points, icônes, modèles, cadres de ciblage et étiquettes de la carte entre deux balayages du sonar",
|
||||
"Sector": "Secteur",
|
||||
"Sonar sector width": "Largeur du secteur du sonar",
|
||||
@@ -4260,7 +4259,7 @@
|
||||
"Show settings": "Afficher les réglages",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Choisissez un style : Normal, CRT, NVG, FLIR, Anime ou Noir (touches 1 à 6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Dans Source de la carte, choisissez le fond de carte : Google 3D, Bing, Esri ou OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Activez ou désactivez ici le HUD. Dans Disposition, choisissez Tactique, Minimal ou Cyber.",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Activez ou désactivez ici le HUD. Dans Disposition, choisissez Tactique ou Minimal.",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "La lunette cadre la vue dans un cercle. Adouci lisse le bord et Opacité règle l’assombrissement à l’extérieur.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "Vue épurée masque les panneaux et les indicateurs pour dégager la vue",
|
||||
"Press search, then type part of a layer name or source": "Appuyez sur Rechercher, puis saisissez une partie du nom ou de la source d’une couche",
|
||||
|
||||
@@ -2543,9 +2543,8 @@
|
||||
"HUD layout": "פריסת ה-HUD",
|
||||
"Tactical": "טקטי",
|
||||
"Minimal": "מינימלי",
|
||||
"Cyber": "סייבר",
|
||||
"Sonar": "סונאר",
|
||||
"Cyber sonar contact scanner": "סורק הסונאר הסייברי למגעים",
|
||||
"Sonar contact scanner": "סורק המגעים של הסונאר",
|
||||
"Rings": "טבעות",
|
||||
"Sonar ring count": "מניין טבעות הסונאר",
|
||||
"Range": "טווח",
|
||||
@@ -2553,7 +2552,7 @@
|
||||
"Power": "עוצמה",
|
||||
"Sonar intensity": "עצמת הסונאר",
|
||||
"Opacity": "אטימות",
|
||||
"Cyber contact and label opacity": "אטימות המגעים והתוויות הסייבריים",
|
||||
"Sonar contact and label opacity": "אטימות המגעים והתוויות של הסונאר",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "האטימות המזערית לנקודות המפה, סמלים, דגמים, סוגריים ותוויות בין מעברי הסונאר",
|
||||
"Sector": "סקטור",
|
||||
"Sonar sector width": "רוחב סקטור הסונאר",
|
||||
@@ -3163,7 +3162,7 @@
|
||||
"Control cockpit": "שליטה בתא הטייס",
|
||||
"Change visual style": "שינוי סגנון הראייה",
|
||||
"Adjust HUD": "כוונון ה-HUD",
|
||||
"Adjust cyber sonar": "כוונון הסונאר הסייברי",
|
||||
"Adjust sonar": "כוונון הסונאר",
|
||||
"Adjust detection overlay": "כוונון שכבת הזיהוי",
|
||||
"Change map stack": "שינוי ערכת המפות",
|
||||
"Adjust post-processing": "כוונון העיבוד שלאחר הרינדור",
|
||||
@@ -4260,7 +4259,7 @@
|
||||
"Show settings": "הצגת הגדרות",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "בחרו סגנון: רגיל, CRT, NVG, FLIR, אנימה או נואר (מקשים 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "במקור מפה, בחרו את מפת הבסיס: Google 3D, Bing, Esri או OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "כאן אפשר להפעיל או לכבות את התצוגה העילית. באפשרויות הפריסה בחרו טקטי, מינימלי או סייבר",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "כאן אפשר להפעיל או לכבות את התצוגה העילית. באפשרויות הפריסה בחרו טקטי או מינימלי",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "הסקופ תוחם את התצוגה בעיגול. ריכוך מרכך את השוליים, ואטימות קובעת כמה כהה האזור שמחוץ לעיגול.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "הממשק הנקי מסתיר את הלוחות והנתונים כדי לפנות את התצוגה",
|
||||
"Press search, then type part of a layer name or source": "לחצו על החיפוש והקלידו חלק משם השכבה או המקור שלה",
|
||||
|
||||
@@ -2802,7 +2802,7 @@
|
||||
"Control cockpit": "Controlla il cockpit",
|
||||
"Change visual style": "Cambia lo stile visivo",
|
||||
"Adjust HUD": "Regola l'HUD",
|
||||
"Adjust cyber sonar": "Regola il sonar Cyber",
|
||||
"Adjust sonar": "Regola il sonar",
|
||||
"Adjust detection overlay": "Regola l'overlay di rilevamento",
|
||||
"Change map stack": "Cambia lo stack mappa",
|
||||
"Adjust post-processing": "Regola la post-elaborazione",
|
||||
@@ -3054,9 +3054,8 @@
|
||||
"HUD layout": "Layout HUD",
|
||||
"Tactical": "Tattico",
|
||||
"Minimal": "Minimale",
|
||||
"Cyber": "Cyber",
|
||||
"Sonar": "Sonar",
|
||||
"Cyber sonar contact scanner": "Scanner di contatti sonar Cyber",
|
||||
"Sonar contact scanner": "Scanner di contatti sonar",
|
||||
"Rings": "Anelli",
|
||||
"Sonar ring count": "Numero di anelli del sonar",
|
||||
"Range": "Portata",
|
||||
@@ -3064,7 +3063,7 @@
|
||||
"Power": "Potenza",
|
||||
"Sonar intensity": "Intensità del sonar",
|
||||
"Opacity": "Opacità",
|
||||
"Cyber contact and label opacity": "Opacità di contatti ed etichette Cyber",
|
||||
"Sonar contact and label opacity": "Opacità di contatti ed etichette del sonar",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacità minima di punti sulla mappa, icone, modelli, riquadri ed etichette tra un passaggio del sonar e l'altro",
|
||||
"Sector": "Settore",
|
||||
"Sonar sector width": "Ampiezza del settore del sonar",
|
||||
@@ -4260,7 +4259,7 @@
|
||||
"Show settings": "Mostra impostazioni",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Scegli uno stile: Normale, CRT, NVG, FLIR, Anime o Noir (tasti 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "In Fonte mappa, scegli la mappa di base: Google 3D, Bing, Esri o OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Attiva o disattiva qui l’HUD. In Layout, scegli Tattico, Minimale o Cyber.",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Attiva o disattiva qui l’HUD. In Layout, scegli Tattico o Minimale.",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Scope inquadra la vista in un cerchio. Sfumatura ne ammorbidisce il bordo e Opacità regola quanto scurire l’esterno.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "UI pulita nasconde i pannelli e gli indicatori per lasciare libera la vista",
|
||||
"Press search, then type part of a layer name or source": "Premi il pulsante di ricerca, poi digita parte del nome o della fonte di un livello",
|
||||
|
||||
@@ -2642,7 +2642,7 @@
|
||||
"Control cockpit": "コックピットを操作",
|
||||
"Change visual style": "ビジュアルスタイルを変更",
|
||||
"Adjust HUD": "HUDを調整",
|
||||
"Adjust cyber sonar": "サイバーソナーを調整",
|
||||
"Adjust sonar": "ソナーを調整",
|
||||
"Adjust detection overlay": "検出オーバーレイを調整",
|
||||
"Change map stack": "マップスタックを変更",
|
||||
"Adjust post-processing": "ポストプロセスを調整",
|
||||
@@ -2890,9 +2890,8 @@
|
||||
"HUD layout": "HUDレイアウト",
|
||||
"Tactical": "タクティカル",
|
||||
"Minimal": "ミニマル",
|
||||
"Cyber": "サイバー",
|
||||
"Sonar": "ソナー",
|
||||
"Cyber sonar contact scanner": "サイバーソナーのコンタクトスキャナー",
|
||||
"Sonar contact scanner": "ソナーのコンタクトスキャナー",
|
||||
"Rings": "リング数",
|
||||
"Sonar ring count": "ソナーのリング数",
|
||||
"Range": "範囲",
|
||||
@@ -2900,7 +2899,7 @@
|
||||
"Power": "強度",
|
||||
"Sonar intensity": "ソナーの強度",
|
||||
"Opacity": "不透明度",
|
||||
"Cyber contact and label opacity": "サイバーのコンタクトとラベルの不透明度",
|
||||
"Sonar contact and label opacity": "ソナーのコンタクトとラベルの不透明度",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "ソナーの走査の合間における地図上の点、アイコン、モデル、ブラケット、ラベルの最小不透明度",
|
||||
"Sector": "扇形",
|
||||
"Sonar sector width": "ソナーの扇形の幅",
|
||||
@@ -4054,7 +4053,7 @@
|
||||
"Show settings": "設定を表示",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "標準、CRT、NVG、FLIR、アニメ、ノワールからスタイルを選びます(キー1~6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "マップソースで背景地図を選びます:Google 3D、Bing、Esri、OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "ここでHUDをオン・オフできます。レイアウトでタクティカル、ミニマル、サイバーを選びます",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "ここでHUDをオン・オフできます。レイアウトでタクティカルかミニマルを選びます",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "スコープは表示範囲を円形に切り取ります。ぼかしで円の縁をなじませ、不透明度で円の外側の暗さを調整します。",
|
||||
"Clean UI hides the panels and readouts for a clear view": "クリーンUIはパネルや表示情報を隠し、マップを見やすくします",
|
||||
"Press search, then type part of a layer name or source": "検索ボタンを押し、レイヤー名やソース名の一部を入力します",
|
||||
|
||||
@@ -2804,7 +2804,7 @@
|
||||
"Control cockpit": "Controlar a cabine",
|
||||
"Change visual style": "Mudar o estilo visual",
|
||||
"Adjust HUD": "Ajustar o HUD",
|
||||
"Adjust cyber sonar": "Ajustar o sonar Ciber",
|
||||
"Adjust sonar": "Ajustar o sonar",
|
||||
"Adjust detection overlay": "Ajustar a sobreposição de detecção",
|
||||
"Change map stack": "Mudar a pilha de mapas",
|
||||
"Adjust post-processing": "Ajustar o pós-processamento",
|
||||
@@ -3056,9 +3056,8 @@
|
||||
"HUD layout": "Layout do HUD",
|
||||
"Tactical": "Tático",
|
||||
"Minimal": "Mínimo",
|
||||
"Cyber": "Ciber",
|
||||
"Sonar": "Sonar",
|
||||
"Cyber sonar contact scanner": "Scanner de contatos do sonar Ciber",
|
||||
"Sonar contact scanner": "Scanner de contatos do sonar",
|
||||
"Rings": "Anéis",
|
||||
"Sonar ring count": "Número de anéis do sonar",
|
||||
"Range": "Alcance",
|
||||
@@ -3066,7 +3065,7 @@
|
||||
"Power": "Potência",
|
||||
"Sonar intensity": "Intensidade do sonar",
|
||||
"Opacity": "Opacidade",
|
||||
"Cyber contact and label opacity": "Opacidade de contatos e rótulos Ciber",
|
||||
"Sonar contact and label opacity": "Opacidade de contatos e rótulos do sonar",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacidade mínima de pontos, ícones, modelos, marcadores de alvo e rótulos do mapa entre as passagens do sonar",
|
||||
"Sector": "Setor",
|
||||
"Sonar sector width": "Largura do setor do sonar",
|
||||
@@ -4260,7 +4259,7 @@
|
||||
"Show settings": "Mostrar configurações",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Escolha um estilo: Normal, CRT, NVG, FLIR, Anime ou Noir (teclas 1 a 6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Em Fonte do mapa, escolha o mapa de base: Google 3D, Bing, Esri ou OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Ative ou desative o HUD aqui. Em Layout, escolha Tático, Mínimo ou Ciber.",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Ative ou desative o HUD aqui. Em Layout, escolha Tático ou Mínimo.",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "A mira enquadra a vista em um círculo. A suavização deixa a borda menos marcada e Opacidade controla o escurecimento da área externa.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "Interface limpa oculta os painéis e os indicadores para liberar a vista",
|
||||
"Press search, then type part of a layer name or source": "Use o botão de pesquisa e digite parte do nome ou da fonte de uma camada",
|
||||
|
||||
@@ -1870,11 +1870,11 @@
|
||||
"POSITIONED": "С КООРД.",
|
||||
"SDR VOL": "ГРОМК. SDR",
|
||||
"LOCAL RTL-SDR": "ЛОКАЛЬНЫЙ RTL-SDR",
|
||||
"Cyber sonar contact scanner": "Кибер-сонар: сканер контактов",
|
||||
"Sonar contact scanner": "Сонар: сканер контактов",
|
||||
"Sonar ring count": "Число колец сонара",
|
||||
"Sonar ring range": "Дальность колец сонара",
|
||||
"Sonar intensity": "Интенсивность сонара",
|
||||
"Cyber contact and label opacity": "Непрозрачность контактов и подписей в режиме «Кибер»",
|
||||
"Sonar contact and label opacity": "Непрозрачность контактов и подписей сонара",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Минимальная непрозрачность точек, значков, моделей, рамок и подписей на карте между проходами сонара",
|
||||
"Sonar sector width": "Ширина сектора сонара",
|
||||
"Rings": "Кольца",
|
||||
@@ -1882,7 +1882,6 @@
|
||||
"Power": "Мощность",
|
||||
"Opacity": "Непрозрачность",
|
||||
"Sector": "Сектор",
|
||||
"Cyber": "Кибер",
|
||||
"Sonar": "Сонар",
|
||||
"Turn Street Level on or off": "Включить или выключить «Уличные снимки»",
|
||||
"Toggle straight-down and tilted map views": "Переключить вид карты: сверху или с наклоном",
|
||||
@@ -2999,7 +2998,7 @@
|
||||
"Control cockpit": "Управлять кабиной",
|
||||
"Change visual style": "Сменить визуальный стиль",
|
||||
"Adjust HUD": "Настроить HUD",
|
||||
"Adjust cyber sonar": "Настроить кибер-сонар",
|
||||
"Adjust sonar": "Настроить сонар",
|
||||
"Adjust detection overlay": "Настроить слой детекции",
|
||||
"Change map stack": "Сменить набор карт",
|
||||
"Adjust post-processing": "Настроить постобработку",
|
||||
@@ -4363,7 +4362,7 @@
|
||||
"Show settings": "Показать настройки",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Выберите стиль: Обычный, CRT, NVG, FLIR, Аниме или Нуар (клавиши 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "В разделе «Источник карты» выберите базовую карту: Google 3D, Bing, Esri или OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Здесь можно включить или выключить HUD. В разделе «Макет» выберите «Тактический», «Минимальный» или «Кибер».",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Здесь можно включить или выключить HUD. В разделе «Макет» выберите «Тактический» или «Минимальный».",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "«Прицел» обрамляет вид кругом. «Растушёвка» смягчает край, а «Непрозрачность» задаёт затемнение снаружи.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "«Чистый интерфейс» скрывает панели и индикаторы, освобождая обзор",
|
||||
"Press search, then type part of a layer name or source": "Нажмите кнопку поиска и введите часть названия слоя или источника",
|
||||
|
||||
@@ -2873,7 +2873,7 @@
|
||||
"Control cockpit": "Styr cockpit",
|
||||
"Change visual style": "Byt visuell stil",
|
||||
"Adjust HUD": "Justera HUD",
|
||||
"Adjust cyber sonar": "Justera cybersonar",
|
||||
"Adjust sonar": "Justera sonaren",
|
||||
"Adjust detection overlay": "Justera detekteringsöverlägg",
|
||||
"Change map stack": "Byt kartuppsättning",
|
||||
"Adjust post-processing": "Justera efterbehandling",
|
||||
@@ -2958,9 +2958,8 @@
|
||||
"SEEK ▶": "SÖK ▶",
|
||||
"SDR VOL": "SDR-VOL.",
|
||||
"Local SDR volume": "Volym för lokal SDR",
|
||||
"Cyber": "Cyber",
|
||||
"Sonar": "Sonar",
|
||||
"Cyber sonar contact scanner": "Kontaktskanner med cybersonar",
|
||||
"Sonar contact scanner": "Kontaktskanner med sonar",
|
||||
"Rings": "Ringar",
|
||||
"Sonar ring count": "Antal sonarringar",
|
||||
"Range": "Räckvidd",
|
||||
@@ -2968,7 +2967,7 @@
|
||||
"Power": "Styrka",
|
||||
"Sonar intensity": "Sonarintensitet",
|
||||
"Opacity": "Opacitet",
|
||||
"Cyber contact and label opacity": "Opacitet för cyberkontakter och etiketter",
|
||||
"Sonar contact and label opacity": "Opacitet för sonarkontakter och etiketter",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Lägsta opacitet för kartpunkter, ikoner, modeller, ramar och etiketter mellan sonarsvepen",
|
||||
"Sector": "Sektor",
|
||||
"Sonar sector width": "Sonarsektorns bredd",
|
||||
@@ -4157,7 +4156,7 @@
|
||||
"Show settings": "Visa inställningar",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Välj en stil: Normal, CRT, NVG, FLIR, Anime eller Noir (tangenterna 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Välj baskarta under Kartkälla: Google 3D, Bing, Esri eller OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Slå på eller av HUD här. Välj Taktisk, Minimal eller Cyber under Layout.",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Slå på eller av HUD här. Välj Taktisk eller Minimal under Layout.",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Scope ramar in vyn med en cirkel. Mjuk kant tonar ut kanten och Opacitet styr hur mörkt det är utanför.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "Rent gränssnitt döljer paneler och indikatorer för att ge fri sikt",
|
||||
"Press search, then type part of a layer name or source": "Tryck på sökknappen och skriv en del av lagrets namn eller källa",
|
||||
|
||||
@@ -2881,7 +2881,7 @@
|
||||
"Control cockpit": "Керувати кабіною",
|
||||
"Change visual style": "Змінити візуальний стиль",
|
||||
"Adjust HUD": "Налаштувати HUD",
|
||||
"Adjust cyber sonar": "Налаштувати кібер-сонар",
|
||||
"Adjust sonar": "Налаштувати сонар",
|
||||
"Adjust detection overlay": "Налаштувати накладку виявлення",
|
||||
"Change map stack": "Змінити набір карт",
|
||||
"Adjust post-processing": "Налаштувати постобробку",
|
||||
@@ -3135,9 +3135,8 @@
|
||||
"HUD layout": "Компонування HUD",
|
||||
"Tactical": "Тактичне",
|
||||
"Minimal": "Мінімальне",
|
||||
"Cyber": "Кібер",
|
||||
"Sonar": "Сонар",
|
||||
"Cyber sonar contact scanner": "Кібер-сонар: сканер контактів",
|
||||
"Sonar contact scanner": "Сонар: сканер контактів",
|
||||
"Rings": "Кільця",
|
||||
"Sonar ring count": "Кількість кілець сонара",
|
||||
"Range": "Дальність",
|
||||
@@ -3145,7 +3144,7 @@
|
||||
"Power": "Потужність",
|
||||
"Sonar intensity": "Інтенсивність сонара",
|
||||
"Opacity": "Непрозорість",
|
||||
"Cyber contact and label opacity": "Непрозорість контактів і підписів у режимі «Кібер»",
|
||||
"Sonar contact and label opacity": "Непрозорість контактів і підписів сонара",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Мінімальна непрозорість точок, значків, моделей, рамок і підписів на карті між проходами сонара",
|
||||
"Sector": "Сектор",
|
||||
"Sonar sector width": "Ширина сектора сонара",
|
||||
@@ -4363,7 +4362,7 @@
|
||||
"Show settings": "Показати налаштування",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Виберіть стиль: Звичайний, CRT, NVG, FLIR, Аніме або Нуар (клавіші 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "У розділі «Джерело карти» виберіть базову карту: Google 3D, Bing, Esri або OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Увімкніть або вимкніть HUD тут. У розділі «Компонування» виберіть «Тактичне», «Мінімальне» або «Кібер».",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Увімкніть або вимкніть HUD тут. У розділі «Компонування» виберіть «Тактичне» або «Мінімальне».",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "«Приціл» обрамляє огляд колом. «Розмиття» пом’якшує край, а «Непрозорість» визначає затемнення зовні.",
|
||||
"Clean UI hides the panels and readouts for a clear view": "«Чистий інтерфейс» приховує панелі та індикатори, щоб ніщо не заважало огляду",
|
||||
"Press search, then type part of a layer name or source": "Натисніть кнопку пошуку й введіть частину назви шару або джерела",
|
||||
|
||||
@@ -2543,7 +2543,7 @@
|
||||
"Control cockpit": "控制座舱",
|
||||
"Change visual style": "切换视觉样式",
|
||||
"Adjust HUD": "调整 HUD",
|
||||
"Adjust cyber sonar": "调整赛博声呐",
|
||||
"Adjust sonar": "调整声呐",
|
||||
"Adjust detection overlay": "调整探测叠加层",
|
||||
"Change map stack": "切换地图组合",
|
||||
"Adjust post-processing": "调整后期处理",
|
||||
@@ -2790,9 +2790,8 @@
|
||||
"HUD layout": "HUD 布局",
|
||||
"Tactical": "战术",
|
||||
"Minimal": "精简",
|
||||
"Cyber": "赛博",
|
||||
"Sonar": "声呐",
|
||||
"Cyber sonar contact scanner": "赛博声呐目标扫描器",
|
||||
"Sonar contact scanner": "声呐目标扫描器",
|
||||
"Rings": "圈数",
|
||||
"Sonar ring count": "声呐圈数",
|
||||
"Range": "范围",
|
||||
@@ -2800,7 +2799,7 @@
|
||||
"Power": "强度",
|
||||
"Sonar intensity": "声呐强度",
|
||||
"Opacity": "不透明度",
|
||||
"Cyber contact and label opacity": "赛博目标与标签不透明度",
|
||||
"Sonar contact and label opacity": "声呐目标与标签不透明度",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "两次声呐扫描之间地图点、图标、模型、括号标记与标签的最低不透明度",
|
||||
"Sector": "扇区",
|
||||
"Sonar sector width": "声呐扇区宽度",
|
||||
@@ -4054,7 +4053,7 @@
|
||||
"Show settings": "显示设置",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "选择一种样式:常规、CRT、NVG、FLIR、动漫或黑色电影(按键 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "在地图源中选择底图:Google 3D、Bing、Esri 或 OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "在此开启或关闭 HUD。在布局中选择战术、精简或赛博",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "在此开启或关闭 HUD。在布局中选择战术或精简",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "视域用圆形框出视野。羽化柔化边缘,不透明度决定圆外的明暗。",
|
||||
"Clean UI hides the panels and readouts for a clear view": "简洁界面会隐藏面板和读数,让视图更清晰",
|
||||
"Press search, then type part of a layer name or source": "点击搜索,然后输入部分图层名称或来源",
|
||||
|
||||
@@ -2543,7 +2543,7 @@
|
||||
"Control cockpit": "控制座艙",
|
||||
"Change visual style": "切換視覺樣式",
|
||||
"Adjust HUD": "調整 HUD",
|
||||
"Adjust cyber sonar": "調整賽博聲吶",
|
||||
"Adjust sonar": "調整聲吶",
|
||||
"Adjust detection overlay": "調整探測疊加層",
|
||||
"Change map stack": "切換地圖組合",
|
||||
"Adjust post-processing": "調整後期處理",
|
||||
@@ -2790,9 +2790,8 @@
|
||||
"HUD layout": "HUD 佈局",
|
||||
"Tactical": "戰術",
|
||||
"Minimal": "精簡",
|
||||
"Cyber": "賽博",
|
||||
"Sonar": "聲吶",
|
||||
"Cyber sonar contact scanner": "賽博聲吶目標掃描器",
|
||||
"Sonar contact scanner": "聲吶目標掃描器",
|
||||
"Rings": "圈數",
|
||||
"Sonar ring count": "聲吶圈數",
|
||||
"Range": "範圍",
|
||||
@@ -2800,7 +2799,7 @@
|
||||
"Power": "強度",
|
||||
"Sonar intensity": "聲吶強度",
|
||||
"Opacity": "不透明度",
|
||||
"Cyber contact and label opacity": "賽博目標與標籤不透明度",
|
||||
"Sonar contact and label opacity": "聲吶目標與標籤不透明度",
|
||||
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "兩次聲吶掃描之間地圖點、圖標、模型、括號標記與標籤的最低不透明度",
|
||||
"Sector": "扇區",
|
||||
"Sonar sector width": "聲吶扇區寬度",
|
||||
@@ -4054,7 +4053,7 @@
|
||||
"Show settings": "顯示設置",
|
||||
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "選擇一種樣式:常規、CRT、NVG、FLIR、動漫或黑色電影(按鍵 1–6)",
|
||||
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "在地圖源中選擇底圖:Google 3D、Bing、Esri 或 OpenStreetMap",
|
||||
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "在此開啟或關閉 HUD。在佈局中選擇戰術、精簡或賽博",
|
||||
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "在此開啟或關閉 HUD。在佈局中選擇戰術或精簡",
|
||||
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "視域用圓形框出視野。羽化柔化邊緣,不透明度決定圓外的明暗。",
|
||||
"Clean UI hides the panels and readouts for a clear view": "簡潔界面會隱藏面板和讀數,讓視圖更清晰",
|
||||
"Press search, then type part of a layer name or source": "點擊搜索,然後輸入部分圖層名稱或來源",
|
||||
|
||||
@@ -86,7 +86,6 @@
|
||||
"Chat",
|
||||
"Country",
|
||||
"Cyan",
|
||||
"Cyber",
|
||||
"DEST ---°",
|
||||
"DEST {bearing}",
|
||||
"Dance",
|
||||
@@ -536,7 +535,6 @@
|
||||
"Conversation",
|
||||
"Country",
|
||||
"Cyan",
|
||||
"Cyber",
|
||||
"Cyclones · NHC / CPHC",
|
||||
"DENSE",
|
||||
"DEST ---°",
|
||||
@@ -788,7 +786,6 @@
|
||||
"CRT",
|
||||
"Chat",
|
||||
"Country",
|
||||
"Cyber",
|
||||
"DEST ---°",
|
||||
"DEST {bearing}",
|
||||
"DISPLAY",
|
||||
@@ -1431,7 +1428,6 @@
|
||||
"SIG",
|
||||
"AUTO",
|
||||
"FM MHZ",
|
||||
"Cyber",
|
||||
"Sonar",
|
||||
"Cyan",
|
||||
"≥ {value} MW",
|
||||
|
||||
@@ -96,7 +96,7 @@ export const AWARENESS_RANGE_RING_STYLE = Object.freeze({
|
||||
* (tracking, cockpit, orbit, a fly-to) do not. Below the band's height they
|
||||
* rest too. While they run they never hold
|
||||
* continuous rendering; each drawn frame arms one more step after the
|
||||
* Cyber sonar's 80 ms cadence, so the two never beat. Fronts and band,
|
||||
* sonar's 80 ms cadence, so the two never beat. Fronts and band,
|
||||
* fixed in the world, step at that cadence however many frames are
|
||||
* drawn, so they look the same whether the camera moves or not; crossing
|
||||
* the rim height shows or hides them at once.
|
||||
|
||||
@@ -430,7 +430,7 @@ export function createRangeRing({
|
||||
* Run the range pulses again for `activeMs`, after a camera move. Call it
|
||||
* during a frame (lifecycle's preRender): that frame's postRender arms the
|
||||
* next request, so waking asks for no extra frame of its own. Pulses at
|
||||
* rest start in this frame; running ones keep their Cyber sonar interval,
|
||||
* rest start in this frame; running ones keep their sonar interval,
|
||||
* however many frames a drag draws.
|
||||
*/
|
||||
function wakePulses() {
|
||||
@@ -506,7 +506,7 @@ export function createRangeRing({
|
||||
const { lines, band } = setsOn(viewer);
|
||||
const frame = findFrame(viewer);
|
||||
// A renderer without frame hooks gets the static ring only, as the
|
||||
// Cyber sonar scene does. So does a viewer who prefers reduced motion.
|
||||
// sonar scene does. So does a viewer who prefers reduced motion.
|
||||
const animate = Boolean(!reducedMotion && frame?.on);
|
||||
// Pulses run from now until `wake.untilMs`, then rest.
|
||||
const wake = animate
|
||||
@@ -681,7 +681,7 @@ export function createRangeRing({
|
||||
bandShown = false;
|
||||
return;
|
||||
}
|
||||
// The soft band is painted at most once a Cyber sonar interval;
|
||||
// The soft band is painted at most once a sonar interval;
|
||||
// the fronts, crisp lines, move on every step.
|
||||
if (
|
||||
bandShown &&
|
||||
@@ -726,7 +726,7 @@ export function createRangeRing({
|
||||
// Whether the camera was below the rim at the last step.
|
||||
let wasBelow = belowRim();
|
||||
// The fronts and band are fixed in the world: a camera move needs
|
||||
// nothing of them, so they step a Cyber sonar interval apart however
|
||||
// nothing of them, so they step a sonar interval apart however
|
||||
// many frames are drawn, and look the same parked or moving. Each
|
||||
// frame checks only whether the camera crossed the rim height, which
|
||||
// shows or hides them at once. A step asks for the frame that draws
|
||||
@@ -746,8 +746,8 @@ export function createRangeRing({
|
||||
stepRunning(nowMs);
|
||||
}
|
||||
});
|
||||
// Each drawn frame, whoever asked for it, arms one step a Cyber
|
||||
// sonar interval later, as the Cyber sonar scene does, whose changes
|
||||
// Each drawn frame, whoever asked for it, arms one step a
|
||||
// sonar interval later, as the sonar scene does, whose changes
|
||||
// ask for the frame that draws them. Requests never land within
|
||||
// 80 ms of a frame, so they cannot beat the detection lane's 80 ms
|
||||
// gate, and they stop once the pulses rest.
|
||||
|
||||
@@ -488,7 +488,7 @@ test('pulses ask for a frame 80 ms after each drawn frame instead of holding con
|
||||
const { rendering, pulseFrames } = ring;
|
||||
const loop = frameLoop(t, ring);
|
||||
rendering.renderVisual(flight(3));
|
||||
// A Contacts view repaints at the Cyber sonar cadence, ~12.5 fps, while
|
||||
// A Contacts view repaints at the sonar cadence, ~12.5 fps, while
|
||||
// the pulses run, never every display frame.
|
||||
assert.equal(pulseFrames(), 0);
|
||||
loop.advance(1); // the frame the new ring asked for arms the first request
|
||||
@@ -972,14 +972,14 @@ test('disabling the layer tears the pulses down completely', (t) => {
|
||||
);
|
||||
});
|
||||
|
||||
test('pulse requests wait 80 ms after any frame, so they cannot beat the Cyber sonar', (t) => {
|
||||
test('pulse requests wait 80 ms after any frame, so they cannot beat the sonar', (t) => {
|
||||
const ring = ringRendering(t);
|
||||
const { rendering, pulseFrames } = ring;
|
||||
const loop = frameLoop(t, ring);
|
||||
rendering.renderVisual(flight(3));
|
||||
loop.advance(1);
|
||||
const frames = pulseFrames();
|
||||
// Another owner (the Cyber sonar, a data update) draws 67 ms after ours.
|
||||
// Another owner (the sonar, a data update) draws 67 ms after ours.
|
||||
loop.advance(67);
|
||||
loop.draw();
|
||||
loop.advance(CYBER_SONAR_RENDER_INTERVAL_MS - 1);
|
||||
|
||||
@@ -1093,7 +1093,7 @@ export function getOverlayPaintRect(sourceId, entryId) {
|
||||
/**
|
||||
* Opacity an entry paints with this frame, or 0 when it is not queued or the
|
||||
* yield-collision pass hid it. Custom lanes may call it before later lanes
|
||||
* publish paint rects. Leaves out the Cyber sonar fade.
|
||||
* publish paint rects. Leaves out the sonar fade.
|
||||
* @param {string} sourceId
|
||||
* @param {string} entryId
|
||||
* @returns {number}
|
||||
|
||||
@@ -222,7 +222,7 @@ test('parameterized Display presets keep one stable scroll owner', () => {
|
||||
const css = readStylesheet(new URL('../style.css', import.meta.url));
|
||||
|
||||
assert.match(css, /#pp-toggles:not\(\.collapsed\) > \.pp-panel-body > #param-slider-panel\.active\s*\{[\s\S]*?flex:\s*0 0 auto;[\s\S]*?max-height:\s*none;[\s\S]*?overflow-y:\s*visible;/);
|
||||
assert.match(ui, /readDisplayScrollTop: \(\) =>\s*this\._displayPortalScrollRestoreOwner === 'standard'[\s\S]*?this\._standardDisplayScrollTop[\s\S]*?displayPanelScroller\(this\._ppToggles\)\?\.scrollTop \|\| 0/);
|
||||
assert.match(ui, /readDisplayScrollTop: \(\) =>\s*this\._displayPortalScrollRestoreOwner === 'standard'[\s\S]*?this\._standardDisplayScrollTop[\s\S]*?this\._ppToggles\?\.scrollTop \|\| 0/);
|
||||
assert.match(rightRail, /scroller\.scrollTop = Math\.min\(displayScrollTop, maxScrollTop\);/);
|
||||
// The panel's parameters change, and the rail lays out again.
|
||||
assert.match(
|
||||
|
||||
@@ -218,10 +218,10 @@ test('no unchanged Realtime tool definition drifts silently', () => {
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((tool) => structuredClone(tool))
|
||||
.filter((tool) => tool.name !== 'set_cyber_sonar');
|
||||
// Cyber adds one HUD choice and the sonar tool, and Operator was retired;
|
||||
// retain the existing pin for every legacy field.
|
||||
// Operator and then Cyber were retired (Cyber's sonar became a visual
|
||||
// style with its own tool); retain the existing pin for every legacy field.
|
||||
const hudLayout = unchanged.find((tool) => tool.name === 'set_hud').parameters.properties.layout;
|
||||
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal', 'cyber']);
|
||||
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal']);
|
||||
hudLayout.enum = ['tactical', 'operator', 'minimal'];
|
||||
// Globe rotation adds one motion and clarifies the two affected descriptions.
|
||||
// Check those edits explicitly, then keep the legacy pin for every other field.
|
||||
@@ -353,10 +353,8 @@ test('Radio is nested inside Context with its own disclosure and power controls'
|
||||
assert.match(radioControlsSource, /classList\.remove\('radio-broadcasting'\)/);
|
||||
assert.match(radioBindings, /this\.radio\.getTunerStations\(750\)/);
|
||||
assert.match(radioBindings, /radioTunerPointerPosition\(/);
|
||||
// Only the Cyber skin promotes Radio to a peer panel. Other themes retain
|
||||
// the embedded Context layout; theme round-trip behavior has separate tests.
|
||||
const baseCss = css.replace(readFileSync(new URL('./ui/styles/cyber.css', import.meta.url), 'utf8'), '');
|
||||
assert.doesNotMatch(baseCss, /#right-context-rail\s*>\s*#radio-panel/);
|
||||
// Radio stays embedded in Context; no stylesheet promotes it to a peer panel.
|
||||
assert.doesNotMatch(css, /#right-context-rail\s*>\s*#radio-panel/);
|
||||
assert.match(css, /#global-context-panel #radio-panel\.collapsed/);
|
||||
assert.doesNotMatch(css, /\.context-radio-/);
|
||||
assert.match(css, /#right-context-rail #global-context-panel:not\(\.collapsed\) \.context-mode-view,[\s\S]*?#right-context-rail #global-context-panel:not\(\.collapsed\) #radio-panel\s*\{[\s\S]*?flex: 0 0 auto;/);
|
||||
|
||||
@@ -94,7 +94,7 @@ out vec4 v_pickColor;
|
||||
out float v_proxy;
|
||||
|
||||
// The row's anchor in clip space before screen offsets, for effects that wrap
|
||||
// main() (cyber sonar) and must not change geometry or picks.
|
||||
// main() (sonar) and must not change geometry or picks.
|
||||
vec4 iconAnchorClip = vec4(0.0, 0.0, 0.0, -1.0);
|
||||
|
||||
${ICON_SEGMENT_GLSL}
|
||||
|
||||
@@ -114,6 +114,9 @@ export const SHARE_VIEW_ENUMS = Object.freeze({
|
||||
'esri-imagery',
|
||||
'osm',
|
||||
]),
|
||||
// Removed layouts keep their index so old links decode: Operator opens in
|
||||
// Tactical. Cyber means Tactical with the Sonar style on; the app still
|
||||
// writes it for that state.
|
||||
hudVariant: Object.freeze(['tactical', 'operator', 'minimal', 'cyber']),
|
||||
detectionMode: Object.freeze(['OFF', 'SPARSE', 'BALANCED', 'DENSE']),
|
||||
detectionAllocation: Object.freeze(['ELASTIC', 'WEIGHTED']),
|
||||
|
||||
@@ -440,6 +440,15 @@ test('precision: coordinates 1e-4 degrees, angles and lengths whole units', () =
|
||||
assert.deepEqual([wild.lat, wild.lon, wild.pitch], [90, -170, -90]);
|
||||
});
|
||||
|
||||
test('links made with a retired HUD layout still decode to its name', () => {
|
||||
// The app restores Operator as Tactical and Cyber as Tactical with Sonar on
|
||||
// (VisualSettings._setHudVariant); the codec only keeps the name.
|
||||
for (const hudVariant of ['operator', 'cyber']) {
|
||||
const state = { ...createDefaultShareViewState(), hudVariant };
|
||||
assert.equal(decodeOk(encodeShareView(state)).state.hudVariant, hudVariant);
|
||||
}
|
||||
});
|
||||
|
||||
test('defaults travel as frozen meanings that match today’s app defaults', () => {
|
||||
const defaults = createDefaultShareViewState();
|
||||
// When an app default moves, these tests should be updated to document the
|
||||
@@ -448,7 +457,8 @@ test('defaults travel as frozen meanings that match today’s app defaults', ()
|
||||
assert.equal(defaults.bloomVersion, BLOOM_SCALE_VERSION);
|
||||
assert.equal(defaults.hudVariant, HUD_LAYOUTS[0]);
|
||||
// Codes are append-only: the retired Operator layout keeps code 1 so old
|
||||
// links still parse, and the app restores them as Tactical.
|
||||
// links still parse, and the app restores them as Tactical. The retired
|
||||
// Cyber layout keeps code 3; the app restores it as Tactical with Sonar on.
|
||||
assert.deepEqual(SHARE_VIEW_ENUMS.hudVariant, [
|
||||
'tactical',
|
||||
'operator',
|
||||
@@ -456,7 +466,9 @@ test('defaults travel as frozen meanings that match today’s app defaults', ()
|
||||
'cyber',
|
||||
]);
|
||||
assert.deepEqual(
|
||||
SHARE_VIEW_ENUMS.hudVariant.filter((variant) => variant !== 'operator'),
|
||||
SHARE_VIEW_ENUMS.hudVariant.filter(
|
||||
(variant) => variant !== 'operator' && variant !== 'cyber',
|
||||
),
|
||||
[...HUD_LAYOUTS],
|
||||
);
|
||||
// Snow is retired; its code stays reserved (see the retired-style test).
|
||||
|
||||
@@ -542,6 +542,7 @@ test('every explicit visual UI gesture claims restore authority before it mutate
|
||||
const gestureRoutes = [
|
||||
['toggleHud: () => {', 'toggleOrbit: () =>', 'this.hud.toggle()', 'HUD hotkey'],
|
||||
['cycleDetection: () => {', 'toggleCctv: () =>', 'cycleDetectionMode()', 'detection hotkey'],
|
||||
['toggleSonar:', 'setSonarRings:', 'this._setCyberSonarEnabled(', 'Sonar toggle'],
|
||||
['toggleBloom:', 'setBloomIntensity:', 'this._setBloomEnabled(', 'toggleBloom control'],
|
||||
['setBloomIntensity:', 'toggleSharpen:', 'this._setBloomIntensity(', 'setBloomIntensity control'],
|
||||
['toggleSharpen:', 'setScopeEnabled:', 'this._setSharpenEnabled(', 'toggleSharpen control'],
|
||||
|
||||
@@ -91,20 +91,6 @@ test('each radiogroup is one tab stop, on its checked button', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('the Cyber theme frames the Street Level panel like its rail peers (P3)', () => {
|
||||
const cyber = read('src/ui/styles/cyber.css');
|
||||
const inner = (cyber.match(/\.recent-imagery-panel-inner,/g) || []).length;
|
||||
const panel = (cyber.match(/#recent-imagery-panel,/g) || []).length;
|
||||
assert.ok(inner > 0 && panel > 0);
|
||||
assert.equal(
|
||||
(cyber.match(/\.street-level-panel-inner,/g) || []).length,
|
||||
inner,
|
||||
);
|
||||
assert.equal((cyber.match(/#street-level-panel,/g) || []).length, panel);
|
||||
// A theme header rule must be able to outrank the panel's own.
|
||||
assert.doesNotMatch(panelCss, /#street-level-panel \.panel-header/);
|
||||
});
|
||||
|
||||
test('OPEN STREET VIEW keeps its width beside a long coverage line', () => {
|
||||
// .scene-btn grows and shrinks (flex: 1) and loads after this stylesheet:
|
||||
// only a more specific rule keeps the button from being squeezed.
|
||||
|
||||
@@ -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,
|
||||
@@ -1390,17 +1390,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(),
|
||||
@@ -1519,7 +1520,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);
|
||||
}
|
||||
@@ -1655,8 +1656,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(
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { displayPanelScroller } from './displayPanelScroll.js';
|
||||
|
||||
/**
|
||||
* Show the existing Display groups in Cockpit's Display popover while Cockpit
|
||||
* is on. The portal publishes the popover's slots; the Display panel
|
||||
@@ -37,16 +35,13 @@ export class CockpitDisplayPortal {
|
||||
this.slots = Object.freeze(
|
||||
Object.fromEntries(this.records.map(({ name, slot }) => [name, slot])),
|
||||
);
|
||||
this.standardScrollTop =
|
||||
displayPanelScroller(standardPanel)?.scrollTop || 0;
|
||||
this.standardScrollTop = standardPanel?.scrollTop || 0;
|
||||
this.cockpitScrollTop = cockpitPanel?.scrollTop || 0;
|
||||
const options = { passive: true, signal: this.listeners.signal };
|
||||
standardPanel?.addEventListener(
|
||||
'scroll',
|
||||
() => {
|
||||
if (!this.active)
|
||||
this.standardScrollTop =
|
||||
displayPanelScroller(standardPanel).scrollTop;
|
||||
if (!this.active) this.standardScrollTop = standardPanel.scrollTop;
|
||||
},
|
||||
{ ...options, capture: true },
|
||||
);
|
||||
@@ -98,8 +93,7 @@ export class CockpitDisplayPortal {
|
||||
if (nextActive && this.cockpitPanel)
|
||||
this.cockpitPanel.scrollTop = this.cockpitScrollTop;
|
||||
if (!nextActive && this.standardPanel)
|
||||
displayPanelScroller(this.standardPanel).scrollTop =
|
||||
this.standardScrollTop;
|
||||
this.standardPanel.scrollTop = this.standardScrollTop;
|
||||
};
|
||||
if (!settle) {
|
||||
this.afterRender(() => {
|
||||
@@ -146,8 +140,7 @@ export class CockpitDisplayPortal {
|
||||
this.publish(null);
|
||||
const { standardPanel, standardScrollTop } = this;
|
||||
this.afterRender(() => {
|
||||
if (standardPanel)
|
||||
displayPanelScroller(standardPanel).scrollTop = standardScrollTop;
|
||||
if (standardPanel) standardPanel.scrollTop = standardScrollTop;
|
||||
});
|
||||
this.records = [];
|
||||
this.restoreOwner = null;
|
||||
|
||||
+3
-135
@@ -2,7 +2,6 @@
|
||||
import {
|
||||
resolveCockpitUtilityAnchor,
|
||||
resolveCockpitUtilityLayout,
|
||||
resolveCyberCockpitPanelLane,
|
||||
} from '../cockpitUtilityLayout.js';
|
||||
import {
|
||||
COCKPIT_UTILITY_REC_GAP_PX,
|
||||
@@ -67,8 +66,6 @@ export function syncContextLayout() {
|
||||
if (window.matchMedia('(max-width: 760px)').matches) {
|
||||
this.context.dataset.layoutMode = 'compact-bottom';
|
||||
this.context.style.removeProperty('--cockpit-context-left');
|
||||
this.context.style.removeProperty('--cockpit-context-top');
|
||||
this.context.style.removeProperty('--cockpit-context-max-height');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,56 +75,6 @@ export function syncContextLayout() {
|
||||
'--cockpit-context-left',
|
||||
`${desktopInset.toFixed(1)}px`,
|
||||
);
|
||||
if (document.documentElement.dataset.uiTheme !== 'cyber') {
|
||||
this.context.style.removeProperty('--cockpit-context-top');
|
||||
this.context.style.removeProperty('--cockpit-context-max-height');
|
||||
return;
|
||||
}
|
||||
const defaultTop = Math.max(255, Math.min(300, window.innerHeight * 0.28));
|
||||
// An open left panel Cockpit keeps (Data Layers or Utilities).
|
||||
const dataPanel = document.querySelector(
|
||||
'#left-panel-stack > :is(#data-panel, #utilities-panel):not(.collapsed)',
|
||||
);
|
||||
let desiredTop = defaultTop;
|
||||
if (this.contextCollapsed && dataPanel) {
|
||||
desiredTop = Math.max(
|
||||
desiredTop,
|
||||
dataPanel.getBoundingClientRect().bottom + 8,
|
||||
);
|
||||
}
|
||||
const contextBounds = this.context.getBoundingClientRect();
|
||||
let safeBottom = window.innerHeight - 24;
|
||||
for (const selector of [
|
||||
'#cesium-credits',
|
||||
'#gev-credits',
|
||||
'#command-dock',
|
||||
'#view-switcher',
|
||||
]) {
|
||||
const obstacle = document.querySelector(selector);
|
||||
if (!obstacle) continue;
|
||||
const style = window.getComputedStyle(obstacle);
|
||||
if (
|
||||
style.display === 'none' ||
|
||||
style.visibility === 'hidden' ||
|
||||
Number(style.opacity) === 0
|
||||
)
|
||||
continue;
|
||||
const bounds = obstacle.getBoundingClientRect();
|
||||
const overlapsHorizontally =
|
||||
bounds.right > contextBounds.left && bounds.left < contextBounds.right;
|
||||
if (overlapsHorizontally && bounds.top > desiredTop) {
|
||||
safeBottom = Math.min(safeBottom, bounds.top - 8);
|
||||
}
|
||||
}
|
||||
const boundedTop = Math.max(
|
||||
defaultTop,
|
||||
Math.min(desiredTop, safeBottom - contextBounds.height),
|
||||
);
|
||||
this.context.style.setProperty(
|
||||
'--cockpit-context-top',
|
||||
`${boundedTop.toFixed(1)}px`,
|
||||
);
|
||||
this.context.style.removeProperty('--cockpit-context-max-height');
|
||||
}
|
||||
|
||||
export function syncSignalLayout() {
|
||||
@@ -138,8 +85,6 @@ export function syncSignalLayout() {
|
||||
// The compact strip shows only an expanded control.
|
||||
this.publishUtilityLayout(utilityLayoutView({ hideCollapsed: true }));
|
||||
this.signalStream.style.removeProperty('--cockpit-signal-right');
|
||||
this.signalStream.style.removeProperty('--cockpit-signal-top');
|
||||
this.signalStream.style.removeProperty('--cockpit-signal-max-height');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -149,36 +94,6 @@ export function syncSignalLayout() {
|
||||
'--cockpit-signal-right',
|
||||
`${desktopInset.toFixed(1)}px`,
|
||||
);
|
||||
this.signalStream.style.removeProperty('--cockpit-signal-top');
|
||||
this.signalStream.style.removeProperty('--cockpit-signal-max-height');
|
||||
const cyber = document.documentElement.dataset.uiTheme === 'cyber';
|
||||
const leftPanel = cyber
|
||||
? document.querySelector('#left-panel-stack > #data-panel')
|
||||
: null;
|
||||
const alignedTop = isRenderedOnScreen(leftPanel)
|
||||
? leftPanel.getBoundingClientRect().top
|
||||
: null;
|
||||
// Cyber's two rails share a top edge. Move the briefing below the collapsed
|
||||
// strip rather than pulling the right rail upward to avoid it.
|
||||
if (alignedTop !== null && utilityControls) {
|
||||
const expanded = utilityControls.querySelector(
|
||||
'.cockpit-utility-control.is-expanded',
|
||||
);
|
||||
if (!expanded) {
|
||||
const signalTop = Math.max(
|
||||
Math.max(255, Math.min(300, window.innerHeight * 0.28)),
|
||||
alignedTop + utilityControls.getBoundingClientRect().height + 28,
|
||||
);
|
||||
this.signalStream.style.setProperty(
|
||||
'--cockpit-signal-top',
|
||||
`${signalTop.toFixed(1)}px`,
|
||||
);
|
||||
this.signalStream.style.setProperty(
|
||||
'--cockpit-signal-max-height',
|
||||
`${Math.max(44, window.innerHeight - signalTop - 80).toFixed(1)}px`,
|
||||
);
|
||||
}
|
||||
}
|
||||
const signalBounds = this.signalStream.getBoundingClientRect();
|
||||
const utilityBounds = utilityControls?.getBoundingClientRect();
|
||||
if (utilityBounds) {
|
||||
@@ -203,42 +118,7 @@ export function syncSignalLayout() {
|
||||
collapsedLauncher.scrollHeight,
|
||||
)
|
||||
: 0;
|
||||
if (alignedTop !== null) {
|
||||
const lane = resolveCyberCockpitPanelLane({
|
||||
viewportHeight: window.innerHeight,
|
||||
top: alignedTop,
|
||||
launcherHeight: Math.max(
|
||||
collapsedHeight,
|
||||
collapsedLauncher?.getBoundingClientRect().height || 60,
|
||||
),
|
||||
signalHeight: this.signalCollapsed ? signalBounds.height : 44,
|
||||
contactHeight:
|
||||
this.contextCollapsed && this.context
|
||||
? this.context.getBoundingClientRect().height
|
||||
: 64,
|
||||
});
|
||||
document.body.style.setProperty(
|
||||
'--cyber-cockpit-panel-height',
|
||||
`${lane.panelHeight.toFixed(2)}px`,
|
||||
);
|
||||
this.publishUtilityLayout(
|
||||
utilityLayoutView({
|
||||
top: `${alignedTop.toFixed(2)}px`,
|
||||
maxHeight: `${lane.utilityHeight.toFixed(2)}px`,
|
||||
expandedMaxHeight: `${lane.panelHeight.toFixed(2)}px`,
|
||||
}),
|
||||
);
|
||||
if (expandedControl) {
|
||||
this.signalStream.style.setProperty(
|
||||
'--cockpit-signal-top',
|
||||
`${lane.signalTop.toFixed(2)}px`,
|
||||
);
|
||||
}
|
||||
this.syncContextLayout();
|
||||
return;
|
||||
}
|
||||
// Non-Cyber themes retain their independent REC/briefing corridor. Cyber
|
||||
// uses the rendered Data Layers top after reserving briefing space above.
|
||||
// The REC readout and the briefing card bound the utility corridor.
|
||||
// The readout only anchors the strip while it is genuinely on screen:
|
||||
// the Minimal variant drops it with `display:none`, but HUD Off hides the
|
||||
// whole Intel HUD with `visibility`/`opacity`, which keeps its rect.
|
||||
@@ -254,20 +134,8 @@ export function syncSignalLayout() {
|
||||
collapsedHeight,
|
||||
recGap: COCKPIT_UTILITY_REC_GAP_PX,
|
||||
signalGap: COCKPIT_UTILITY_SIGNAL_GAP_PX,
|
||||
minTopFloor: alignedTop ?? COCKPIT_UTILITY_MIN_TOP_PX,
|
||||
minTopRatio: alignedTop !== null ? 0 : COCKPIT_UTILITY_MIN_TOP_RATIO,
|
||||
signalCollapsed: this.signalCollapsed,
|
||||
utilityExpanded: Boolean(expandedControl),
|
||||
// Only Cyber relocates its collapsed briefing below the utility lane.
|
||||
// Other themes keep the measured visible card as the lower boundary.
|
||||
reserveViewportLane: document.documentElement.dataset.uiTheme === 'cyber',
|
||||
// Cyber keeps the collapsed briefing reachable below the utility instead
|
||||
// of hiding it. Reserve its actual height, including wrapped headings.
|
||||
signalHeight:
|
||||
document.documentElement.dataset.uiTheme === 'cyber' &&
|
||||
this.signalCollapsed
|
||||
? signalBounds.height
|
||||
: 0,
|
||||
minTopFloor: COCKPIT_UTILITY_MIN_TOP_PX,
|
||||
minTopRatio: COCKPIT_UTILITY_MIN_TOP_RATIO,
|
||||
});
|
||||
const availableHeight = utilityAnchor.maxHeight;
|
||||
const utilityLayout =
|
||||
|
||||
@@ -379,7 +379,7 @@ test('the layout pass’s measured fit hides the collapsed control and marks the
|
||||
app.unmount();
|
||||
});
|
||||
|
||||
test('the real layout pass drives the mounted controls: compact hides the collapsed sibling, Cyber shows both', async (t) => {
|
||||
test('the real layout pass drives the mounted controls: compact hides the collapsed sibling, desktop shows both', async (t) => {
|
||||
document.body.replaceChildren();
|
||||
const host = document.body.appendChild(document.createElement('div'));
|
||||
const pinia = createPinia();
|
||||
@@ -403,9 +403,6 @@ test('the real layout pass drives the mounted controls: compact hides the collap
|
||||
window.matchMedia = (query) => ({ matches: compact, media: query });
|
||||
t.after(() => {
|
||||
window.matchMedia = originalMatchMedia;
|
||||
delete document.documentElement.dataset.uiTheme;
|
||||
document.body.style.removeProperty('opacity');
|
||||
document.documentElement.style.removeProperty('opacity');
|
||||
app.unmount();
|
||||
});
|
||||
const strip = document.getElementById('cockpit-utility-controls');
|
||||
@@ -421,34 +418,13 @@ test('the real layout pass drives the mounted controls: compact hides the collap
|
||||
assert.equal(cockpit.utilityLayout.top, null);
|
||||
// Compact hides the sibling without marking the strip primary-only.
|
||||
assert.equal(strip.classList.contains('layout-primary-only'), false);
|
||||
// Cyber aligns the strip with the Data panel and keeps both controls.
|
||||
// The desktop pass anchors the strip in its own corridor and keeps both.
|
||||
compact = false;
|
||||
document.documentElement.dataset.uiTheme = 'cyber';
|
||||
const stack = document.body.appendChild(document.createElement('div'));
|
||||
stack.id = 'left-panel-stack';
|
||||
const dataPanel = stack.appendChild(document.createElement('section'));
|
||||
dataPanel.id = 'data-panel';
|
||||
for (const node of [
|
||||
dataPanel,
|
||||
stack,
|
||||
document.body,
|
||||
document.documentElement,
|
||||
])
|
||||
node.style.opacity = '1';
|
||||
dataPanel.getBoundingClientRect = () => ({
|
||||
top: 120,
|
||||
bottom: 400,
|
||||
left: 0,
|
||||
right: 200,
|
||||
width: 200,
|
||||
height: 280,
|
||||
});
|
||||
syncSignalLayout.call(owner);
|
||||
await nextTick();
|
||||
assert.equal(display.getAttribute('aria-hidden'), 'false');
|
||||
assert.equal(radioControl.getAttribute('aria-hidden'), 'false');
|
||||
assert.equal(cockpit.utilityLayout.top, '120.00px');
|
||||
assert.equal(strip.classList.contains('layout-primary-only'), false);
|
||||
assert.match(cockpit.utilityLayout.top, /^\d+(\.\d+)?px$/);
|
||||
});
|
||||
|
||||
test('the rail opens one panel at a time and reads as a disclosure', async (t) => {
|
||||
|
||||
@@ -9,9 +9,8 @@ import { fileURLToPath } from 'node:url';
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
||||
const STYLES = path.join(HERE, 'styles');
|
||||
const LOCALES = path.join(HERE, '..', 'i18n', 'locales');
|
||||
// cyber.css carries decorative theme strings (LOC / GRID, SYS 06 // ...);
|
||||
// street-level.css ' · ESC' is a key cap. Neither is UI copy.
|
||||
const DECORATIVE = new Set(['cyber.css', 'street-level.css']);
|
||||
// street-level.css ' · ESC' is a key cap, not UI copy.
|
||||
const DECORATIVE = new Set(['street-level.css']);
|
||||
|
||||
test('no user-visible text in CSS content: outside decorative themes', () => {
|
||||
const hits = [];
|
||||
|
||||
@@ -38,7 +38,6 @@ export function getCyberSonarControlState(
|
||||
intensityPct: settings.intensity,
|
||||
opacityPct: settings.opacity,
|
||||
sectorDeg: settings.sector,
|
||||
cyberSelected: root?.dataset?.uiTheme === 'cyber',
|
||||
mapSweepActive: isCyberSonarActive(options),
|
||||
contactSweepActive:
|
||||
root?.dataset?.cyberSonarGpu === 'supported' &&
|
||||
@@ -59,10 +58,10 @@ export function setCyberSonarControls(
|
||||
sonar: getCyberSonarControlState(doc, { hudActive: owner?.hud?.visible }),
|
||||
});
|
||||
if (!request || typeof request !== 'object' || Array.isArray(request)) {
|
||||
return fail('Provide Cyber sonar settings as an object.');
|
||||
return fail('Provide sonar settings as an object.');
|
||||
}
|
||||
const fields = Object.keys(request);
|
||||
if (!fields.length) return fail('Provide at least one Cyber sonar setting.');
|
||||
if (!fields.length) return fail('Provide at least one sonar setting.');
|
||||
for (const field of fields) {
|
||||
const value = request[field];
|
||||
if (field === 'enabled') {
|
||||
@@ -70,19 +69,14 @@ export function setCyberSonarControls(
|
||||
continue;
|
||||
}
|
||||
if (!Object.hasOwn(SETTING_FIELDS, field)) {
|
||||
return fail('Unknown Cyber sonar setting.');
|
||||
return fail('Unknown sonar setting.');
|
||||
}
|
||||
const [, min, max] = SETTING_FIELDS[field];
|
||||
if (!Number.isInteger(value) || value < min || value > max) {
|
||||
return fail(`${field} must be an integer from ${min} to ${max}.`);
|
||||
}
|
||||
}
|
||||
if (
|
||||
owner.hud?.getVariant?.() !== 'cyber' ||
|
||||
doc?.documentElement?.dataset?.uiTheme !== 'cyber'
|
||||
) {
|
||||
return fail('Cyber sonar controls require the Cyber HUD layout.');
|
||||
}
|
||||
owner.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
for (const [field, [setting]] of Object.entries(SETTING_FIELDS)) {
|
||||
if (Object.hasOwn(request, field)) {
|
||||
owner._setCyberSonarSetting(setting, request[field]);
|
||||
|
||||
@@ -11,9 +11,9 @@ import { StyleManager } from './applicationShell.js';
|
||||
import { VisualSettings } from './visualSettings.js';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
function fixture(theme = 'cyber') {
|
||||
function fixture(layout = 'tactical') {
|
||||
const root = {
|
||||
dataset: { uiTheme: theme, cyberSonarGpu: 'supported' },
|
||||
dataset: { cyberSonarGpu: 'supported' },
|
||||
style: { setProperty() {} },
|
||||
};
|
||||
const flags = new Set();
|
||||
@@ -27,7 +27,7 @@ function fixture(theme = 'cyber') {
|
||||
};
|
||||
const calls = [];
|
||||
const owner = {
|
||||
hud: { getVariant: () => theme },
|
||||
hud: { getVariant: () => layout },
|
||||
_setCyberSonarSetting(name, value) {
|
||||
calls.push([name, value]);
|
||||
const suffix = name[0].toUpperCase() + name.slice(1);
|
||||
@@ -50,8 +50,15 @@ test('real runner and facade use visual settings, preserve visibility and return
|
||||
visual.services = { governorRequestRender: (reason) => renders.push(reason) };
|
||||
// No Display panel here: the controls' render is not under test.
|
||||
visual._publishDisplay = () => {};
|
||||
// The shell's share sync; a sonar change keeps the link current.
|
||||
const shares = [];
|
||||
visual._syncShareState = () => shares.push(true);
|
||||
const owner = Object.create(StyleManager.prototype);
|
||||
owner._visualSettings = visual;
|
||||
const claims = [];
|
||||
Object.defineProperty(owner, 'shareLinkManager', { value: {
|
||||
claimRestoreLane: (lane) => claims.push({ lane, renders: renders.length }),
|
||||
} });
|
||||
Object.defineProperty(owner, 'hud', { value: f.owner.hud });
|
||||
const viewer = {
|
||||
camera: { moveEnd: { addEventListener() {} } },
|
||||
@@ -65,19 +72,23 @@ test('real runner and facade use visual settings, preserve visibility and return
|
||||
const runner = createGevActionRunner({ styleManager: owner, viewer, dataManager: {} });
|
||||
const result = await runner('set_cyber_sonar', { enabled: false, intensityPct: 73, sectorDeg: 9 });
|
||||
assert.equal(result.ok, true);
|
||||
assert.deepEqual(claims, [{ lane: 'visual', renders: 0 }]);
|
||||
assert.equal(result.sonar.intensityPct, 73);
|
||||
assert.equal(result.sonar.sectorDeg, 9);
|
||||
assert.equal(result.sonar.enabled, false);
|
||||
assert.equal(f.root.dataset.uiTheme, 'cyber');
|
||||
assert.equal(f.owner.hud.getVariant(), 'tactical');
|
||||
assert.equal(f.hudFlags.has('active'), true);
|
||||
assert.equal(renders.length, 3);
|
||||
assert.equal(shares.length, 1);
|
||||
const before = getCyberSonarControlState();
|
||||
const invalid = await runner('set_cyber_sonar', { rings: 6, opacityPct: 0 });
|
||||
assert.equal(invalid.ok, false);
|
||||
assert.deepEqual(claims, [{ lane: 'visual', renders: 0 }], 'invalid requests claim no authority');
|
||||
assert.deepEqual(getCyberSonarControlState(), before);
|
||||
assert.equal(renders.length, 3);
|
||||
const zero = await runner('set_cyber_sonar', { intensityPct: 0 });
|
||||
assert.equal(zero.sonar.intensityPct, 0);
|
||||
assert.deepEqual(claims.map(({ lane }) => lane), ['visual', 'visual']);
|
||||
assert.equal(zero.sonar.enabled, false);
|
||||
const unavailable = createGevActionRunner({ styleManager: {}, viewer, dataManager: {} });
|
||||
assert.equal((await unavailable('set_cyber_sonar', { enabled: true })).ok, false);
|
||||
@@ -136,11 +147,11 @@ test('rejects the whole invalid request before any mutation', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('requires Cyber and preserves off state and every omitted setting', () => {
|
||||
for (const theme of ['tactical', 'minimal']) {
|
||||
const f = fixture(theme);
|
||||
assert.equal(setCyberSonarControls(f.owner, { enabled: true }, f.doc).ok, false);
|
||||
assert.deepEqual(f.calls, []);
|
||||
test('works under every HUD layout and preserves off state and every omitted setting', () => {
|
||||
for (const layout of ['tactical', 'minimal']) {
|
||||
const f = fixture(layout);
|
||||
assert.equal(setCyberSonarControls(f.owner, { enabled: true }, f.doc).ok, true);
|
||||
assert.deepEqual(f.calls, [['enabled', true]]);
|
||||
}
|
||||
const f = fixture();
|
||||
f.root.dataset.cyberSonar = 'off';
|
||||
|
||||
@@ -1,950 +0,0 @@
|
||||
import {
|
||||
getScopeMaskFeather,
|
||||
getScopeMaskOpacity,
|
||||
isScopeMaskEnabled,
|
||||
setScopeMaskEnabled,
|
||||
setScopeMaskFeather,
|
||||
setScopeMaskOpacity,
|
||||
} from '../scopeMask.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
applyHudUiTheme,
|
||||
CYBER_VISUAL_DEFAULTS,
|
||||
cyberVisualDefaultsForHudTransition,
|
||||
HUD_LAYOUTS,
|
||||
normalizeHudLayout,
|
||||
} from '../hudLayouts.js';
|
||||
import { GEV_ACTION_SCHEMAS } from '../voice/actionSchemas.js';
|
||||
import { createGevActionRunner } from '../voice/gevActions.js';
|
||||
import { StyleManager } from './applicationShell.js';
|
||||
import { createPinia } from 'pinia';
|
||||
import { useDisplayStore } from './stores/display.js';
|
||||
import { VisualSettings } from './visualSettings.js';
|
||||
import { STYLES } from './visualPresets.js';
|
||||
|
||||
test('CCTV and Context keep their headers outside Cyber-only scroll bodies', () => {
|
||||
for (const file of ['panels/CctvPanel.vue', 'ContextView.vue']) {
|
||||
const markup = readFileSync(
|
||||
new URL(`./views/${file}`, import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
// The body wears the shared scrollbar skin where Cyber makes it scroll.
|
||||
assert.match(
|
||||
markup,
|
||||
/class="cyber-panel-body ui-scroll" data-rail-scroller/,
|
||||
);
|
||||
assert.ok(
|
||||
// The header is RailPanel's; the body is its first content.
|
||||
markup.indexOf('<RailPanel ') > -1 &&
|
||||
markup.indexOf('<RailPanel ') <
|
||||
markup.indexOf('class="cyber-panel-body ui-scroll"'),
|
||||
);
|
||||
}
|
||||
const shared = readFileSync(
|
||||
new URL('./styles/controls.css', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
const cyber = readFileSync(
|
||||
new URL('./styles/cyber.css', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
assert.match(shared, /\.cyber-panel-body\s*\{\s*display: contents;/);
|
||||
assert.match(
|
||||
cyber,
|
||||
/:root\[data-ui-theme='cyber'\] \.cyber-panel-body\s*\{[^}]*overflow-y: auto;[^}]*overscroll-behavior: contain;/,
|
||||
);
|
||||
});
|
||||
|
||||
function styleOwner(t, initialVariant = 'cyber') {
|
||||
const previous = { document: globalThis.document, window: globalThis.window };
|
||||
const root = { dataset: {} };
|
||||
globalThis.document = { documentElement: root, querySelectorAll: () => [] };
|
||||
globalThis.window = { dispatchEvent() {} };
|
||||
t.after(() => Object.assign(globalThis, previous));
|
||||
let variant = initialVariant;
|
||||
const calls = [];
|
||||
const hud = {
|
||||
getVariant: () => variant,
|
||||
setVariant: (value) => {
|
||||
// Normalize like the real HUD so retired layouts fall back.
|
||||
variant = normalizeHudLayout(value);
|
||||
applyHudUiTheme(root, variant);
|
||||
},
|
||||
setMode: (value) => calls.push(['mode', value]),
|
||||
onStyleChange: (value) => calls.push(['style', value]),
|
||||
};
|
||||
hud.setVariant(initialVariant);
|
||||
const owner = Object.create(VisualSettings.prototype);
|
||||
Object.assign(owner, {
|
||||
activeStyle: 'normal',
|
||||
store: { publish() {} },
|
||||
readHud: () => hud,
|
||||
readShareLinks: () => ({ onStyleChange() {} }),
|
||||
_visualEffects: {
|
||||
stages: Object.fromEntries(
|
||||
Object.entries(STYLES).map(([name, config]) => [
|
||||
name,
|
||||
{ uniforms: { ...config.uniforms, intensity: 0 } },
|
||||
]),
|
||||
),
|
||||
},
|
||||
services: { governorRequestRender() {}, setDetectionStyle() {} },
|
||||
_setBloomEnabled: (value) => calls.push(['bloom', value]),
|
||||
_setSharpenEnabled: (value) => calls.push(['sharpen', value]),
|
||||
_applyDetectionPreset: (value) => calls.push(['detection', value]),
|
||||
_syncShareState: () => calls.push(['share', variant]),
|
||||
});
|
||||
for (const name of [
|
||||
'setCelestialRingEnabled',
|
||||
'_startTransition',
|
||||
'_publishActiveStyle',
|
||||
'_updateSliderPanel',
|
||||
'_updateHudButtonState',
|
||||
'_syncIrBoost',
|
||||
'_syncCockpitInheritedStyle',
|
||||
'_syncCyberSonarControl',
|
||||
'_scheduleAdaptivePanelLayout',
|
||||
'_setDetectionFade',
|
||||
// Intensities: the fixture has no post-process stages to drive.
|
||||
'_setBloomIntensity',
|
||||
'_setSharpenIntensity',
|
||||
])
|
||||
owner[name] = () => {};
|
||||
return { owner, hud, root, calls };
|
||||
}
|
||||
|
||||
test('visual styles retain Cyber through real preset application without dropping other defaults', (t) => {
|
||||
const { owner, hud, root, calls } = styleOwner(t);
|
||||
for (const style of [
|
||||
'surveillance',
|
||||
'normal',
|
||||
'noir',
|
||||
'anime',
|
||||
'thermal',
|
||||
'retro',
|
||||
]) {
|
||||
owner.setStyle(style);
|
||||
assert.equal(owner.activeStyle, style);
|
||||
assert.equal(hud.getVariant(), 'cyber');
|
||||
assert.equal(root.dataset.uiTheme, 'cyber');
|
||||
assert.deepEqual(calls.at(-1), ['share', 'cyber']);
|
||||
}
|
||||
assert.equal(owner.stages.thermal.uniforms.sensitivity, 0.85);
|
||||
assert.equal(calls.filter(([name]) => name === 'detection').length, 3);
|
||||
assert.equal(
|
||||
calls.filter(([name, value]) => name === 'bloom' && value === false).length,
|
||||
3,
|
||||
);
|
||||
assert.equal(
|
||||
calls.filter(([name, value]) => name === 'sharpen' && value === true)
|
||||
.length,
|
||||
3,
|
||||
);
|
||||
});
|
||||
|
||||
test('non-Cyber style presets and explicit HUD choices remain authoritative', (t) => {
|
||||
const { owner, hud, root } = styleOwner(t);
|
||||
for (const variant of ['tactical', 'minimal']) {
|
||||
owner._setHudVariant(variant);
|
||||
assert.equal(hud.getVariant(), variant);
|
||||
assert.equal(root.dataset.uiTheme, undefined);
|
||||
owner.setStyle('normal');
|
||||
owner.setStyle('surveillance');
|
||||
assert.equal(hud.getVariant(), 'tactical');
|
||||
}
|
||||
});
|
||||
|
||||
test('leaving Cyber without a preset choice restores the prior visual preset', (t) => {
|
||||
const { owner, hud } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
assert.equal(owner.activeStyle, 'thermal');
|
||||
assert.equal(owner._preCyberStyle, 'noir');
|
||||
assert.equal(owner._cyberStyleUserSelected, false);
|
||||
|
||||
owner._setHudVariant('minimal', { applyVisualDefaults: true });
|
||||
assert.equal(hud.getVariant(), 'minimal');
|
||||
assert.equal(owner.activeStyle, 'noir');
|
||||
assert.equal(owner._preCyberStyle, null);
|
||||
assert.equal(owner._cyberStyleUserSelected, false);
|
||||
});
|
||||
|
||||
test('a preset explicitly selected in Cyber survives exit and resets for re-entry', (t) => {
|
||||
const { owner, hud } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
owner.setStyle('anime', { userInitiated: true });
|
||||
assert.equal(owner.activeStyle, 'anime');
|
||||
assert.equal(owner._preCyberStyle, 'noir');
|
||||
assert.equal(owner._cyberStyleUserSelected, true);
|
||||
|
||||
// Reselecting the active mode must not erase the user's preset intent.
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
assert.equal(owner._preCyberStyle, 'noir');
|
||||
owner._setHudVariant('minimal', { applyVisualDefaults: true });
|
||||
assert.equal(hud.getVariant(), 'minimal');
|
||||
assert.equal(owner.activeStyle, 'anime');
|
||||
assert.equal(owner._preCyberStyle, null);
|
||||
assert.equal(owner._cyberStyleUserSelected, false);
|
||||
|
||||
// A later untouched Cyber round trip restores the new pre-Cyber preset.
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
assert.equal(owner.activeStyle, 'thermal');
|
||||
assert.equal(owner._preCyberStyle, 'anime');
|
||||
owner._setHudVariant('minimal', { applyVisualDefaults: true });
|
||||
assert.equal(owner.activeStyle, 'anime');
|
||||
});
|
||||
|
||||
test('an explicit same-value FLIR choice is preserved on Cyber exit', (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
|
||||
owner.setStyle('thermal', { userInitiated: true });
|
||||
assert.equal(owner.activeStyle, 'thermal');
|
||||
assert.equal(owner._cyberStyleUserSelected, true);
|
||||
owner._setHudVariant('minimal', { applyVisualDefaults: true });
|
||||
assert.equal(owner.activeStyle, 'thermal');
|
||||
});
|
||||
|
||||
test('an authoritative same-Cyber reset clears local preset ownership', (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
owner.setStyle('anime', { userInitiated: true });
|
||||
assert.equal(owner._cyberStyleUserSelected, true);
|
||||
|
||||
owner._setHudVariant('cyber');
|
||||
assert.equal(owner.activeStyle, 'anime');
|
||||
assert.equal(owner._preCyberStyle, null);
|
||||
assert.equal(owner._cyberStyleUserSelected, false);
|
||||
owner._setHudVariant('minimal', { applyVisualDefaults: true });
|
||||
assert.equal(owner.activeStyle, 'anime');
|
||||
});
|
||||
|
||||
test('Display and voice HUD routes preserve explicit Cyber entry and exit authority', async (t) => {
|
||||
const makeOwner = () => {
|
||||
const { owner, hud } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
owner.setHudLayout = (...args) =>
|
||||
StyleManager.prototype.setHudLayout.call(owner, ...args);
|
||||
owner.getControlState = () => ({
|
||||
hud: { layout: hud.getVariant(), visible: true },
|
||||
});
|
||||
return { owner, hud };
|
||||
};
|
||||
|
||||
const display = makeOwner();
|
||||
// The Display panel's layout select and the dock's style buttons call
|
||||
// these actions through the display store.
|
||||
const store = useDisplayStore(createPinia());
|
||||
const token = store.connect({
|
||||
setHudLayout: (value) => display.owner.setHudLayout(value),
|
||||
setStyle: (value) => display.owner.setStyle(value, { userInitiated: true }),
|
||||
});
|
||||
store.act('setHudLayout', 'cyber');
|
||||
assert.equal(display.hud.getVariant(), 'cyber');
|
||||
assert.equal(display.owner.activeStyle, 'thermal');
|
||||
store.act('setStyle', 'anime');
|
||||
assert.equal(display.owner.activeStyle, 'anime');
|
||||
store.act('setHudLayout', 'minimal');
|
||||
assert.equal(display.hud.getVariant(), 'minimal');
|
||||
assert.equal(display.owner.activeStyle, 'anime');
|
||||
store.detach(token);
|
||||
|
||||
const voice = makeOwner();
|
||||
const eventSource = { addEventListener() {}, removeEventListener() {} };
|
||||
const viewer = {
|
||||
camera: { moveEnd: { addEventListener() {} } },
|
||||
clock: { onTick: { addEventListener: () => () => {} } },
|
||||
canvas: eventSource,
|
||||
scene: { canvas: eventSource },
|
||||
};
|
||||
const runVoiceAction = createGevActionRunner({
|
||||
viewer,
|
||||
styleManager: voice.owner,
|
||||
dataManager: {},
|
||||
});
|
||||
const entered = await runVoiceAction('set_hud', { layout: 'cyber' });
|
||||
assert.equal(entered.ok, true);
|
||||
assert.equal(voice.hud.getVariant(), 'cyber');
|
||||
assert.equal(voice.owner.activeStyle, 'thermal');
|
||||
const selected = await runVoiceAction('set_visual_style', { style: 'anime' });
|
||||
assert.equal(selected.ok, true);
|
||||
assert.equal(voice.owner.activeStyle, 'anime');
|
||||
const exited = await runVoiceAction('set_hud', { layout: 'minimal' });
|
||||
assert.equal(exited.ok, true);
|
||||
assert.equal(voice.hud.getVariant(), 'minimal');
|
||||
assert.equal(voice.owner.activeStyle, 'anime');
|
||||
});
|
||||
|
||||
test('scope choice and expanded feather survive every HUD layout and both restore paths', async (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
const previous = { enabled: isScopeMaskEnabled(), feather: getScopeMaskFeather() };
|
||||
t.after(() => { setScopeMaskEnabled(previous.enabled); setScopeMaskFeather(previous.feather); });
|
||||
Object.assign(owner.services, { setScopeMaskEnabled, setScopeMaskFeather });
|
||||
let shown = null;
|
||||
owner.store = { publish: (view) => (shown = view.scope) };
|
||||
await owner.restoreShareState({ scopeEnabled: false, scopeFeatherPct: 200 });
|
||||
assert.deepEqual(shown, { enabled: false, featherPct: 200, opacityPct: 100 });
|
||||
for (const layout of ['minimal', 'cyber', 'tactical']) {
|
||||
owner._setHudVariant(layout, { applyVisualDefaults: true });
|
||||
assert.equal(isScopeMaskEnabled(), false, layout);
|
||||
assert.equal(getScopeMaskFeather(), 2, layout);
|
||||
assert.equal(shown.enabled, false, layout);
|
||||
}
|
||||
await owner.applyVisualState({ scope: { enabled: true, featherPct: 175 } });
|
||||
assert.equal(isScopeMaskEnabled(), true);
|
||||
assert.equal(getScopeMaskFeather(), 1.75);
|
||||
assert.deepEqual(shown, { enabled: true, featherPct: 175, opacityPct: 100 });
|
||||
await owner.applyVisualState({ scope: { featherPct: 500 } });
|
||||
assert.equal(getScopeMaskFeather(), 2);
|
||||
assert.deepEqual(shown, { enabled: true, featherPct: 200, opacityPct: 100 });
|
||||
});
|
||||
|
||||
test('a shared scope opacity is restored and rides in the next share state', async (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
const previous = getScopeMaskOpacity();
|
||||
t.after(() => setScopeMaskOpacity(previous));
|
||||
Object.assign(owner.services, {
|
||||
setScopeMaskEnabled() {},
|
||||
setScopeMaskFeather() {},
|
||||
setScopeMaskOpacity,
|
||||
});
|
||||
let shown = null;
|
||||
owner.store = { publish: (view) => (shown = view.scope) };
|
||||
await owner.restoreShareState({ scopeOpacityPct: 60 });
|
||||
assert.equal(getScopeMaskOpacity(), 0.6);
|
||||
assert.equal(shown.opacityPct, 60);
|
||||
// A state without it leaves the opacity alone.
|
||||
await owner.restoreShareState({ scopeFeatherPct: 80 });
|
||||
assert.equal(getScopeMaskOpacity(), 0.6);
|
||||
assert.equal(shown.opacityPct, 60);
|
||||
Object.assign(owner.services, {
|
||||
getDetectionTuning: () => ({ allocationStrategy: 'ELASTIC' }),
|
||||
getDetectionMode: () => 'OFF',
|
||||
isScopeMaskEnabled: () => true,
|
||||
getScopeMaskFeather: () => 0.8,
|
||||
getScopeMaskOpacity,
|
||||
getScopeTerminusOverride: () => null,
|
||||
});
|
||||
owner.readCelestialRing = () => null;
|
||||
assert.equal(owner._readShareState().options.scopeOpacityPct, 60);
|
||||
// A link asking for less than the floor opens at the floor, and says so.
|
||||
await owner.restoreShareState({ scopeOpacityPct: 20 });
|
||||
assert.equal(getScopeMaskOpacity(), 0.5);
|
||||
assert.equal(owner._readShareState().options.scopeOpacityPct, 50);
|
||||
});
|
||||
|
||||
test('a scene shot saved with the retired Snow style plays on Normal', async (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
await owner.applyVisualState({ style: 'snow' });
|
||||
assert.equal(owner.activeStyle, 'normal');
|
||||
});
|
||||
|
||||
test('scene and share HUD transitions do not restore a local pre-Cyber preset', async (t) => {
|
||||
const { owner, hud } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
owner.setStyle('anime', { userInitiated: true });
|
||||
assert.equal(owner._cyberStyleUserSelected, true);
|
||||
|
||||
await owner.applyVisualState({ style: 'retro', hud: { variant: 'cyber' } });
|
||||
assert.equal(hud.getVariant(), 'cyber');
|
||||
assert.equal(owner.activeStyle, 'retro');
|
||||
assert.equal(owner._preCyberStyle, null);
|
||||
assert.equal(owner._cyberStyleUserSelected, false);
|
||||
owner._setHudVariant('minimal', { applyVisualDefaults: true });
|
||||
assert.equal(owner.activeStyle, 'retro');
|
||||
|
||||
owner.setStyle('surveillance');
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
assert.equal(owner._preCyberStyle, 'surveillance');
|
||||
owner.setStyle('anime', { userInitiated: true });
|
||||
await owner.restoreShareState({
|
||||
style: 'thermal',
|
||||
hudVariant: 'cyber',
|
||||
});
|
||||
assert.equal(hud.getVariant(), 'cyber');
|
||||
assert.equal(owner.activeStyle, 'thermal');
|
||||
assert.equal(owner._preCyberStyle, null);
|
||||
assert.equal(owner._cyberStyleUserSelected, false);
|
||||
owner._setHudVariant('tactical', { applyVisualDefaults: true });
|
||||
assert.equal(owner.activeStyle, 'thermal');
|
||||
assert.equal(owner._preCyberStyle, null);
|
||||
});
|
||||
|
||||
test('scene and share restoration override Cyber and preserve restored Cyber parameters', async (t) => {
|
||||
const { owner, hud } = styleOwner(t);
|
||||
await owner.applyVisualState({ style: 'retro', hud: { variant: 'minimal' } });
|
||||
assert.equal(hud.getVariant(), 'minimal');
|
||||
owner._setHudVariant('cyber');
|
||||
await owner.restoreShareState({
|
||||
style: 'surveillance',
|
||||
hudVariant: 'operator',
|
||||
});
|
||||
// A link saved with the retired Operator layout restores as Tactical.
|
||||
assert.equal(hud.getVariant(), 'tactical');
|
||||
await owner.restoreShareState({
|
||||
style: 'thermal',
|
||||
hudVariant: 'cyber',
|
||||
styleParams: { palette: 0.73 },
|
||||
});
|
||||
assert.equal(hud.getVariant(), 'cyber');
|
||||
assert.equal(owner.activeStyle, 'thermal');
|
||||
assert.equal(owner.stages.thermal.uniforms.palette, 0.73);
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
assert.equal(owner.stages.thermal.uniforms.palette, 0.73);
|
||||
owner._setHudVariant('tactical');
|
||||
owner._setHudVariant('cyber', { applyVisualDefaults: true });
|
||||
assert.equal(owner.stages.thermal.uniforms.palette, 0.42);
|
||||
});
|
||||
|
||||
const read = (relative) =>
|
||||
readFileSync(new URL(relative, import.meta.url), 'utf8');
|
||||
|
||||
test('Cyber setup uses a compact toolbar icon and highlights the north-up letter', () => {
|
||||
const css = read('./styles/cyber.css');
|
||||
assert.match(
|
||||
css,
|
||||
/#top-center-actions #key-setup-chip\s*\{[^}]*inset: auto;[^}]*width: 36px;/,
|
||||
);
|
||||
assert.match(css, /#key-setup-chip\[hidden\]\s*\{\s*display: none;/);
|
||||
assert.match(
|
||||
css,
|
||||
/#north-up-view\[data-north-up='true'\]\s+\.camera-compass-n\s*\{[^}]*color: var\(--cyber-red-bright\)/,
|
||||
);
|
||||
});
|
||||
const cyberStyles = read('./styles/cyber.css');
|
||||
|
||||
// Source guards supplement rendered popup/hit-target checks. Inspect one rule
|
||||
// at a time so a safe declaration on a child cannot excuse a clipped ancestor.
|
||||
function cssRuleBody(styles, selector) {
|
||||
const match = styles.match(new RegExp(`${selector.source}\\s*\\{([^}]+)\\}`));
|
||||
assert.ok(match, `Missing CSS rule: ${selector.source}`);
|
||||
return match[1];
|
||||
}
|
||||
|
||||
test('Cyber Voice clips its decoration without clipping descendant help and errors', () => {
|
||||
const owner = cssRuleBody(
|
||||
cyberStyles,
|
||||
/:root\[data-ui-theme='cyber'\] #command-dock > #gev-voice-control/,
|
||||
);
|
||||
assert.match(owner, /isolation:\s*isolate;/);
|
||||
assert.match(owner, /overflow:\s*visible;/);
|
||||
assert.match(owner, /clip-path:\s*none;/);
|
||||
|
||||
const decoration = cssRuleBody(
|
||||
cyberStyles,
|
||||
/:root\[data-ui-theme='cyber'\] #command-dock > #gev-voice-control::before/,
|
||||
);
|
||||
assert.match(decoration, /clip-path:\s*polygon\(/);
|
||||
assert.match(decoration, /pointer-events:\s*none;/);
|
||||
assert.match(decoration, /inset:\s*0;/);
|
||||
assert.match(decoration, /z-index:\s*-1;/);
|
||||
});
|
||||
|
||||
test('Cyber dock pins escape the tray mask and its decoration overrides the legacy arrow geometry', () => {
|
||||
const owner = cssRuleBody(
|
||||
cyberStyles,
|
||||
/:root\[data-ui-theme='cyber'\] #command-dock \.dock-popover-content/,
|
||||
);
|
||||
assert.match(owner, /clip-path:\s*none;/);
|
||||
assert.match(owner, /isolation:\s*isolate;/);
|
||||
|
||||
// Including the tray owners beats #control-panel's more specific old
|
||||
// ::after arrow positioning. Otherwise left:auto can collapse the frame.
|
||||
const decoration = cssRuleBody(
|
||||
cyberStyles,
|
||||
/:root\[data-ui-theme='cyber'\]\s+#command-dock\s+:is\(#location-bar, #control-panel\)\s+\.dock-popover-content::after/,
|
||||
);
|
||||
assert.match(decoration, /inset:\s*0;/);
|
||||
assert.match(decoration, /width:\s*auto;/);
|
||||
assert.match(decoration, /height:\s*auto;/);
|
||||
assert.match(decoration, /transform:\s*none;/);
|
||||
assert.match(decoration, /clip-path:\s*var\(--cyber-panel-frame\);/);
|
||||
assert.match(decoration, /pointer-events:\s*none;/);
|
||||
});
|
||||
|
||||
test('Cyber lower-left telemetry tracks the credit anchor with clearance for its logo row', () => {
|
||||
const telemetry = cssRuleBody(
|
||||
cyberStyles,
|
||||
/#intel-hud\[data-variant='cyber'\] \.hud-bottom-left/,
|
||||
);
|
||||
const offset = telemetry.match(/bottom:\s*calc\(2vh \+ ([\d.]+)rem \+ var\(--world-timeline-lift, 0px\)\);/);
|
||||
assert.ok(offset, 'telemetry must retain the attribution viewport anchor');
|
||||
const credits = read('./styles/command-dock-trays.css');
|
||||
const creditOffsets = [
|
||||
...credits.matchAll(
|
||||
/#cesium-credits\s*\{[^}]*bottom:\s*calc\(2vh \+ ([\d.]+)rem \+ var\(--world-timeline-lift, 0px\)\);/g,
|
||||
),
|
||||
];
|
||||
assert.ok(creditOffsets.length > 0);
|
||||
for (const credit of creditOffsets) {
|
||||
assert.ok(
|
||||
Number(offset[1]) - Number(credit[1]) >= 2.75,
|
||||
'reserve the 28px logo row, baseline descent and 12px clearance at the 16px root size',
|
||||
);
|
||||
}
|
||||
assert.doesNotMatch(cyberStyles, /\.hud-bottom-left\s*\{\s*bottom:\s*60px;/);
|
||||
});
|
||||
|
||||
test('shared panel hooks affect only opted-in rail surfaces without overriding disclosure and concealment', () => {
|
||||
const styles = read('./styles/panel-surfaces.css');
|
||||
const rail = cssRuleBody(
|
||||
styles,
|
||||
/:is\(#left-panel-stack, #right-context-rail\)\s+> \[data-panel-id\]:has\(> \[data-panel-surface\]\)/,
|
||||
);
|
||||
assert.match(rail, /pointer-events:\s*auto;/);
|
||||
assert.doesNotMatch(rail, /(?:display|visibility):/);
|
||||
assert.doesNotMatch(
|
||||
styles,
|
||||
/:is\(#left-panel-stack, #right-context-rail\)\s*> \[data-panel-id\]\s*\{/,
|
||||
);
|
||||
assert.match(
|
||||
styles,
|
||||
/\[data-panel-surface\]:not\(\[hidden\]\):not\(dialog:not\(\[open\]\)\)\s*\{\s*display: flex;/,
|
||||
);
|
||||
assert.match(
|
||||
styles,
|
||||
/dialog\[data-panel-surface\]:not\(\[open\]\)\s*\{\s*display: none !important;/,
|
||||
);
|
||||
assert.match(
|
||||
styles,
|
||||
/body:is\(\.ui-clean-view, \.recording-mode\)[^{]+\{[^}]*visibility: hidden !important;[^}]*pointer-events: none !important;/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber clipped expand controls retain an inset keyboard-focus outline in map and cockpit', () => {
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/:root\[data-ui-theme='cyber'\]\s+:is\(\s*\.panel-collapse-btn,\s*body\.cockpit-mode \.cockpit-utility-glyph\s*\):focus-visible\s*\{[^}]*outline: 2px solid var\(--cyber-red-bright\) !important;[^}]*outline-offset: -3px;[^}]*box-shadow: none;/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/:root\[data-ui-theme='cyber'\]\s+:is\(\.panel-collapse-btn, body\.cockpit-mode \.cockpit-utility-glyph\):is\(\s*:hover,\s*:focus-visible\s*\)\s*\{[^}]*border-color: var\(--cyber-red-bright\);/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber Radio retains upstream nested Context ownership', () => {
|
||||
assert.doesNotMatch(cyberStyles, /#right-context-rail\s*>\s*#radio-panel/);
|
||||
});
|
||||
|
||||
test('Cyber cockpit launchers share Data Layers frame and expand-control treatment', () => {
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/:is\(\.panel-collapse-btn, body\.cockpit-mode \.cockpit-utility-glyph\)/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/body\.cockpit-mode \.cockpit-utility-launcher \{[^}]*width: var\(--cyber-panel-width\);[^}]*min-height: 60px;[^}]*clip-path: var\(--cyber-panel-frame\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.cockpit-utility-glyph::after \{\s*content: '\+';/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.cockpit-utility-glyph\[aria-expanded='true'\]::after \{\s*content: '−';/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.cockpit-utility-control\.is-expanded\s+\.cockpit-utility-launcher \{[^}]*width: 100%;[^}]*clip-path: none;/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber side panels share one width and one framed surface material', () => {
|
||||
assert.match(cyberStyles, /--cyber-panel-width: 272px;/);
|
||||
assert.match(cyberStyles, /--cyber-right-panel-width: 312px;/);
|
||||
assert.match(cyberStyles, /--cyber-panel-collapsed-width: 200px;/);
|
||||
assert.match(cyberStyles, /--cyber-panel-control-size: 30px;/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/--cyber-panel-surface: rgba\(18, 24, 27, 0\.92\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.cockpit-utility-control\.is-expanded \{[\s\S]*?width: var\(--cyber-right-panel-width\);[\s\S]*?background-color: var\(--cyber-panel-surface\);[\s\S]*?background-image: var\(--cyber-panel-surface-detail\);[\s\S]*?clip-path: var\(--cyber-panel-frame\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.cockpit-utility-control\.is-expanded::after \{[\s\S]*?width: 36px;[\s\S]*?border-top: 1px solid rgba\(225, 102, 102, 0\.84\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#global-context-panel #radio-panel\.collapsed \{\s*width: 100%;/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#left-panel-stack\s*> :is\(#data-panel, #utilities-panel, #scene-panel\)\.collapsed \{\s*width: var\(--cyber-panel-collapsed-width\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/:is\(#data-panel, #utilities-panel, #scene-panel\)\.collapsed\s+:is\(\.data-panel-inner, \.utilities-panel-inner, \.scene-panel-inner\) \{[\s\S]*?height: 50px;[\s\S]*?min-height: 50px;/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.cockpit-utility-control:not\(\.is-expanded\)\s+\.cockpit-utility-launcher \{\s*width: var\(--cyber-panel-collapsed-width\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#pp-toggles\s*> \.pp-header-row\s+\.pp-collapse-btn \{[\s\S]*?width: var\(--cyber-panel-control-size\);[\s\S]*?height: var\(--cyber-panel-control-size\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#right-context-rail\s+:is\(\s*\.cctv-panel-inner,\s*\.weather-panel-inner,\s*\.recent-imagery-panel-inner,\s*\.street-level-panel-inner,\s*\.global-context-panel-inner\s*\) \{\s*padding-inline-end: 8px;/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#right-context-rail[\s\S]*?:is\(\s*#cctv-panel,\s*#weather-panel,\s*#recent-imagery-panel,\s*#street-level-panel,\s*#global-context-panel\s*\)\.collapsed[\s\S]*?> \.panel-header \{[\s\S]*?height: 48px;[\s\S]*?padding: 0 10px 0 14px;/,
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
cyberStyles,
|
||||
/\.cockpit-utility-control\.is-expanded\s*\{[^}]*order:/,
|
||||
'expanded Cockpit utilities must retain Display-then-Radio DOM order',
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber is a canonical HUD layout with a safe Tactical fallback', () => {
|
||||
assert.deepEqual(HUD_LAYOUTS, ['tactical', 'minimal', 'cyber']);
|
||||
assert.equal(normalizeHudLayout('CYBER'), 'cyber');
|
||||
assert.equal(normalizeHudLayout('operator'), 'tactical');
|
||||
assert.equal(normalizeHudLayout('unknown'), 'tactical');
|
||||
});
|
||||
|
||||
test('the Cyber HUD owns the global shell skin and leaving it restores defaults', () => {
|
||||
const root = { dataset: { unrelated: 'preserved' } };
|
||||
assert.equal(applyHudUiTheme(root, 'cyber'), 'cyber');
|
||||
assert.equal(root.dataset.uiTheme, 'cyber');
|
||||
assert.equal(applyHudUiTheme(root, 'minimal'), null);
|
||||
assert.equal(root.dataset.uiTheme, undefined);
|
||||
assert.equal(root.dataset.unrelated, 'preserved');
|
||||
});
|
||||
|
||||
test('an explicit transition into Cyber selects FLIR with Ironbow 0.42 once', () => {
|
||||
assert.deepEqual(CYBER_VISUAL_DEFAULTS, {
|
||||
style: 'thermal',
|
||||
ironbow: 0.42,
|
||||
});
|
||||
assert.equal(
|
||||
cyberVisualDefaultsForHudTransition('tactical', 'cyber', {
|
||||
explicit: true,
|
||||
}),
|
||||
CYBER_VISUAL_DEFAULTS,
|
||||
);
|
||||
assert.equal(
|
||||
cyberVisualDefaultsForHudTransition('cyber', 'cyber', {
|
||||
explicit: true,
|
||||
}),
|
||||
null,
|
||||
);
|
||||
assert.equal(cyberVisualDefaultsForHudTransition('tactical', 'cyber'), null);
|
||||
assert.equal(
|
||||
cyberVisualDefaultsForHudTransition('cyber', 'minimal', {
|
||||
explicit: true,
|
||||
}),
|
||||
null,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber visual defaults update the style, thermal palette and render state', () => {
|
||||
const calls = [];
|
||||
const owner = {
|
||||
stages: { thermal: { uniforms: { palette: 0 } } },
|
||||
services: {
|
||||
governorRequestRender: (reason) => calls.push(['render', reason]),
|
||||
},
|
||||
setStyle: (style, options) => calls.push(['style', style, options]),
|
||||
_updateSliderPanel: (style, options) =>
|
||||
calls.push(['sliders', style, options]),
|
||||
};
|
||||
|
||||
VisualSettings.prototype._applyCyberVisualDefaults.call(
|
||||
owner,
|
||||
CYBER_VISUAL_DEFAULTS,
|
||||
);
|
||||
|
||||
assert.equal(owner.stages.thermal.uniforms.palette, 0.42);
|
||||
assert.deepEqual(calls, [
|
||||
[
|
||||
'style',
|
||||
'thermal',
|
||||
{
|
||||
applyPreset: false,
|
||||
revealParameters: false,
|
||||
preserveCyberRestore: true,
|
||||
},
|
||||
],
|
||||
['sliders', 'thermal', { reveal: false }],
|
||||
['render', 'cyber-visual-defaults'],
|
||||
]);
|
||||
});
|
||||
|
||||
test('the Display selector, voice schema and final stylesheet expose Cyber', () => {
|
||||
const display = read('./views/panels/DisplayPanel.vue');
|
||||
const stylesheet = read('../../style.css');
|
||||
const rightRail = read('./rightPanelRail.js');
|
||||
const hud = read('../hud.js');
|
||||
const hudView = read('./views/IntelHudView.vue');
|
||||
const detection = read('../data/detection.js');
|
||||
const aircraftModels = read('../data/aircraftModelLayer.js');
|
||||
const setHud = GEV_ACTION_SCHEMAS.find((schema) => schema.name === 'set_hud');
|
||||
|
||||
assert.match(display, /<option value="cyber">\{\{ t\('Cyber'\) \}\}<\/option>/);
|
||||
assert.match(display, /id="cyber-sonar-toggle"/);
|
||||
assert.match(
|
||||
display,
|
||||
/id="cyber-sonar-opacity"[^>]*:model-value="sonar\?\.opacity \?\? 84" :aria-label="t\('Cyber contact and label opacity'\)"/,
|
||||
);
|
||||
assert.match(display, /id="cyber-sonar-sector"/);
|
||||
assert.deepEqual(setHud.parameters.properties.layout.enum, HUD_LAYOUTS);
|
||||
assert.match(stylesheet, /@import '\.\/src\/ui\/styles\/cyber\.css';\s*$/);
|
||||
assert.match(cyberStyles, /:root\[data-ui-theme='cyber'\]/);
|
||||
assert.match(cyberStyles, /\.material-symbols-outlined/);
|
||||
assert.match(cyberStyles, /\.pp-label/);
|
||||
assert.match(cyberStyles, /#intel-hud\[data-variant='cyber'\]/);
|
||||
assert.match(cyberStyles, /#left-panel-stack/);
|
||||
assert.match(cyberStyles, /#right-context-rail/);
|
||||
assert.match(cyberStyles, /#command-dock/);
|
||||
assert.match(cyberStyles, /--cyber-panel-frame: polygon/);
|
||||
assert.match(cyberStyles, /\.data-panel-inner,/);
|
||||
assert.match(cyberStyles, /#pp-toggles\.collapsed > \.pp-header-row/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.panel-collapsible:not\(#location-bar\):not\(#control-panel\)::after/,
|
||||
);
|
||||
assert.match(cyberStyles, /clip-path: var\(--cyber-panel-frame\);/);
|
||||
assert.match(hudView, /class="hud-sonar" aria-hidden="true"/);
|
||||
assert.match(cyberStyles, /\.hud-sonar::before/);
|
||||
assert.match(cyberStyles, /\.hud-sonar::after/);
|
||||
assert.match(cyberStyles, /@keyframes cyber-sonar-sweep/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/animation-delay:\s*var\(--cyber-sonar-phase-delay, 0ms\)/,
|
||||
);
|
||||
assert.doesNotMatch(cyberStyles, /--cyber-sonar-angle/);
|
||||
assert.match(cyberStyles, /prefers-reduced-motion: reduce/);
|
||||
assert.match(detection, /candidate\.sonarFactor \?\? 1/);
|
||||
assert.match(detection, /sonarActive && !obj\.skipLabel/);
|
||||
assert.match(detection, /const bracketAlpha = admissionAlpha \* sonarFactor/);
|
||||
assert.match(detection, /sonarSampler\.label\(sonarFactor\)/);
|
||||
assert.match(detection, /createCyberSonarSampler\(width, height, now\)/);
|
||||
assert.match(cyberStyles, /data-cyber-sonar='off'/);
|
||||
assert.match(detection, /governorRequestRender\('cyber-sonar-cadence'\)/);
|
||||
assert.match(
|
||||
detection,
|
||||
/const animatingCount = countAnimatingRenderEntries\(renderEntries\);/,
|
||||
);
|
||||
assert.doesNotMatch(detection, /sonarActive \? 1 : 0/);
|
||||
assert.match(
|
||||
aircraftModels,
|
||||
/alpha: state\._irBoost\s*\?\s*1\s*:\s*aircraftTreatmentAlpha\(/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#title-bar \.title-logo #globe \{[\s\S]*?fill: var\(--cyber-red\);[\s\S]*?stroke: var\(--cyber-red-bright\);/,
|
||||
);
|
||||
assert.match(cyberStyles, /#title-bar \.title-logo #globe_cage/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#top-center-actions button\s*\{[\s\S]*?border-radius:\s*0;[\s\S]*?clip-path:\s*polygon\(\s*29% 0,\s*71% 0,[\s\S]*?0 29%\s*\);/,
|
||||
);
|
||||
assert.match(cyberStyles, /#top-center-actions button::before/);
|
||||
assert.match(cyberStyles, /\.hud-top-left/);
|
||||
assert.match(cyberStyles, /transparent 0 min\(40vw, 52vh\)/);
|
||||
assert.match(cyberStyles, /\.hud-bottom-bar \{\s*display: none;/);
|
||||
assert.doesNotMatch(cyberStyles, /\.hud-top-bar/);
|
||||
// Cyber shares the measured rail/credit keep-out rather than overriding it.
|
||||
assert.doesNotMatch(
|
||||
cyberStyles,
|
||||
/#right-context-rail\s*\{[^}]*\b(?:top|bottom|height|max-height):/,
|
||||
);
|
||||
assert.match(cyberStyles, /--cyber-hud-card-top: max\(100px, 10\.25vh\);/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/--cyber-left-rail-top: max\([\s\S]*?220px,[\s\S]*?calc\(var\(--cyber-hud-card-top\) \+ 120px\)/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.hud-top-left \{[\s\S]*?top: var\(--cyber-hud-card-top\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#left-panel-stack \{[\s\S]*?top: var\(--cyber-left-rail-top\) !important;[\s\S]*?bottom: calc\(2vh \+ 13rem \+ var\(--world-timeline-lift, 0px\)\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.hud-left-edge \{\s*top: calc\(var\(--cyber-left-rail-top\) - 18px\);\s*left: 14px;/,
|
||||
);
|
||||
assert.match(
|
||||
rightRail,
|
||||
/const leftStackTop = settledLeftRailTop\([\s\S]*?const alignedTop = Number\.isFinite\(leftStackTop\)[\s\S]*?baseTop: alignedTop,/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/--right-display-collapsed-width: var\(--cyber-panel-collapsed-width\);/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/clip-path: polygon\([\s\S]*?12px 0,[\s\S]*?0 12px/,
|
||||
);
|
||||
assert.match(cyberStyles, /\.hud-corner::before/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/--cyber-telemetry-fill: rgba\(13, 20, 23, 0\.985\);/,
|
||||
);
|
||||
assert.match(cyberStyles, /var\(--cyber-telemetry-fill\)/);
|
||||
assert.match(cyberStyles, />\s*\.panel-header\s+\.panel-title::before/);
|
||||
assert.match(cyberStyles, /\.panel-collapsible\.collapsed::after/);
|
||||
assert.match(cyberStyles, /\.panel-collapsible:not\(\.collapsed\)::after/);
|
||||
assert.match(cyberStyles, /\.context-mode-standby:not\(\[hidden\]\)/);
|
||||
// The base standby is borderless plain text, so the focus card must name its
|
||||
// own frame width and centring rather than inherit them.
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/\.context-mode-standby:not\(\[hidden\]\) \{[^}]*place-content: center;[^}]*border: 1px solid[^}]*text-align: center;/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/:root\[data-ui-theme='cyber'\] \.global-context-modes \{[^}]*border: 0;/,
|
||||
);
|
||||
assert.match(cyberStyles, /mask-image: linear-gradient\(/);
|
||||
assert.match(cyberStyles, /flex: 1 1 auto;/);
|
||||
assert.match(cyberStyles, /#left-panel-stack:has/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/inset-inline-start: calc\(54px \+ var\(--panel-rail-clearance\)\);/,
|
||||
);
|
||||
assert.match(cyberStyles, /right: calc\(51px \+ var\(--panel-rail-clearance\)\);/);
|
||||
// Each side's edge line shows only beside an open panel.
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#left-panel-stack:has\(> \[data-panel-id\]:not\(\.collapsed, \[hidden\]\)\) \{\s*border-inline-start-color:/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#right-context-rail:has\(> \[data-panel-id\]:not\(\.collapsed, \[hidden\]\)\) \{\s*border-inline-end-color:/,
|
||||
);
|
||||
assert.match(cyberStyles, /bottom: calc\(2vh \+ 13rem \+ var\(--world-timeline-lift, 0px\)\);/);
|
||||
assert.doesNotMatch(cyberStyles, /NAV 01 \/\/ COMMAND BUS \/\/ VIS 03/);
|
||||
assert.match(cyberStyles, /data-layer-id='satellites'/);
|
||||
assert.match(cyberStyles, /#search-toggle::before/);
|
||||
assert.match(cyberStyles, /VISUAL MATRIX \/\/ 03/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode #cockpit-hud/);
|
||||
assert.match(cyberStyles, /TARGET SCANNING \/\/ LIVE VECTOR/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/body\.cockpit-mode #global-loading-status \{[\s\S]*?top: 60px;[\s\S]*?z-index: 146;/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/body\.cockpit-mode #global-loading-detail \{[\s\S]*?color: var\(--cockpit-accent\);/,
|
||||
);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-visor-shell::before/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-scan-array/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-target-side-arcs/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-target-ticks/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-target-core/);
|
||||
assert.match(cyberStyles, /width: min\(48vw, 60vh\);/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-context-window/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-signal-window/);
|
||||
assert.match(cyberStyles, /body\.cockpit-mode #intel-hud\.active/);
|
||||
});
|
||||
|
||||
test('Cyber voice telemetry renders a live scan scope without replacing audio ownership', () => {
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#gev-voice-control\s*\{[\s\S]*?--cyber-voice-wave:/,
|
||||
);
|
||||
assert.match(cyberStyles, /\.gev-voice-visualizer::before/);
|
||||
assert.match(cyberStyles, /\.gev-voice-visualizer::after/);
|
||||
assert.match(cyberStyles, /@keyframes gev-cyber-voice-scan/);
|
||||
assert.match(cyberStyles, /@keyframes gev-cyber-voice-lock/);
|
||||
assert.match(cyberStyles, /\[data-speaker='user'\]/);
|
||||
assert.match(cyberStyles, /\[data-speaker='ai'\]/);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/prefers-reduced-motion: reduce[\s\S]*?gev-voice-visualizer::after[\s\S]*?animation: none/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber Cockpit Display uses the released briefing lane instead of the legacy viewport cap', () => {
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/body\.cockpit-mode\s+#cockpit-display-panel\s*\{[\s\S]*?max-height:\s*calc\(var\(--cockpit-utility-expanded-max-height, 72vh\) - 62px\)/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#cockpit-hud:has\(\.cockpit-utility-control\.is-expanded\)[\s\S]*?\.cockpit-signal-window\[data-collapsed='true'\][\s\S]*?bottom: 80px;[\s\S]*?visibility:\s*visible/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber Cockpit keeps Data Layers inside its bounded rail', () => {
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/body:not\(\.cockpit-mode\)\s+#left-panel-stack:has\([\s\S]*?max-height:\s*none;/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/body\.cockpit-mode\s+#left-panel-stack\s+> :is\(#data-panel, #utilities-panel\) \{[\s\S]*?max-height: min\(64vh, 610px\);/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber desktop cockpit collapsed utility frames match the 50px Data Layers frame', () => {
|
||||
const desktop = cyberStyles.slice(
|
||||
cyberStyles.indexOf('@media (min-width: 961px) and (min-height: 650px)'),
|
||||
cyberStyles.indexOf('@media (max-width: 720px)'),
|
||||
);
|
||||
assert.match(
|
||||
desktop,
|
||||
/:root\[data-ui-theme='cyber'\]\s+body\.cockpit-mode\s+\.cockpit-utility-control:not\(\.is-expanded\)\s+\.cockpit-utility-launcher\s*\{\s*height: 50px;\s*min-height: 50px;\s*padding: 9px 18px 9px 24px;/,
|
||||
);
|
||||
assert.match(
|
||||
desktop,
|
||||
/\.cockpit-utility-control:not\(\.is-expanded\)\s+\.cockpit-utility-launcher::after\s*\{\s*bottom: 6px;/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber right panels preserve intrinsic sizing and the shared rail allocation', () => {
|
||||
assert.doesNotMatch(
|
||||
cyberStyles.slice(cyberStyles.indexOf(":root[data-ui-theme='cyber'] {")),
|
||||
/#right-context-rail\s*>[^{}]+\{[^{}]*\b(?:flex|height|max-height):/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Cyber panels retain clean edges without the added footer band', () => {
|
||||
assert.doesNotMatch(cyberStyles, /--cyber-panel-foot-/);
|
||||
assert.doesNotMatch(cyberStyles, /border-bottom: 24px solid transparent/);
|
||||
});
|
||||
|
||||
test('Cyber keeps Sonar on/off without the removed CSS effect switch or dimmer', () => {
|
||||
const template = readFileSync(
|
||||
new URL('./views/panels/DisplayPanel.vue', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
assert.match(template, /id="cyber-sonar-toggle"/);
|
||||
assert.doesNotMatch(template, /data-sonar-mode|cyber-sonar-mode-row/);
|
||||
assert.doesNotMatch(cyberStyles, /cyber-scene-dimmer|data-cyber-sonar-mode/);
|
||||
});
|
||||
|
||||
test('Cyber Display uses a red title without a panel-specific center tab', () => {
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#pp-toggles \.pp-header-label\s*\{\s*color: var\(--cyber-red-bright\);/,
|
||||
);
|
||||
assert.doesNotMatch(cyberStyles, /#pp-toggles[^,{]*::after\s*\{/);
|
||||
assert.match(cyberStyles, /isolation: isolate;\s*clip-path: none;/);
|
||||
assert.match(cyberStyles, /#pp-toggles:not\(\.collapsed\)::before/);
|
||||
});
|
||||
|
||||
test('Cyber omits only the fictional classification and system header lines', () => {
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
/#intel-hud\[data-variant='cyber'\] \.hud-top-left \.hud-classification,\s*#intel-hud\[data-variant='cyber'\] \.hud-top-left \.hud-system\s*\{\s*display: none;\s*\}/,
|
||||
);
|
||||
});
|
||||
@@ -54,7 +54,7 @@ export class DisplayBindings {
|
||||
documentRef: document,
|
||||
searchInput: this._locationSearch,
|
||||
actions: {
|
||||
setStyle: (style) => this.setStyle(style, { userInitiated: true }),
|
||||
setStyle: (style) => this.setStyle(style),
|
||||
dismissSearch: () => this._closeLocationSearch?.({ ifOpen: true }),
|
||||
toggleHud: () => {
|
||||
this.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
@@ -82,7 +82,7 @@ export class DisplayBindings {
|
||||
this._detachDisplayControls?.();
|
||||
const store = this.displayStore ?? useDisplayStore(applicationPinia());
|
||||
const token = store.connect({
|
||||
setStyle: (style) => this.setStyle(style, { userInitiated: true }),
|
||||
setStyle: (style) => this.setStyle(style),
|
||||
toggleBloom: () => {
|
||||
this.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
this._setBloomEnabled(!this.bloomEnabled);
|
||||
@@ -116,7 +116,7 @@ export class DisplayBindings {
|
||||
},
|
||||
setHudLayout: (value) => {
|
||||
this.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
this._setHudVariant(value, { applyVisualDefaults: true });
|
||||
this._setHudVariant(value);
|
||||
},
|
||||
toggleCleanView: () => this.toggleCleanView(),
|
||||
exitCleanView: () => this.toggleCleanView(false),
|
||||
@@ -155,7 +155,10 @@ export class DisplayBindings {
|
||||
this._updateHudButtonState();
|
||||
this._syncShareState();
|
||||
},
|
||||
toggleSonar: () => this._setCyberSonarEnabled(),
|
||||
toggleSonar: () => {
|
||||
this.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
this._setCyberSonarEnabled();
|
||||
},
|
||||
setSonarRings: (value) => this._setCyberSonarSetting('rings', value),
|
||||
setSonarRange: (value) => this._setCyberSonarSetting('range', value),
|
||||
setSonarIntensity: (value) =>
|
||||
@@ -178,9 +181,8 @@ export class DisplayBindings {
|
||||
// feather and opacity, 3D aircraft on in Proximity.
|
||||
resetVisual: () => {
|
||||
this.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
this.setStyle('normal', { userInitiated: true });
|
||||
// The HUD layout follows the Normal style, as choosing it does: the
|
||||
// Cyber HUD stays Cyber.
|
||||
this.setStyle('normal');
|
||||
// The HUD layout and the Sonar style stay as the viewer set them.
|
||||
this._applyGlobalPostDefaults({ keepHudVariant: true });
|
||||
this._setDetectionAllocation('ELASTIC');
|
||||
this._setScope({ enabled: true, featherPct: 100, opacityPct: 100 });
|
||||
|
||||
@@ -238,20 +238,29 @@ test('the HUD and Sonar controls render what VisualSettings shows', async (t) =>
|
||||
getVariant: () => variant,
|
||||
});
|
||||
owner._scheduleAdaptivePanelLayout = () => {};
|
||||
assert.equal($('cyber-sonar-toggle').textContent, 'ON');
|
||||
assert.equal($('cyber-sonar-toggle').getAttribute('aria-pressed'), 'true');
|
||||
// Sonar is opt-in: OFF until the viewer turns it on.
|
||||
assert.equal($('cyber-sonar-toggle').textContent, 'OFF');
|
||||
assert.equal($('cyber-sonar-toggle').getAttribute('aria-pressed'), 'false');
|
||||
assert.equal(
|
||||
[...$('hud-layout-select').options].map((option) => option.value).join(),
|
||||
'tactical,minimal',
|
||||
);
|
||||
|
||||
owner._syncHudControls();
|
||||
await nextTick();
|
||||
assert.equal($('hud-toggle').classList.contains('active'), true);
|
||||
assert.equal($('hud-layout-row').classList.contains('visible'), true);
|
||||
assert.equal($('hud-layout-select').value, 'minimal');
|
||||
// The toggle shows with the HUD; its sliders wait for Sonar ON.
|
||||
assert.equal($('cyber-sonar-row').classList.contains('visible'), true);
|
||||
assert.equal($('cyber-sonar-rings-row').classList.contains('visible'), false);
|
||||
|
||||
visible = false;
|
||||
owner._updateHudButtonState();
|
||||
await nextTick();
|
||||
assert.equal($('hud-toggle').classList.contains('active'), false);
|
||||
assert.equal($('hud-layout-row').classList.contains('visible'), false);
|
||||
assert.equal($('cyber-sonar-row').classList.contains('visible'), false);
|
||||
|
||||
owner._sonarShown = {
|
||||
enabled: false,
|
||||
@@ -272,6 +281,19 @@ test('the HUD and Sonar controls render what VisualSettings shows', async (t) =>
|
||||
assert.equal($('cyber-sonar-range-value').textContent, '90%');
|
||||
assert.equal($('cyber-sonar-sector').value, '30');
|
||||
assert.equal($('cyber-sonar-sector-value').textContent, '30°');
|
||||
|
||||
visible = true;
|
||||
owner._updateHudButtonState();
|
||||
owner._sonarShown = { ...owner._sonarShown, enabled: true };
|
||||
owner._publishDisplay();
|
||||
await nextTick();
|
||||
assert.equal(toggle.textContent, 'ON');
|
||||
for (const name of ['rings', 'range', 'intensity', 'opacity', 'sector'])
|
||||
assert.equal(
|
||||
$(`cyber-sonar-${name}-row`).classList.contains('visible'),
|
||||
true,
|
||||
name,
|
||||
);
|
||||
});
|
||||
|
||||
test('Scope and Celestial render what VisualSettings shows', async (t) => {
|
||||
|
||||
@@ -321,7 +321,7 @@ test('DisplayBindings sets the scope opacity and resets Visual to its defaults',
|
||||
document.querySelector('#pp-toggles .pp-reset-btn').click();
|
||||
assert.deepEqual(calls, [
|
||||
['claim', 'visual'],
|
||||
['style', 'normal', { userInitiated: true }],
|
||||
['style', 'normal', undefined],
|
||||
['postDefaults', { keepHudVariant: true }],
|
||||
['allocation', 'ELASTIC'],
|
||||
['scope', { enabled: true, featherPct: 100, opacityPct: 100 }],
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/** Cyber keeps the frame fixed; other layouts retain their existing scroller. */
|
||||
export function displayPanelScroller(panel) {
|
||||
return panel?.ownerDocument?.documentElement?.dataset.uiTheme === 'cyber'
|
||||
? panel.querySelector('.pp-panel-body') || panel
|
||||
: panel;
|
||||
}
|
||||
@@ -0,0 +1,666 @@
|
||||
import {
|
||||
getScopeMaskFeather,
|
||||
getScopeMaskOpacity,
|
||||
isScopeMaskEnabled,
|
||||
setScopeMaskEnabled,
|
||||
setScopeMaskFeather,
|
||||
setScopeMaskOpacity,
|
||||
} from '../scopeMask.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readdirSync, readFileSync } from 'node:fs';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
HUD_LAYOUTS,
|
||||
isLegacySonarHudLayout,
|
||||
LEGACY_SONAR_HUD_LAYOUTS,
|
||||
normalizeHudLayout,
|
||||
} from '../hudLayouts.js';
|
||||
import {
|
||||
isCyberMapThemeActive,
|
||||
isCyberSonarActive,
|
||||
isCyberSonarEnabled,
|
||||
setCyberSonarEnabled,
|
||||
} from '../cyberSonar.js';
|
||||
import { GEV_ACTION_SCHEMAS } from '../voice/actionSchemas.js';
|
||||
import { createGevActionRunner } from '../voice/gevActions.js';
|
||||
import { StyleManager } from './applicationShell.js';
|
||||
import { setCyberSonarControls } from './cyberSonarControls.js';
|
||||
import { createPinia } from 'pinia';
|
||||
import { useDisplayStore } from './stores/display.js';
|
||||
import { VisualSettings } from './visualSettings.js';
|
||||
import { STYLES } from './visualPresets.js';
|
||||
|
||||
const read = (relative) =>
|
||||
readFileSync(new URL(relative, import.meta.url), 'utf8');
|
||||
|
||||
function cssRuleBody(styles, selector) {
|
||||
const match = styles.match(new RegExp(`${selector.source}\\s*\\{([^}]+)\\}`));
|
||||
assert.ok(match, `Missing CSS rule: ${selector.source}`);
|
||||
return match[1];
|
||||
}
|
||||
|
||||
function styleOwner(t, initialVariant = 'tactical') {
|
||||
const previous = { document: globalThis.document, window: globalThis.window };
|
||||
const root = { dataset: {} };
|
||||
globalThis.document = { documentElement: root, querySelectorAll: () => [] };
|
||||
globalThis.window = { dispatchEvent() {} };
|
||||
t.after(() => Object.assign(globalThis, previous));
|
||||
let variant = initialVariant;
|
||||
const calls = [];
|
||||
const hud = {
|
||||
getVariant: () => variant,
|
||||
// Normalize like the real HUD so removed layouts fall back.
|
||||
setVariant: (value) => (variant = normalizeHudLayout(value)),
|
||||
setMode: (value) => calls.push(['mode', value]),
|
||||
onStyleChange: (value) => calls.push(['style', value]),
|
||||
visible: true,
|
||||
};
|
||||
hud.setVariant(initialVariant);
|
||||
const owner = Object.create(VisualSettings.prototype);
|
||||
Object.assign(owner, {
|
||||
activeStyle: 'normal',
|
||||
store: { publish() {} },
|
||||
readHud: () => hud,
|
||||
readShareLinks: () => ({ onStyleChange() {} }),
|
||||
_visualEffects: {
|
||||
stages: Object.fromEntries(
|
||||
Object.entries(STYLES).map(([name, config]) => [
|
||||
name,
|
||||
{ uniforms: { ...config.uniforms, intensity: 0 } },
|
||||
]),
|
||||
),
|
||||
},
|
||||
services: {
|
||||
governorRequestRender: (reason) => calls.push(['render', reason]),
|
||||
setDetectionStyle() {},
|
||||
},
|
||||
_setBloomEnabled: (value) => calls.push(['bloom', value]),
|
||||
_setSharpenEnabled: (value) => calls.push(['sharpen', value]),
|
||||
_applyDetectionPreset: (value) => calls.push(['detection', value]),
|
||||
_syncShareState: () => calls.push(['share', variant]),
|
||||
});
|
||||
for (const name of [
|
||||
'setCelestialRingEnabled',
|
||||
'_startTransition',
|
||||
'_publishActiveStyle',
|
||||
'_updateSliderPanel',
|
||||
'_updateHudButtonState',
|
||||
'_syncIrBoost',
|
||||
'_syncCockpitInheritedStyle',
|
||||
'_syncCyberSonarControl',
|
||||
'_scheduleAdaptivePanelLayout',
|
||||
'_setDetectionFade',
|
||||
// Intensities: the fixture has no post-process stages to drive.
|
||||
'_setBloomIntensity',
|
||||
'_setSharpenIntensity',
|
||||
])
|
||||
owner[name] = () => {};
|
||||
return { owner, hud, root, calls };
|
||||
}
|
||||
|
||||
test('Tactical and Minimal are the HUD layouts; Cyber is only a Sonar alias', () => {
|
||||
assert.deepEqual(HUD_LAYOUTS, ['tactical', 'minimal']);
|
||||
assert.deepEqual(LEGACY_SONAR_HUD_LAYOUTS, ['cyber']);
|
||||
assert.equal(normalizeHudLayout('cyber'), 'tactical');
|
||||
assert.equal(normalizeHudLayout('CYBER'), 'tactical');
|
||||
assert.equal(normalizeHudLayout('operator'), 'tactical');
|
||||
assert.equal(normalizeHudLayout('Minimal'), 'minimal');
|
||||
assert.equal(isLegacySonarHudLayout('Cyber'), true);
|
||||
assert.equal(isLegacySonarHudLayout('operator'), false);
|
||||
assert.equal(isLegacySonarHudLayout('tactical'), false);
|
||||
});
|
||||
|
||||
test('a share link, scene or saved view naming Cyber opens Tactical with Sonar on', async (t) => {
|
||||
const { owner, hud, root, calls } = styleOwner(t, 'minimal');
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
await owner.restoreShareState({ hudVariant: 'cyber' });
|
||||
assert.equal(hud.getVariant(), 'tactical');
|
||||
assert.equal(root.dataset.cyberSonar, 'on');
|
||||
assert.equal(root.dataset.uiTheme, undefined);
|
||||
// Turning it on asks for a frame, so a parked map starts the sweep.
|
||||
assert.ok(
|
||||
calls.some(
|
||||
([name, reason]) => name === 'render' && reason === 'cyber-sonar-toggle',
|
||||
),
|
||||
);
|
||||
// The viewer's own layout choice afterwards leaves the Sonar style alone.
|
||||
owner._setHudVariant('minimal');
|
||||
assert.equal(hud.getVariant(), 'minimal');
|
||||
assert.equal(isCyberSonarEnabled(root), true);
|
||||
// A restored state is authoritative: one that does not name Cyber turns
|
||||
// Sonar off, whether from a link or a scene shot.
|
||||
await owner.restoreShareState({ hudVariant: 'tactical' });
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
setCyberSonarEnabled(true, root);
|
||||
await owner.applyVisualState({ hud: { variant: 'minimal' } });
|
||||
assert.equal(hud.getVariant(), 'minimal');
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
await owner.applyVisualState({ hud: { variant: 'cyber' } });
|
||||
assert.equal(hud.getVariant(), 'tactical');
|
||||
assert.equal(isCyberSonarEnabled(root), true);
|
||||
});
|
||||
|
||||
test('links and scene shots record Tactical with Sonar as the Cyber code, and only that', (t) => {
|
||||
const { owner, root } = styleOwner(t, 'tactical');
|
||||
Object.assign(owner.services, {
|
||||
getDetectionTuning: () => ({ allocationStrategy: 'ELASTIC' }),
|
||||
getDetectionMode: () => 'OFF',
|
||||
isScopeMaskEnabled: () => true,
|
||||
getScopeMaskFeather: () => 1,
|
||||
getScopeMaskOpacity: () => 1,
|
||||
getScopeTerminusOverride: () => null,
|
||||
});
|
||||
owner.readCelestialRing = () => null;
|
||||
const shared = () => owner._readShareState().options.hudVariant;
|
||||
assert.equal(shared(), 'tactical');
|
||||
owner._setCyberSonarEnabled(true);
|
||||
assert.equal(shared(), 'cyber');
|
||||
// Minimal has no code that carries Sonar; it stays local.
|
||||
owner._setHudVariant('minimal');
|
||||
assert.equal(shared(), 'minimal');
|
||||
owner._setHudVariant('tactical');
|
||||
assert.equal(shared(), 'cyber');
|
||||
owner._setCyberSonarEnabled(false);
|
||||
assert.equal(shared(), 'tactical');
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
});
|
||||
|
||||
test('Sonar is opt-in and gated on its toggle, the HUD, Cockpit and motion, not a theme', () => {
|
||||
const classes = new Set();
|
||||
const root = { dataset: {} };
|
||||
const body = { classList: { contains: (name) => classes.has(name) } };
|
||||
const gate = (extra = {}) => ({
|
||||
root,
|
||||
body,
|
||||
hudActive: true,
|
||||
reducedMotion: false,
|
||||
...extra,
|
||||
});
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
assert.equal(isCyberSonarActive(gate()), false);
|
||||
assert.equal(isCyberMapThemeActive(gate()), false);
|
||||
// The removed Cyber theme attribute no longer enables anything.
|
||||
root.dataset.uiTheme = 'cyber';
|
||||
assert.equal(isCyberSonarActive(gate()), false);
|
||||
delete root.dataset.uiTheme;
|
||||
|
||||
assert.equal(setCyberSonarEnabled(true, root), true);
|
||||
assert.equal(root.dataset.cyberSonar, 'on');
|
||||
assert.equal(isCyberSonarActive(gate()), true);
|
||||
assert.equal(isCyberMapThemeActive(gate()), true);
|
||||
assert.equal(isCyberSonarActive(gate({ hudActive: false })), false);
|
||||
assert.equal(isCyberMapThemeActive(gate({ hudActive: false })), false);
|
||||
// Reduced motion keeps the static treatment and stops the sweep.
|
||||
assert.equal(isCyberSonarActive(gate({ reducedMotion: true })), false);
|
||||
assert.equal(isCyberMapThemeActive(gate({ reducedMotion: true })), true);
|
||||
classes.add('cockpit-mode');
|
||||
assert.equal(isCyberSonarActive(gate()), false);
|
||||
assert.equal(isCyberMapThemeActive(gate()), false);
|
||||
classes.delete('cockpit-mode');
|
||||
|
||||
assert.equal(setCyberSonarEnabled(false, root), false);
|
||||
assert.equal(root.dataset.cyberSonar, 'off');
|
||||
assert.equal(isCyberSonarActive(gate()), false);
|
||||
assert.equal(isCyberMapThemeActive(gate()), false);
|
||||
});
|
||||
|
||||
test('Sonar controls apply under Tactical and Minimal and still validate input', () => {
|
||||
for (const layout of ['tactical', 'minimal']) {
|
||||
const root = { dataset: {} };
|
||||
const doc = {
|
||||
documentElement: root,
|
||||
body: { classList: { contains: () => false } },
|
||||
getElementById: () => null,
|
||||
};
|
||||
const calls = [];
|
||||
const owner = {
|
||||
hud: { getVariant: () => layout, visible: true },
|
||||
_setCyberSonarSetting: (name, value) => calls.push([name, value]),
|
||||
_setCyberSonarEnabled: (value) => {
|
||||
calls.push(['enabled', value]);
|
||||
setCyberSonarEnabled(value, root);
|
||||
},
|
||||
};
|
||||
const applied = setCyberSonarControls(
|
||||
owner,
|
||||
{ enabled: true, rings: 6, sectorDeg: 30 },
|
||||
doc,
|
||||
);
|
||||
assert.equal(applied.ok, true, layout);
|
||||
assert.equal(applied.sonar.enabled, true);
|
||||
assert.equal('cyberSelected' in applied.sonar, false);
|
||||
assert.deepEqual(calls, [
|
||||
['rings', 6],
|
||||
['sector', 30],
|
||||
['enabled', true],
|
||||
]);
|
||||
assert.equal(
|
||||
setCyberSonarControls(owner, { enabled: 'yes' }, doc).error,
|
||||
'enabled must be a boolean.',
|
||||
);
|
||||
assert.equal(
|
||||
setCyberSonarControls(owner, { pulse: 3 }, doc).error,
|
||||
'Unknown sonar setting.',
|
||||
);
|
||||
assert.equal(
|
||||
setCyberSonarControls(owner, { rings: 13 }, doc).error,
|
||||
'rings must be an integer from 3 to 12.',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('Display and voice HUD routes offer Tactical and Minimal, and Cyber turns Sonar on', async (t) => {
|
||||
const makeOwner = () => {
|
||||
const { owner, hud, root } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
owner.setHudLayout = (...args) =>
|
||||
StyleManager.prototype.setHudLayout.call(owner, ...args);
|
||||
owner.getControlState = () => ({
|
||||
hud: { layout: hud.getVariant(), visible: true },
|
||||
});
|
||||
return { owner, hud, root };
|
||||
};
|
||||
|
||||
const display = makeOwner();
|
||||
const store = useDisplayStore(createPinia());
|
||||
const token = store.connect({
|
||||
setHudLayout: (value) => display.owner.setHudLayout(value),
|
||||
setStyle: (value) => display.owner.setStyle(value),
|
||||
});
|
||||
store.act('setHudLayout', 'minimal');
|
||||
assert.equal(display.hud.getVariant(), 'minimal');
|
||||
// Switching layouts never changes the visual preset.
|
||||
assert.equal(display.owner.activeStyle, 'noir');
|
||||
store.act('setStyle', 'anime');
|
||||
assert.equal(display.owner.activeStyle, 'anime');
|
||||
store.detach(token);
|
||||
|
||||
const setHud = GEV_ACTION_SCHEMAS.find((tool) => tool.name === 'set_hud');
|
||||
assert.deepEqual(setHud.parameters.properties.layout.enum, HUD_LAYOUTS);
|
||||
|
||||
const voice = makeOwner();
|
||||
const eventSource = { addEventListener() {}, removeEventListener() {} };
|
||||
const viewer = {
|
||||
camera: { moveEnd: { addEventListener() {} } },
|
||||
clock: { onTick: { addEventListener: () => () => {} } },
|
||||
canvas: eventSource,
|
||||
scene: { canvas: eventSource },
|
||||
};
|
||||
const runVoiceAction = createGevActionRunner({
|
||||
viewer,
|
||||
styleManager: voice.owner,
|
||||
dataManager: {},
|
||||
});
|
||||
const minimal = await runVoiceAction('set_hud', { layout: 'minimal' });
|
||||
assert.equal(minimal.ok, true);
|
||||
assert.equal(voice.hud.getVariant(), 'minimal');
|
||||
assert.equal(isCyberSonarEnabled(voice.root), false);
|
||||
const legacy = await runVoiceAction('set_hud', { layout: 'cyber' });
|
||||
assert.equal(legacy.ok, true);
|
||||
assert.equal(legacy.layout, 'tactical');
|
||||
assert.equal(voice.hud.getVariant(), 'tactical');
|
||||
assert.equal(isCyberSonarEnabled(voice.root), true);
|
||||
assert.equal(voice.owner.activeStyle, 'noir');
|
||||
const unknown = await runVoiceAction('set_hud', { layout: 'operator' });
|
||||
assert.equal(unknown.ok, false);
|
||||
});
|
||||
|
||||
test('style presets keep their own HUD layout and never touch Sonar', (t) => {
|
||||
const { owner, hud, root } = styleOwner(t);
|
||||
setCyberSonarEnabled(true, root);
|
||||
for (const variant of ['tactical', 'minimal']) {
|
||||
owner._setHudVariant(variant);
|
||||
assert.equal(hud.getVariant(), variant);
|
||||
owner.setStyle('normal');
|
||||
owner.setStyle('surveillance');
|
||||
assert.equal(hud.getVariant(), 'tactical');
|
||||
assert.equal(isCyberSonarEnabled(root), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('the Display panel offers Sonar as an opt-in toggle under the HUD layout', () => {
|
||||
const view = read('./views/panels/DisplayPanel.vue');
|
||||
assert.doesNotMatch(view, /value="cyber"/);
|
||||
assert.match(view, /<option value="tactical">/);
|
||||
assert.match(view, /<option value="minimal">/);
|
||||
assert.match(
|
||||
view,
|
||||
/const sonarOn = computed\(\(\) => sonar\.value\?\.enabled \?\? false\);/,
|
||||
);
|
||||
// The toggle shows with the HUD; its sliders only once Sonar is on.
|
||||
assert.match(
|
||||
view,
|
||||
/cyber-sonar-toggle-row" :class="\{ visible: hud\?\.visible \}" id="cyber-sonar-row"/,
|
||||
);
|
||||
assert.equal(
|
||||
view.match(
|
||||
/cyber-sonar-setting" :class="\{ visible: hud\?\.visible && sonarOn \}"/g,
|
||||
)?.length,
|
||||
5,
|
||||
);
|
||||
assert.match(view, /:aria-label="t\('Sonar contact scanner'\)"/);
|
||||
// Its renderer status speaks only for a Sonar the viewer turned on.
|
||||
assert.match(
|
||||
view,
|
||||
/<output id="cyber-sonar-status"[^>]*:hidden="!\(hud\?\.visible && sonarOn\)"/,
|
||||
);
|
||||
assert.doesNotMatch(view, /t\('Cyber/);
|
||||
});
|
||||
|
||||
test('stylesheets carry no Cyber theme and show the sweep only while Sonar is on', () => {
|
||||
const entry = readFileSync(
|
||||
new URL('../../style.css', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
assert.match(entry, /@import '\.\/src\/ui\/styles\/sonar\.css';/);
|
||||
assert.doesNotMatch(entry, /cyber\.css/);
|
||||
const dir = new URL('./styles/', import.meta.url);
|
||||
for (const name of readdirSync(dir).filter((file) => file.endsWith('.css')))
|
||||
assert.doesNotMatch(
|
||||
readFileSync(new URL(name, dir), 'utf8'),
|
||||
/data-ui-theme/,
|
||||
name,
|
||||
);
|
||||
|
||||
const sonar = read('./styles/sonar.css');
|
||||
assert.match(cssRuleBody(sonar, /\n\.hud-sonar/), /display: none;/);
|
||||
assert.match(
|
||||
cssRuleBody(
|
||||
sonar,
|
||||
/\n:root\[data-cyber-sonar='on'\] #intel-hud \.hud-sonar/,
|
||||
),
|
||||
/display: block;/,
|
||||
);
|
||||
// Cockpit and a hidden HUD keep no sweep, not even an invisible one.
|
||||
assert.match(
|
||||
cssRuleBody(
|
||||
sonar,
|
||||
/:root\[data-cyber-sonar='on'\] body\.cockpit-mode #intel-hud \.hud-sonar,\s*:root\[data-cyber-sonar='on'\] #intel-hud:not\(\.active\) \.hud-sonar/,
|
||||
),
|
||||
/display: none;/,
|
||||
);
|
||||
assert.match(
|
||||
sonar,
|
||||
/@media \(prefers-reduced-motion: reduce\)\s*\{\s*:root\[data-cyber-sonar='on'\] #intel-hud \.hud-sonar::after\s*\{\s*display: none;\s*animation: none;/,
|
||||
);
|
||||
// The Vue bindings own the Sonar rows' visibility now.
|
||||
const controls = read('./styles/controls.css');
|
||||
assert.doesNotMatch(controls, /\.cyber-sonar-control\s*\{\s*display: none/);
|
||||
assert.doesNotMatch(controls, /data-cyber-sonar='off'/);
|
||||
});
|
||||
|
||||
test('the desktop bottom row: credits on the Power Up baseline, the dock lifted, the corners level', () => {
|
||||
const rem = 16;
|
||||
const lift = 'var\\(--world-timeline-lift, 0px\\)';
|
||||
const value = (text, pattern) => {
|
||||
const match = text.match(pattern);
|
||||
assert.ok(match, pattern.source);
|
||||
return Number(match[1]);
|
||||
};
|
||||
const block = (text, header) => {
|
||||
const start = text.indexOf(header);
|
||||
assert.ok(start >= 0, header);
|
||||
let depth = 0;
|
||||
for (let i = text.indexOf('{', start); i < text.length; i += 1) {
|
||||
if (text[i] === '{') depth += 1;
|
||||
else if (text[i] === '}' && --depth === 0)
|
||||
return text.slice(start, i + 1);
|
||||
}
|
||||
assert.fail(`unclosed ${header}`);
|
||||
};
|
||||
// Measured constants: the Power Up / language row is 32px tall, 14px up
|
||||
// and about 20rem wide in English; the attribution logo line is 28px; the
|
||||
// single-row dock is 62px; the bottom-right readout is one 26px line
|
||||
// taller than the coordinates.
|
||||
const POWER_UP = { bottom: 14, height: 32 };
|
||||
const CREDIT_HEIGHT = 28;
|
||||
const DOCK_HEIGHT = 62;
|
||||
const timeline = read('./styles/world-timeline.css');
|
||||
const timelineLift = value(
|
||||
timeline,
|
||||
/body:has\(#world-timeline\) \{\s*--world-timeline-lift: (\d+)px;/,
|
||||
);
|
||||
|
||||
// From 1200px the dock and the World Timeline leave the bottom 74px; below
|
||||
// it they return to the bottom edge, where the dock spans the corners.
|
||||
const dock = read('./styles/command-dock.css');
|
||||
const dockFloor = value(
|
||||
dock,
|
||||
new RegExp(
|
||||
`\\n#command-dock \\{[^}]*bottom: calc\\((\\d+)px \\+ ${lift}\\)`,
|
||||
),
|
||||
);
|
||||
assert.match(
|
||||
block(dock, '@media (max-width: 1199px)'),
|
||||
new RegExp(`#command-dock \\{\\s*bottom: calc\\(2vh \\+ ${lift}\\);`),
|
||||
);
|
||||
assert.equal(
|
||||
value(timeline, /\n#world-timeline \{[^}]*bottom: (\d+)px;/),
|
||||
dockFloor,
|
||||
);
|
||||
assert.match(
|
||||
block(timeline, '@media (max-width: 1199px)'),
|
||||
/#world-timeline \{\s*bottom: 2vh;/,
|
||||
);
|
||||
assert.ok(dockFloor >= POWER_UP.bottom + POWER_UP.height + 8);
|
||||
|
||||
// Both credit renderers share Power Up's row, centred on it, below the
|
||||
// dock, and stop short of the corner row instead of running under it:
|
||||
// GEV's own line on its anchor, Cesium's on the absolutely placed box it
|
||||
// draws inside its empty anchor.
|
||||
const trays = read('./styles/command-dock-trays.css');
|
||||
const trayWide = block(trays, '@media (min-width: 1200px)');
|
||||
const caps = {
|
||||
'gev-credits': trays.match(
|
||||
/#gev-credits \{\s*right: auto;\s*bottom: ([\d.]+)rem;\s*left: 1\.5rem;\s*width: max-content !important;\s*max-width: calc\(100vw - 1\.5rem - ([\d.]+)rem\);\s*white-space: normal;/,
|
||||
),
|
||||
'cesium-credits': (() => {
|
||||
const anchor = trays.match(
|
||||
/#cesium-credits \{\s*right: auto;\s*bottom: ([\d.]+)rem;\s*left: 1\.5rem;/,
|
||||
);
|
||||
const box = trayWide.match(
|
||||
/\n #cesium-credits \.cesium-widget-credits \{\s*width: max-content;\s*max-width: calc\(100vw - 1\.5rem - ([\d.]+)rem\);\s*white-space: normal;/,
|
||||
);
|
||||
return anchor && box && [null, anchor[1], box[1]];
|
||||
})(),
|
||||
};
|
||||
for (const [id, match] of Object.entries(caps)) {
|
||||
assert.ok(match, id);
|
||||
const creditsBottom = Number(match[1]) * rem;
|
||||
assert.equal(
|
||||
creditsBottom + CREDIT_HEIGHT / 2,
|
||||
POWER_UP.bottom + POWER_UP.height / 2,
|
||||
);
|
||||
assert.ok(creditsBottom + CREDIT_HEIGHT + 8 <= dockFloor);
|
||||
assert.ok(Number(match[2]) >= 20 + 1.5, `${id} leaves the corner row room`);
|
||||
}
|
||||
// Below 1200px the row returns above the bottom-edge dock, on one line.
|
||||
const narrow = block(trays, '@media (max-width: 1199px)');
|
||||
for (const id of ['cesium-credits', 'gev-credits'])
|
||||
assert.match(narrow, new RegExp(`#${id}[,\\s]`));
|
||||
assert.match(
|
||||
narrow,
|
||||
new RegExp(
|
||||
`\\{\\s*bottom: calc\\(2vh \\+ 5rem \\+ ${lift}\\);\\s*width: auto !important;\\s*max-width: calc\\(100vw - 3rem\\);\\s*white-space: nowrap;`,
|
||||
),
|
||||
);
|
||||
// Right to left the corner row is at the bottom left, so the row moves right.
|
||||
assert.match(
|
||||
trayWide,
|
||||
/html\[dir='rtl'\]\s*body:not\(\.context-docked\):not\(\.ui-clean-view\):not\(\.recording-mode\)\s*:is\(#cesium-credits, #gev-credits\) \{\s*right: 1\.5rem;\s*left: auto;/,
|
||||
);
|
||||
assert.match(
|
||||
trayWide,
|
||||
/#cesium-credits\s*\.cesium-widget-credits \{\s*right: 0;\s*left: auto;/,
|
||||
);
|
||||
const locale = read('./styles/locale-picker.css');
|
||||
assert.match(locale, /#corner-actions \{[^}]*inset-inline-end: 0\.9rem;/);
|
||||
|
||||
// From 1200px the readout keeps 8px above Power Up and the coordinates
|
||||
// start level with it. The World Timeline sits between the corners, so they
|
||||
// do not move while it shows.
|
||||
const split = read('./styles/rail-split.css');
|
||||
const wide = block(split, '@media (min-width: 1200px)');
|
||||
const readoutWide =
|
||||
value(
|
||||
wide,
|
||||
/\n #intel-hud\[data-variant='tactical'\] \.hud-bottom-right \{\s*bottom: ([\d.]+)rem;/,
|
||||
) * rem;
|
||||
assert.equal(readoutWide, POWER_UP.bottom + POWER_UP.height + 8);
|
||||
assert.equal(
|
||||
value(wide, /\.hud-bottom-left \{\s*bottom: calc\(([\d.]+)rem \+ 26px\);/) *
|
||||
rem,
|
||||
readoutWide,
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
wide,
|
||||
/hud-bottom-(left|right) \{[^}]*world-timeline-lift/,
|
||||
);
|
||||
// Corners: coordinates ~302px from 36px, readout ~292px to 36px from the
|
||||
// right edge; the bar keeps 12px from each at every width from 1200px.
|
||||
const gutter =
|
||||
value(
|
||||
wide,
|
||||
/#world-timeline \{\s*width: min\(820px, calc\(100vw - ([\d.]+)rem\)\);/,
|
||||
) * rem;
|
||||
assert.ok(gutter / 2 >= 36 + 302 + 12);
|
||||
assert.ok(timelineLift > 0);
|
||||
// Toasts keep 12px above the raised dock.
|
||||
assert.equal(
|
||||
value(
|
||||
wide,
|
||||
new RegExp(`#toast \\{\\s*bottom: calc\\((\\d+)px \\+ ${lift}\\);`),
|
||||
),
|
||||
dockFloor + DOCK_HEIGHT + 12,
|
||||
);
|
||||
// The dock's panels lose the dock's rise from their height budgets.
|
||||
assert.match(
|
||||
wide,
|
||||
/\.gev-voice-panel \{[^}]*calc\(100dvh - 12rem - 74px \+ 2vh - var\(--gev-provider-lift, 0px\)\)/,
|
||||
);
|
||||
assert.match(
|
||||
block(read('./styles/ai-chat.css'), '@media (min-width: 1200px)'),
|
||||
/#gev-chat-panel \{\s*max-height: min\(34rem, calc\(100dvh - 10rem - 74px \+ 2vh\)\);/,
|
||||
);
|
||||
|
||||
// Below 1200px the corners keep the committed layout: the coordinates clear
|
||||
// the raised credit row's logo line by 6px.
|
||||
assert.ok(
|
||||
value(
|
||||
trays.slice(
|
||||
trays.indexOf(
|
||||
'/* The coordinate readout shares the bottom-left corner',
|
||||
),
|
||||
),
|
||||
new RegExp(
|
||||
`\\.hud-bottom-left \\{\\s*bottom: calc\\(2vh \\+ ([\\d.]+)rem \\+ ${lift}\\);`,
|
||||
),
|
||||
) *
|
||||
rem >=
|
||||
5 * rem + CREDIT_HEIGHT + 6,
|
||||
);
|
||||
// The desktop Omnibar layout outranks these rules; its readout keeps the
|
||||
// same 8px above Power Up.
|
||||
const omnibarReadout = value(
|
||||
read('./styles/omnibar-dock.css'),
|
||||
/#intel-hud\[data-variant='tactical'\] \.hud-bottom-right \{\s*bottom: ([\d.]+)rem;/,
|
||||
);
|
||||
assert.equal(omnibarReadout * rem, POWER_UP.bottom + POWER_UP.height + 8);
|
||||
});
|
||||
|
||||
test('scope choice and expanded feather survive every HUD layout and both restore paths', async (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
const previous = {
|
||||
enabled: isScopeMaskEnabled(),
|
||||
feather: getScopeMaskFeather(),
|
||||
};
|
||||
t.after(() => {
|
||||
setScopeMaskEnabled(previous.enabled);
|
||||
setScopeMaskFeather(previous.feather);
|
||||
});
|
||||
Object.assign(owner.services, { setScopeMaskEnabled, setScopeMaskFeather });
|
||||
let shown = null;
|
||||
owner.store = { publish: (view) => (shown = view.scope) };
|
||||
await owner.restoreShareState({ scopeEnabled: false, scopeFeatherPct: 200 });
|
||||
assert.deepEqual(shown, { enabled: false, featherPct: 200, opacityPct: 100 });
|
||||
for (const layout of ['minimal', 'cyber', 'tactical']) {
|
||||
owner._setHudVariant(layout);
|
||||
assert.equal(isScopeMaskEnabled(), false, layout);
|
||||
assert.equal(getScopeMaskFeather(), 2, layout);
|
||||
assert.equal(shown.enabled, false, layout);
|
||||
}
|
||||
await owner.applyVisualState({ scope: { enabled: true, featherPct: 175 } });
|
||||
assert.equal(isScopeMaskEnabled(), true);
|
||||
assert.equal(getScopeMaskFeather(), 1.75);
|
||||
assert.deepEqual(shown, { enabled: true, featherPct: 175, opacityPct: 100 });
|
||||
await owner.applyVisualState({ scope: { featherPct: 500 } });
|
||||
assert.equal(getScopeMaskFeather(), 2);
|
||||
assert.deepEqual(shown, { enabled: true, featherPct: 200, opacityPct: 100 });
|
||||
});
|
||||
|
||||
test('a shared scope opacity is restored and rides in the next share state', async (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
const previous = getScopeMaskOpacity();
|
||||
t.after(() => setScopeMaskOpacity(previous));
|
||||
Object.assign(owner.services, {
|
||||
setScopeMaskEnabled() {},
|
||||
setScopeMaskFeather() {},
|
||||
setScopeMaskOpacity,
|
||||
});
|
||||
let shown = null;
|
||||
owner.store = { publish: (view) => (shown = view.scope) };
|
||||
await owner.restoreShareState({ scopeOpacityPct: 60 });
|
||||
assert.equal(getScopeMaskOpacity(), 0.6);
|
||||
assert.equal(shown.opacityPct, 60);
|
||||
// A state without it leaves the opacity alone.
|
||||
await owner.restoreShareState({ scopeFeatherPct: 80 });
|
||||
assert.equal(getScopeMaskOpacity(), 0.6);
|
||||
assert.equal(shown.opacityPct, 60);
|
||||
Object.assign(owner.services, {
|
||||
getDetectionTuning: () => ({ allocationStrategy: 'ELASTIC' }),
|
||||
getDetectionMode: () => 'OFF',
|
||||
isScopeMaskEnabled: () => true,
|
||||
getScopeMaskFeather: () => 0.8,
|
||||
getScopeMaskOpacity,
|
||||
getScopeTerminusOverride: () => null,
|
||||
});
|
||||
owner.readCelestialRing = () => null;
|
||||
assert.equal(owner._readShareState().options.scopeOpacityPct, 60);
|
||||
// A link asking for less than the floor opens at the floor, and says so.
|
||||
await owner.restoreShareState({ scopeOpacityPct: 20 });
|
||||
assert.equal(getScopeMaskOpacity(), 0.5);
|
||||
assert.equal(owner._readShareState().options.scopeOpacityPct, 50);
|
||||
});
|
||||
|
||||
test('a scene shot saved with the retired Snow style plays on Normal', async (t) => {
|
||||
const { owner } = styleOwner(t, 'tactical');
|
||||
owner.setStyle('noir');
|
||||
await owner.applyVisualState({ style: 'snow' });
|
||||
assert.equal(owner.activeStyle, 'normal');
|
||||
});
|
||||
|
||||
test('shared panel hooks affect only opted-in rail surfaces without overriding disclosure and concealment', () => {
|
||||
const styles = read('./styles/panel-surfaces.css');
|
||||
const rail = cssRuleBody(
|
||||
styles,
|
||||
/:is\(#left-panel-stack, #right-context-rail\)\s+> \[data-panel-id\]:has\(> \[data-panel-surface\]\)/,
|
||||
);
|
||||
assert.match(rail, /pointer-events:\s*auto;/);
|
||||
assert.doesNotMatch(rail, /(?:display|visibility):/);
|
||||
assert.doesNotMatch(
|
||||
styles,
|
||||
/:is\(#left-panel-stack, #right-context-rail\)\s*> \[data-panel-id\]\s*\{/,
|
||||
);
|
||||
assert.match(
|
||||
styles,
|
||||
/\[data-panel-surface\]:not\(\[hidden\]\):not\(dialog:not\(\[open\]\)\)\s*\{\s*display: flex;/,
|
||||
);
|
||||
assert.match(
|
||||
styles,
|
||||
/dialog\[data-panel-surface\]:not\(\[open\]\)\s*\{\s*display: none !important;/,
|
||||
);
|
||||
assert.match(
|
||||
styles,
|
||||
/body:is\(\.ui-clean-view, \.recording-mode\)[^{]+\{[^}]*visibility: hidden !important;[^}]*pointer-events: none !important;/,
|
||||
);
|
||||
});
|
||||
@@ -279,9 +279,7 @@ export const FEATURE_GUIDES = Object.freeze({
|
||||
prepare: () => $('#hud-toggle')?.scrollIntoView?.({ block: 'center' }),
|
||||
targets: () => [$('#hud-toggle')],
|
||||
text: () =>
|
||||
t(
|
||||
'Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber',
|
||||
),
|
||||
t('Switch the HUD on or off here; Layout picks Tactical or Minimal'),
|
||||
},
|
||||
],
|
||||
scope: () => [
|
||||
|
||||
@@ -2,7 +2,6 @@ import { UiLifetime } from './uiLifetime.js';
|
||||
import { prefersCollapsed, readPanelState } from './rail/panelState.js';
|
||||
import { usePanelChromeStore } from './stores/panelChrome.js';
|
||||
import { applicationPinia } from './vueRuntime.js';
|
||||
import { displayPanelScroller } from './displayPanelScroll.js';
|
||||
import { PanelPositionControls } from './panelPositionControls.js';
|
||||
import { PanelLayoutController } from './panelLayoutController.js';
|
||||
import {
|
||||
@@ -121,7 +120,7 @@ export class PanelChrome {
|
||||
readDisplayScrollTop: () =>
|
||||
this._displayPortalScrollRestoreOwner === 'standard'
|
||||
? this._standardDisplayScrollTop
|
||||
: displayPanelScroller(this._ppToggles)?.scrollTop || 0,
|
||||
: this._ppToggles?.scrollTop || 0,
|
||||
});
|
||||
}
|
||||
get hud() {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { readStylesheet } from '../testSupport/readStylesheet.mjs';
|
||||
import { displayPanelScroller } from './displayPanelScroll.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
@@ -9,21 +8,9 @@ import {
|
||||
} from './panelRails.js';
|
||||
import { applyPanelState, readPanelState } from './rail/panelState.js';
|
||||
|
||||
test('Display uses an inner scroll body only in Cyber', () => {
|
||||
const body = { scrollTop: 95 };
|
||||
const panel = {
|
||||
ownerDocument: { documentElement: { dataset: { uiTheme: 'cyber' } } },
|
||||
querySelector: () => body,
|
||||
};
|
||||
assert.equal(displayPanelScroller(panel), body);
|
||||
panel.ownerDocument.documentElement.dataset.uiTheme = 'tactical';
|
||||
assert.equal(displayPanelScroller(panel), panel);
|
||||
assert.equal(displayPanelScroller(null), null);
|
||||
});
|
||||
|
||||
for (const side of ['left', 'right']) {
|
||||
test(`${side} desktop rail keeps one expanded owner in every HUD layout`, () => {
|
||||
for (const variant of ['tactical', 'minimal', 'cyber']) {
|
||||
for (const variant of ['tactical', 'minimal']) {
|
||||
const f = fixture(side, { hud: { visible: true, variant } });
|
||||
f.expand(f.first, 250);
|
||||
f.expand(f.second, 250);
|
||||
@@ -232,7 +219,7 @@ test('left corridor respects a lower obstacle but ignores an obstacle hidden by
|
||||
assert.equal(Number(f.stack.dataset.safeBottomPct), 65.47);
|
||||
});
|
||||
|
||||
test('a centered timeline only shortens the corridor when it reaches the visible panel', () => {
|
||||
test('a centered timeline only shortens the corridor when it reaches a laid-out panel', () => {
|
||||
const f = fixture('left');
|
||||
f.stack.rect.width = 360;
|
||||
f.stack.rect.right = f.stack.rect.left + 360;
|
||||
@@ -245,6 +232,11 @@ test('a centered timeline only shortens the corridor when it reaches the visible
|
||||
f.run();
|
||||
assert(clear > 85);
|
||||
assert(Number(f.stack.dataset.safeBottomPct) < 73);
|
||||
// Any other obstacle in the same gutter still bounds the corridor.
|
||||
const blocker = element('blocker', { top: 650, left: 320 });
|
||||
f.options.obstacles = [blocker];
|
||||
f.run();
|
||||
assert(Number(f.stack.dataset.safeBottomPct) < 73);
|
||||
});
|
||||
|
||||
test('Data Layers extends to the HUD even if its list is currently short', () => {
|
||||
@@ -413,12 +405,6 @@ test('left rail buttons hold still whether the open panel is short or tall', ()
|
||||
assert.equal(f.stack.dataset.layoutMode, 'focus');
|
||||
assert.notEqual(short.stack.dataset.layoutMode, 'focus');
|
||||
assert.ok(Math.abs(railTop(f.stack) - railTop(short.stack)) < 0.2);
|
||||
|
||||
// A theme that pins the stack's top (Cyber) leaves nothing to offset.
|
||||
f.stack.computed.getPropertyValue = (name) =>
|
||||
name === '--panel-stack-top-pinned' ? ' 1' : '';
|
||||
f.run();
|
||||
assert.equal(f.stack.style.getPropertyValue('--panel-rail-offset'), '0.0px');
|
||||
});
|
||||
|
||||
// The left rail's `top` animates after the right pass runs, and nothing
|
||||
@@ -459,9 +445,9 @@ test('right rail falls back to the committed left target when the transition end
|
||||
});
|
||||
|
||||
test('right rail follows a settled left rail whose CSS overrides the committed target', () => {
|
||||
// Cyber pins the left rail with `top: ... !important`, so the committed
|
||||
// A stylesheet that pins the left rail's `top` means the committed
|
||||
// percentage is not where it renders and no `top` transition runs.
|
||||
const f = fixture('right', { hud: { visible: true, variant: 'cyber' } });
|
||||
const f = fixture('right', { hud: { visible: true, variant: 'minimal' } });
|
||||
f.options.leftStack.rect.top = 220;
|
||||
f.options.leftStack.dataset.safeTopPct = '26.00';
|
||||
f.options.leftStack.getAnimations = () => [];
|
||||
|
||||
@@ -329,18 +329,14 @@ test('while the OAuth check runs, the toggle is busy and repeat presses are igno
|
||||
localStorage.removeItem(CLOUD_VOICE_AUTH_STORAGE_KEY);
|
||||
});
|
||||
|
||||
test('Cyber moves the chip into the top toolbar and other themes return it to the corner', async (t) => {
|
||||
test('the chip stays first in the corner row whatever the HUD layout', async (t) => {
|
||||
const { $, toolbar } = await fixture(t);
|
||||
const corner = $('#corner-actions');
|
||||
assert.equal(corner.firstElementChild?.id, 'key-setup-chip');
|
||||
// The removed Cyber skin no longer moves it into the top toolbar.
|
||||
document.documentElement.dataset.uiTheme = 'cyber';
|
||||
await wait();
|
||||
await nextTick();
|
||||
assert.equal(toolbar.lastElementChild?.id, 'key-setup-chip');
|
||||
assert.equal(corner.querySelector('#key-setup-chip') === null, true);
|
||||
document.documentElement.dataset.uiTheme = 'tactical';
|
||||
await wait();
|
||||
await nextTick();
|
||||
assert.equal(corner.firstElementChild?.id, 'key-setup-chip');
|
||||
assert.equal(toolbar.querySelector('#key-setup-chip') === null, true);
|
||||
delete document.documentElement.dataset.uiTheme;
|
||||
|
||||
@@ -91,10 +91,7 @@ export class RadioControls {
|
||||
*/
|
||||
async _revealRadioControlsAfterExplicitEnable(trigger) {
|
||||
const contextPanel = document.getElementById('global-context-panel');
|
||||
const scroller =
|
||||
(document.documentElement?.dataset.uiTheme === 'cyber' &&
|
||||
contextPanel?.querySelector('.cyber-panel-body')) ||
|
||||
contextPanel?.querySelector('.global-context-panel-inner');
|
||||
const scroller = contextPanel?.querySelector('.global-context-panel-inner');
|
||||
const directory = this._radioPanel?.querySelector('.radio-directory-row');
|
||||
const transport = this._radioPanel?.querySelector('.radio-transport');
|
||||
if (
|
||||
|
||||
@@ -140,7 +140,7 @@ test('a collapsed launcher drops its divider so English titles fit whole', () =>
|
||||
);
|
||||
});
|
||||
|
||||
test('the default theme geometry change leaves cyber gutters alone', () => {
|
||||
test('the default theme geometry change leaves the base gutters alone', () => {
|
||||
for (const surface of [
|
||||
'.data-panel-inner',
|
||||
'.utilities-panel-inner',
|
||||
@@ -193,39 +193,6 @@ test('rail titles and dock labels share one set of label tokens', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('default theme overrides never reach the cyber theme', () => {
|
||||
const notCyber = ":root:not([data-ui-theme='cyber'])";
|
||||
const padding = rules.find(
|
||||
({ selector, body }) =>
|
||||
selector.endsWith(
|
||||
':is(.data-panel-inner, .global-context-panel-inner)',
|
||||
) && /padding-left:\s*14px/.test(body),
|
||||
);
|
||||
assert.ok(
|
||||
padding?.selector.startsWith(notCyber),
|
||||
'the 14px gutters must skip cyber',
|
||||
);
|
||||
const display = rules.find(
|
||||
({ selector, body }) =>
|
||||
selector.endsWith('#pp-toggles > .pp-header-row .pp-collapse-btn') &&
|
||||
/font-size:\s*13px/.test(body),
|
||||
);
|
||||
assert.ok(
|
||||
display?.selector.startsWith(notCyber),
|
||||
"Display's 22px toggle must skip cyber",
|
||||
);
|
||||
// Cyber draws its title marker at left: -8px; a clip on the title would cut it.
|
||||
for (const { selector, body } of rules) {
|
||||
if (!/\.panel-title/.test(selector) || !/overflow:\s*hidden/.test(body))
|
||||
continue;
|
||||
if (!/#left-panel-stack|#right-context-rail/.test(selector)) continue;
|
||||
assert.ok(
|
||||
selector.startsWith(notCyber),
|
||||
`${selector} clips the cyber title marker`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('launcher compaction and header colour stay on the rail panels themselves', () => {
|
||||
// The divider, gap and toggle rules; the translated type rule is checked
|
||||
// above.
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
} from '../panelStackLayout.js';
|
||||
import { resolveHudRailLayout } from './panelRailGeometry.js';
|
||||
|
||||
import { displayPanelScroller } from './displayPanelScroll.js';
|
||||
import { settleSideAccordion } from './panelAccordion.js';
|
||||
|
||||
const pendingCollapseRetries = new WeakSet();
|
||||
@@ -356,7 +355,7 @@ export function layoutRightPanelRail({
|
||||
stack.dataset.expandedCount = String(expandedPanels.length);
|
||||
|
||||
if (displayPanel && expandedPanels.includes(displayPanel)) {
|
||||
const scroller = displayPanelScroller(displayPanel);
|
||||
const scroller = displayPanel;
|
||||
const maxScrollTop = Math.max(
|
||||
0,
|
||||
scroller.scrollHeight - scroller.clientHeight,
|
||||
|
||||
@@ -52,18 +52,6 @@ test('the dock trays open from their own wing in right-to-left', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('the Cyber cockpit keeps Data Layers on the left edge in every language', () => {
|
||||
const body = ruleBody(
|
||||
sheet('cyber.css'),
|
||||
":root[data-ui-theme='cyber'] body.cockpit-mode #left-panel-stack",
|
||||
);
|
||||
// inset-inline-start would become right: 30px in Arabic and beat
|
||||
// rtl.css's reset, landing the stack on the utility controls.
|
||||
assert.doesNotMatch(body, /inset-inline-start/);
|
||||
assert.match(body, /left: 30px;/);
|
||||
assert.match(body, /right: auto;/);
|
||||
});
|
||||
|
||||
test('the panel rails stay on the outer side of their stacks in right-to-left', () => {
|
||||
const layers = sheet('layers.css');
|
||||
// Each rail is placed by its screen-side edge; a physical side would put
|
||||
@@ -90,11 +78,6 @@ test('the panel rails stay on the outer side of their stacks in right-to-left',
|
||||
ruleBody(kit, '.ui-tooltip__tip--left'),
|
||||
/inset-inline-end: calc\(100% \+ 10px\);/,
|
||||
);
|
||||
// Cyber's right stack keeps its rail clearance on the left edge.
|
||||
assert.match(
|
||||
sheet('rtl.css'),
|
||||
/html\[dir='rtl'\]\[data-ui-theme='cyber'\] #right-context-rail \{\s*right: auto;\s*left: calc\(51px \+ var\(--panel-rail-clearance\)\);/,
|
||||
);
|
||||
});
|
||||
|
||||
test('phone top-bar actions mirror with the logo', () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { PanelChrome } from './panelChrome.js';
|
||||
import { presentPanelLocally } from '../testSupport/panelState.mjs';
|
||||
import { readPanelState } from './rail/panelState.js';
|
||||
|
||||
function fixture(theme = 'cyber') {
|
||||
function fixture(theme = 'tactical') {
|
||||
const nodes = new Map();
|
||||
const node = (id, collapsed = true) => {
|
||||
const classes = new Set(collapsed ? ['collapsed'] : []);
|
||||
@@ -49,7 +49,7 @@ function fixture(theme = 'cyber') {
|
||||
}
|
||||
|
||||
test('explicit opening collapses side peers and claims their restoration lanes in every theme', () => {
|
||||
for (const theme of ['tactical', 'minimal', 'cyber']) {
|
||||
for (const theme of ['tactical', 'minimal']) {
|
||||
const f = fixture(theme), prior = globalThis.document;
|
||||
globalThis.document = f.doc;
|
||||
try {
|
||||
@@ -86,7 +86,7 @@ test('opening already-expanded Radio reveals Context and closes Display', () =>
|
||||
});
|
||||
|
||||
test('restored preferences keep every saved panel open for the layout to normalize', () => {
|
||||
for (const theme of ['tactical', 'minimal', 'cyber']) {
|
||||
for (const theme of ['tactical', 'minimal']) {
|
||||
const f = fixture(theme), prior = globalThis.document;
|
||||
globalThis.document = f.doc;
|
||||
try {
|
||||
|
||||
+19
-15
@@ -366,15 +366,12 @@
|
||||
flex-basis: 1.25rem;
|
||||
}
|
||||
/* At this width main shows the wings' icons only (command-dock-trays.css);
|
||||
centre them in the slim wings. Cyber keeps its labels. */
|
||||
centre them in the slim wings. */
|
||||
@media (max-width: 900px) {
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#command-dock
|
||||
> :is(#location-bar, #control-panel)
|
||||
.dock-tray-toggle {
|
||||
:root #command-dock > :is(#location-bar, #control-panel) .dock-tray-toggle {
|
||||
justify-content: center;
|
||||
}
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
#command-dock
|
||||
:is(#location-bar, #control-panel)
|
||||
:is(.location-toolbar-label, .panel-title) {
|
||||
@@ -382,7 +379,7 @@
|
||||
min-width: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
:root:not([data-ui-theme='cyber']) #command-dock .dock-label-icon {
|
||||
:root #command-dock .dock-label-icon {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
flex-basis: 1.25rem;
|
||||
@@ -1448,16 +1445,15 @@ body[data-assistant-docked='true'] #right-context-rail {
|
||||
box-shadow: 0 0 0 1px currentColor;
|
||||
}
|
||||
|
||||
/* Assistant panels share the left panels' glass surface (layers.css). Cyber
|
||||
keeps its own surfaces. */
|
||||
:root:not([data-ui-theme='cyber']) #gev-voice-control {
|
||||
/* Assistant panels share the left panels' glass surface (layers.css). */
|
||||
:root #gev-voice-control {
|
||||
--assistant-glass: var(--glass-bg);
|
||||
--assistant-glass-border: var(--glass-border);
|
||||
--assistant-glass-shadow:
|
||||
0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset,
|
||||
0 1px 0 rgba(255, 255, 255, 0.06) inset;
|
||||
}
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
#command-dock
|
||||
#gev-voice-control
|
||||
:is(
|
||||
@@ -1472,14 +1468,14 @@ body[data-assistant-docked='true'] #right-context-rail {
|
||||
}
|
||||
/* The mini reply sits inside the chat panel, whose own blur makes it the
|
||||
backdrop root: a blur on the reply could not reach the map. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
#command-dock
|
||||
#gev-voice-control
|
||||
:is(#gev-chat-panel, #gev-voice-panel, #gev-voice-panel[data-minimized]) {
|
||||
-webkit-backdrop-filter: blur(24px) saturate(1.4);
|
||||
backdrop-filter: blur(24px) saturate(1.4);
|
||||
}
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
#command-dock
|
||||
#gev-voice-control
|
||||
#gev-chat-panel[data-minimized='true']:focus-within {
|
||||
@@ -1488,12 +1484,12 @@ body[data-assistant-docked='true'] #right-context-rail {
|
||||
|
||||
/* A backdrop-filter on the voice control would stop the panels inside it
|
||||
from blurring the map, so its own blur moves to a layer behind it. */
|
||||
:root:not([data-ui-theme='cyber']) #command-dock > #gev-voice-control {
|
||||
:root #command-dock > #gev-voice-control {
|
||||
isolation: isolate;
|
||||
-webkit-backdrop-filter: none;
|
||||
backdrop-filter: none;
|
||||
}
|
||||
:root:not([data-ui-theme='cyber']) #command-dock > #gev-voice-control::before {
|
||||
:root #command-dock > #gev-voice-control::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -1698,3 +1694,11 @@ body[data-assistant-docked='true'] #right-context-rail {
|
||||
--dock-side-compact: 3.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* From 1200px the dock sits 74px up (command-dock.css), 74px - 2vh higher
|
||||
than the bottom-edge dock this height budget was written for. */
|
||||
@media (min-width: 1200px) {
|
||||
#gev-chat-panel {
|
||||
max-height: min(34rem, calc(100dvh - 10rem - 74px + 2vh));
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
|
||||
/* Display / Radio: the closed launchers and the open panels match too. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-control.is-expanded {
|
||||
border-color: rgba(255, 255, 255, 0.08);
|
||||
@@ -139,14 +139,14 @@
|
||||
person, Utilities has nothing to do there, and the cockpit's own Display
|
||||
panel stands in for Visual), one panel opens beside it, and the collapsed
|
||||
header strips the cockpit used instead are hidden. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> .gev-panel-rail--left {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> .gev-panel-rail--left
|
||||
@@ -155,7 +155,7 @@
|
||||
[data-rail-item='utilities-panel'],
|
||||
[data-rail-item='pp-toggles']
|
||||
),
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> .gev-panel-rail--left
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
/* With some icons hidden, the runs between them break up: with a panel
|
||||
open, each icon left is its own island. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> .gev-panel-rail--left
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
/* Authoring, Utilities or Visual may still be open underneath; its hidden icon must
|
||||
not split the rail into islands. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> .gev-panel-rail--left
|
||||
@@ -196,7 +196,7 @@
|
||||
)[aria-pressed='true']
|
||||
)
|
||||
> .ui-tooltip::before,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> .gev-panel-rail--left
|
||||
@@ -211,7 +211,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> .gev-panel-rail--left
|
||||
@@ -229,11 +229,11 @@
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> [data-panel-id].collapsed,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack
|
||||
> :is(
|
||||
@@ -247,9 +247,7 @@
|
||||
/* Both rails start at one height, just under the top HUD text, so their top
|
||||
edges line up; the cockpit layout pass places Display and Radio at the
|
||||
same height (COCKPIT_UTILITY_MIN_TOP_PX / _RATIO in cockpitPresentation.js). */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
#left-panel-stack {
|
||||
:root body.cockpit-mode:not(.mobile-shell) #left-panel-stack {
|
||||
top: max(206px, 22vh) !important;
|
||||
}
|
||||
|
||||
@@ -415,14 +413,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
}
|
||||
|
||||
/* ── Open Display / Radio panels: the main panels' header and size ───── */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-control.is-expanded {
|
||||
min-width: 295px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-control.is-expanded
|
||||
.cockpit-utility-launcher {
|
||||
@@ -435,7 +433,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
letter-spacing: 0.22em;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-control.is-expanded
|
||||
.cockpit-utility-divider {
|
||||
@@ -448,16 +446,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
|
||||
/* The launcher's own toggle steps aside: the rail and "−" open and close
|
||||
the panel instead. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-control.is-expanded
|
||||
.cockpit-utility-glyph {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-collapse {
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-collapse {
|
||||
display: grid;
|
||||
flex: none;
|
||||
place-items: center;
|
||||
@@ -472,10 +468,8 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-collapse:hover,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-collapse:hover,
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-collapse:focus-visible {
|
||||
border-color: rgba(0, 212, 255, 0.45);
|
||||
@@ -486,9 +480,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
/* ── Right rail as on the left: an icon column that stays, labels beside it
|
||||
while nothing is open, and the open panel to its left. The launchers'
|
||||
own strips give way to it. ─────────────────────────────────────────── */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-controls {
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
align-items: start;
|
||||
@@ -496,13 +488,13 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
column-gap: 6px;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-control:not(.is-expanded) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-control.is-expanded {
|
||||
grid-column: 1;
|
||||
@@ -510,16 +502,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
/* Cyber and the phone keep the launchers' own toggles, so the rail and "−"
|
||||
are for the desktop look only. */
|
||||
/* The phone keeps the launchers' own toggles, so the rail and "−" are for
|
||||
the desktop look only. */
|
||||
.cockpit-utility-rail,
|
||||
.cockpit-utility-collapse {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail {
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
display: flex;
|
||||
@@ -528,7 +518,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
:is(.cockpit-utility-rail__labels, .cockpit-utility-rail__icons) {
|
||||
display: flex;
|
||||
@@ -545,15 +535,13 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail__labels {
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__labels {
|
||||
box-sizing: border-box;
|
||||
width: 170px;
|
||||
padding-inline: 14px;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail__labels
|
||||
> span {
|
||||
@@ -569,16 +557,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
letter-spacing: 2.08px;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail.is-open
|
||||
.cockpit-utility-rail__labels {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail__item {
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 32px;
|
||||
@@ -595,24 +581,20 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
border-color var(--transition-fast, 120ms);
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail__item
|
||||
.material-symbols-outlined {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail__item:hover {
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: var(--text-primary, #fff);
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail__item.is-on,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item.is-on,
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail__item.is-on:hover {
|
||||
border-color: rgba(0, 212, 255, 0.15);
|
||||
@@ -621,7 +603,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
}
|
||||
|
||||
/* With a panel open, each icon is its own island, as on the main rails. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail.is-open
|
||||
.cockpit-utility-rail__icons {
|
||||
@@ -632,14 +614,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
-webkit-backdrop-filter: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail.is-open
|
||||
.cockpit-utility-rail__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail.is-open
|
||||
.cockpit-utility-rail__item::before {
|
||||
@@ -657,12 +639,12 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
}
|
||||
|
||||
/* Hovering an icon lights its label too, as on the left. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail:has(.cockpit-utility-rail__item:nth-child(1):hover)
|
||||
.cockpit-utility-rail__labels
|
||||
> span:nth-child(1),
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-rail:has(.cockpit-utility-rail__item:nth-child(2):hover)
|
||||
.cockpit-utility-rail__labels
|
||||
@@ -671,22 +653,18 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
|
||||
}
|
||||
|
||||
/* Mirror the left rail's 52px inset, clear of the HUD's vertical readouts. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-controls {
|
||||
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
|
||||
right: 52px;
|
||||
}
|
||||
|
||||
/* Like the cockpit's other windows (rtl.css), the rail keeps its physical
|
||||
side in a right-to-left language: icons at the screen edge, the open panel
|
||||
inside them. Only the text reads right to left. */
|
||||
html[dir='rtl']:not([data-ui-theme='cyber'])
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
.cockpit-utility-controls {
|
||||
html[dir='rtl'] body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
html[dir='rtl']:not([data-ui-theme='cyber'])
|
||||
html[dir='rtl']
|
||||
body.cockpit-mode:not(.mobile-shell)
|
||||
:is(.cockpit-utility-control.is-expanded, .cockpit-utility-rail__labels) {
|
||||
direction: rtl;
|
||||
|
||||
@@ -15,13 +15,8 @@
|
||||
var(--cockpit-radar-label-height) + 14px
|
||||
);
|
||||
}
|
||||
:root[data-ui-theme='cyber'] #cockpit-hud[data-subject='vessel'] {
|
||||
--cockpit-radar-right: 30px;
|
||||
}
|
||||
:root[data-ui-theme='cyber'] #cockpit-hud[data-subject='vessel']::before {
|
||||
clip-path: none;
|
||||
}
|
||||
:root:not([data-ui-theme='cyber']) body.cockpit-bridge {
|
||||
|
||||
:root body.cockpit-bridge {
|
||||
--panel-radius: 2px;
|
||||
--btn-radius: 2px;
|
||||
}
|
||||
@@ -252,25 +247,6 @@ body.cockpit-bridge #view-switcher button {
|
||||
border-radius: 2px;
|
||||
transform: none;
|
||||
}
|
||||
/* Cyber anchors the card's top from the layout pass; bound its height. */
|
||||
:root[data-ui-theme='cyber']
|
||||
#cockpit-hud[data-subject='vessel']
|
||||
.cockpit-signal-window {
|
||||
bottom: auto;
|
||||
max-height: max(
|
||||
44px,
|
||||
min(
|
||||
30vh,
|
||||
280px,
|
||||
calc(
|
||||
100vh - var(--cockpit-signal-top, clamp(255px, 28vh, 300px)) -
|
||||
var(--cockpit-radar-clearance)
|
||||
)
|
||||
)
|
||||
);
|
||||
clip-path: none;
|
||||
}
|
||||
|
||||
/* The radar console: CockpitRadar fills it, label row included. */
|
||||
#cockpit-hud[data-subject='vessel'] .cockpit-radar-console {
|
||||
position: absolute;
|
||||
@@ -296,15 +272,6 @@ body.cockpit-bridge #view-switcher button {
|
||||
.cockpit-radar-console:has(> .cockpit-radar[hidden]) {
|
||||
display: none;
|
||||
}
|
||||
:root[data-ui-theme='cyber']
|
||||
#cockpit-hud[data-subject='vessel']
|
||||
.cockpit-radar-console {
|
||||
border-color: rgba(105, 203, 209, 0.34);
|
||||
border-top-color: rgba(196, 84, 84, 0.82);
|
||||
background:
|
||||
linear-gradient(135deg, rgba(105, 203, 209, 0.07), transparent 38%),
|
||||
rgba(8, 23, 27, 0.78);
|
||||
}
|
||||
|
||||
@media (min-width: 761px) {
|
||||
/* The heading tape narrows to stay clear of the console. */
|
||||
@@ -318,18 +285,6 @@ body.cockpit-bridge #view-switcher button {
|
||||
)
|
||||
);
|
||||
}
|
||||
:root[data-ui-theme='cyber']
|
||||
#cockpit-hud[data-subject='vessel']
|
||||
.cockpit-compass {
|
||||
width: min(
|
||||
650px,
|
||||
56vw,
|
||||
calc(
|
||||
100vw - 2 *
|
||||
(var(--cockpit-radar-right) + var(--cockpit-radar-size) + 24px)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@media (min-width: 761px) and (min-height: 601px) {
|
||||
/* The console takes the intel HUD's bottom-right corner. */
|
||||
|
||||
@@ -489,10 +489,8 @@
|
||||
#cockpit-hud[data-subject='satellite'] .cockpit-topline > div:first-child {
|
||||
visibility: hidden;
|
||||
}
|
||||
:root[data-ui-theme='cyber'] #cockpit-hud[data-subject='satellite']::before {
|
||||
clip-path: none;
|
||||
}
|
||||
:root:not([data-ui-theme='cyber']) body.cockpit-orbit {
|
||||
|
||||
:root body.cockpit-orbit {
|
||||
--panel-radius: 2px;
|
||||
--btn-radius: 2px;
|
||||
}
|
||||
|
||||
@@ -448,14 +448,18 @@
|
||||
letter-spacing: 0.035rem;
|
||||
}
|
||||
|
||||
/* Keep the complete inline attribution row above the command dock. */
|
||||
/* From 1200px the attribution row sits on the bottom edge, on the Power Up
|
||||
baseline, below the raised command dock (command-dock.css). It stops 26rem
|
||||
short of the right edge, clear of the corner row (Power Up and the language
|
||||
picker), and wraps rather than running under it. Below 1200px the dock
|
||||
keeps to the bottom edge and the row sits above it. */
|
||||
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
|
||||
body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
#intel-hud[data-variant='minimal'].active
|
||||
)
|
||||
#cesium-credits {
|
||||
right: auto;
|
||||
bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
|
||||
bottom: 1rem;
|
||||
left: 1.5rem;
|
||||
width: auto !important;
|
||||
max-width: calc(100vw - 3rem);
|
||||
@@ -468,10 +472,11 @@ body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
)
|
||||
#gev-credits {
|
||||
right: auto;
|
||||
bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
|
||||
bottom: 1rem;
|
||||
left: 1.5rem;
|
||||
width: auto !important;
|
||||
max-width: calc(100vw - 3rem);
|
||||
width: max-content !important;
|
||||
max-width: calc(100vw - 1.5rem - 26rem);
|
||||
white-space: normal;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -494,6 +499,64 @@ body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
bottom: calc(2vh + 9rem + var(--world-timeline-lift, 0px));
|
||||
}
|
||||
|
||||
/* The coordinate readout shares the bottom-left corner with the attribution
|
||||
row below 1200px: it sits clear of the row's 28px logo line, with a 6px gap
|
||||
(from 1200px, rail-split.css). */
|
||||
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
|
||||
.hud-bottom-left,
|
||||
:root[data-scope-mask='off']
|
||||
#intel-hud[data-variant='minimal']
|
||||
.hud-bottom-left {
|
||||
bottom: calc(2vh + 7.125rem + var(--world-timeline-lift, 0px));
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
|
||||
body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
#intel-hud[data-variant='minimal'].active
|
||||
)
|
||||
#cesium-credits,
|
||||
body:not(.ui-clean-view):not(.recording-mode) #gev-credits,
|
||||
body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
#intel-hud[data-variant='minimal'].active
|
||||
)
|
||||
#gev-credits {
|
||||
bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
|
||||
width: auto !important;
|
||||
max-width: calc(100vw - 3rem);
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
/* Cesium draws the line in an absolutely placed box inside the empty
|
||||
#cesium-credits anchor, so the cap and the wrapping go on that box. */
|
||||
#cesium-credits .cesium-widget-credits {
|
||||
width: max-content;
|
||||
max-width: calc(100vw - 1.5rem - 26rem);
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* Right to left, the corner row sits at the bottom left
|
||||
(locale-picker.css), so the attribution row takes the bottom right.
|
||||
Expanded Context places it itself (context-dock.css). */
|
||||
html[dir='rtl']
|
||||
body:not(.context-docked):not(.ui-clean-view):not(.recording-mode)
|
||||
:is(#cesium-credits, #gev-credits) {
|
||||
right: 1.5rem;
|
||||
left: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
html[dir='rtl']
|
||||
body:not(.context-docked):not(.ui-clean-view):not(.recording-mode)
|
||||
#cesium-credits
|
||||
.cesium-widget-credits {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
|
||||
body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
@@ -522,13 +585,9 @@ body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
/* The wings shrink to --dock-side-compact at this width, open or closed (an
|
||||
open tray pops out above the dock), which is too narrow for the text
|
||||
labels; they would spill over the voice control and take its taps. The
|
||||
wings show only their icon; the toggles keep their aria-label. Cyber sets
|
||||
a wider --dock-side-compact that fits its labels, so it keeps them. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#command-dock
|
||||
:is(#location-bar, #control-panel)
|
||||
.panel-title,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
wings show only their icon; the toggles keep their aria-label. */
|
||||
:root #command-dock :is(#location-bar, #control-panel) .panel-title,
|
||||
:root
|
||||
#command-dock
|
||||
:is(#location-bar, #control-panel)
|
||||
.location-toolbar-label {
|
||||
@@ -538,11 +597,8 @@ body:not(.ui-clean-view):not(.recording-mode):has(
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#command-dock
|
||||
:is(#location-bar, #control-panel)
|
||||
.panel-title::after,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root #command-dock :is(#location-bar, #control-panel) .panel-title::after,
|
||||
:root
|
||||
#command-dock
|
||||
:is(#location-bar, #control-panel)
|
||||
.location-toolbar-label::after {
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
#command-dock {
|
||||
position: fixed;
|
||||
right: auto;
|
||||
/* Above the world timeline while it shows (world-timeline.css). */
|
||||
bottom: calc(2vh + var(--world-timeline-lift, 0px));
|
||||
/* 74px up from 1200px, leaving the bottom row to the map credits and
|
||||
Power Up; above the world timeline while it shows (world-timeline.css). */
|
||||
bottom: calc(74px + var(--world-timeline-lift, 0px));
|
||||
left: 50%;
|
||||
z-index: 145;
|
||||
display: grid;
|
||||
@@ -273,6 +274,14 @@ body.recording-mode #gev-credits {
|
||||
bottom: calc(2vh + 11.5rem + var(--world-timeline-lift, 0px));
|
||||
}
|
||||
|
||||
/* Below 1200px the dock reaches the bottom corners, so it keeps to the
|
||||
bottom edge and the credits and coordinates sit above it. */
|
||||
@media (max-width: 1199px) {
|
||||
#command-dock {
|
||||
bottom: calc(2vh + var(--world-timeline-lift, 0px));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
#command-dock {
|
||||
grid-template-areas:
|
||||
|
||||
+15
-33
@@ -97,7 +97,7 @@
|
||||
|
||||
/* A hovered panel sets --rail-label-hover on itself (see below); its own
|
||||
header picks it up. Radio sits inside Context and keeps its own colour. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
:is(
|
||||
.panel-header > .panel-title,
|
||||
@@ -112,9 +112,8 @@
|
||||
}
|
||||
|
||||
/* A title never pushes its toggle out of the card: one that does not fit
|
||||
ends in an ellipsis. Cyber draws a marker left of the title, which a clip
|
||||
would cut, and keeps its own header layout. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
ends in an ellipsis. */
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
:is(.panel-header > .panel-title, .pp-header-label) {
|
||||
min-width: 0;
|
||||
@@ -126,25 +125,25 @@
|
||||
so the header drops it and packs closer. English titles such as Recent
|
||||
Imagery then fit whole. Only the rail's own launchers: Radio, nested in
|
||||
Context, keeps its divider. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
> .panel-collapsible.collapsed
|
||||
> [class$='-panel-inner']
|
||||
> .panel-header,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
> #pp-toggles.collapsed
|
||||
> .pp-header-row {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
> .panel-collapsible.collapsed
|
||||
> [class$='-panel-inner']
|
||||
> .panel-header
|
||||
> .panel-divider,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
> #pp-toggles.collapsed
|
||||
> .pp-header-row
|
||||
@@ -152,13 +151,13 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
> .panel-collapsible.collapsed
|
||||
> [class$='-panel-inner']
|
||||
> .panel-header
|
||||
> .panel-collapse-btn,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
> #pp-toggles.collapsed
|
||||
> .pp-header-row
|
||||
@@ -216,7 +215,7 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
|
||||
brighter edge and an accent title and toggle. Touch screens have no hover,
|
||||
so a tap must not leave a panel lit. */
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
:where(
|
||||
.data-panel-inner,
|
||||
@@ -233,7 +232,7 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
|
||||
transition: border-color var(--transition-fast);
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root
|
||||
:is(#left-panel-stack, #right-context-rail)
|
||||
:where(
|
||||
.data-panel-inner,
|
||||
@@ -560,14 +559,12 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
|
||||
}
|
||||
|
||||
/* Display's title and toggle sit where the other panels' do: 14px of panel
|
||||
padding plus a 4px header inset. The cyber theme sets its own insets. */
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles.collapsed > .pp-header-row {
|
||||
padding plus a 4px header inset. */
|
||||
:root #pp-toggles.collapsed > .pp-header-row {
|
||||
padding: 8px 18px;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles:not(.collapsed)
|
||||
> .pp-header-row {
|
||||
:root #pp-toggles:not(.collapsed) > .pp-header-row {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
@@ -580,10 +577,7 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
|
||||
}
|
||||
|
||||
/* In the default theme Display's toggle matches the other panels' 22px. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
> .pp-header-row
|
||||
.pp-collapse-btn {
|
||||
:root #pp-toggles > .pp-header-row .pp-collapse-btn {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
font-size: 13px;
|
||||
@@ -746,14 +740,6 @@ html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.cyber-sonar-control {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber'] .cyber-sonar-control {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.cyber-sonar-toggle-row,
|
||||
.cyber-sonar-setting {
|
||||
min-width: 200px;
|
||||
@@ -764,10 +750,6 @@ html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label {
|
||||
min-width: 48px;
|
||||
}
|
||||
|
||||
:root[data-cyber-sonar='off'] .cyber-sonar-setting {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Map Source tiles live with Visual Presets in the bottom command tray. */
|
||||
.map-source-section {
|
||||
display: grid;
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1020,10 +1020,8 @@ body.recording-mode .gev-panel-rail {
|
||||
}
|
||||
|
||||
/* Data Layers and Context share the 14px side padding of the other default
|
||||
theme panels, so every title and toggle sits 19px from its edge. Cyber
|
||||
keeps its own gutters. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:is(.data-panel-inner, .global-context-panel-inner) {
|
||||
theme panels, so every title and toggle sits 19px from its edge. */
|
||||
:root :is(.data-panel-inner, .global-context-panel-inner) {
|
||||
padding-right: 14px;
|
||||
padding-left: 14px;
|
||||
}
|
||||
@@ -1328,7 +1326,7 @@ body.recording-mode #right-context-rail > [data-panel-id] {
|
||||
}
|
||||
|
||||
/* Draw marks its on state with an accent edge, like an active DISPLAY
|
||||
button; Cyber swaps in its red edge (cyber.css). */
|
||||
button. */
|
||||
#utilities-panel
|
||||
.utilities-tools
|
||||
.pp-toggle-btn:is([aria-pressed='true'], .active) {
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
color: var(--text-primary);
|
||||
-webkit-backdrop-filter: blur(22px) saturate(1.3);
|
||||
backdrop-filter: blur(22px) saturate(1.3);
|
||||
/* The blur follows the surface's shape (Cyber's cut corners). The dialog
|
||||
has no outward popups for a clip to hide. */
|
||||
/* The blur follows the surface's shape. The dialog has no outward popups
|
||||
for a clip to hide. */
|
||||
clip-path: var(--panel-surface-frame);
|
||||
}
|
||||
|
||||
@@ -102,14 +102,6 @@
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber'] .data-library-stat {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber'] .data-library-stat-value {
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.data-library-intro {
|
||||
margin: 0 0 10px;
|
||||
color: rgba(232, 234, 237, 0.72);
|
||||
@@ -321,21 +313,6 @@
|
||||
font: 10px/1.5 var(--font-mono);
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber'] .data-library-dialog {
|
||||
--glass-bg: rgba(18, 24, 27, 0.62);
|
||||
width: min(600px, calc(100vw - 32px));
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber'] .data-library-item {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber']
|
||||
:is(.data-library-icon, .data-library-badge--good) {
|
||||
color: var(--cyber-red-bright);
|
||||
border-color: var(--cyber-red-bright);
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.data-library-stats {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
|
||||
@@ -94,11 +94,6 @@
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
:root[data-ui-theme='cyber'] .news-panel-inner {
|
||||
border-radius: 0;
|
||||
clip-path: var(--cyber-panel-frame);
|
||||
box-shadow: var(--cyber-panel-shadow);
|
||||
}
|
||||
|
||||
.news-readout {
|
||||
display: flex;
|
||||
|
||||
@@ -326,8 +326,10 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
|
||||
:is(#cesium-credits, #gev-credits) {
|
||||
bottom: 1rem;
|
||||
}
|
||||
/* 8px above the bottom-right corner row (Power Up and the language picker:
|
||||
32px tall, 14px up), as outside the Omnibar layout. */
|
||||
#intel-hud[data-variant='tactical'] .hud-bottom-right {
|
||||
bottom: calc(4.2rem - 26px);
|
||||
bottom: 3.375rem;
|
||||
}
|
||||
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
|
||||
.hud-bottom-left {
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
:root[data-scope-mask='off']
|
||||
#intel-hud:is([data-variant='minimal'], [data-variant='tactical'])
|
||||
.hud-readout,
|
||||
:root[data-scope-mask='off']:not([data-ui-theme='cyber']) .scene-text-holdout {
|
||||
:root[data-scope-mask='off'] .scene-text-holdout {
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
box-shadow: none;
|
||||
border-radius: 2px;
|
||||
@@ -357,9 +357,7 @@
|
||||
#intel-hud:is([data-variant='minimal'], [data-variant='tactical'])
|
||||
:is(.hud-top-right, .hud-bottom-right)
|
||||
.hud-readout,
|
||||
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
|
||||
#style-indicator
|
||||
.scene-text-holdout {
|
||||
:root[data-scope-mask='off'] #style-indicator .scene-text-holdout {
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
@@ -399,9 +397,7 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
|
||||
#title-bar
|
||||
h1::before {
|
||||
:root[data-scope-mask='off'] #title-bar h1::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -0.12em -6px;
|
||||
@@ -410,18 +406,16 @@
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
|
||||
:root[data-scope-mask='off']
|
||||
:is(#title-bar .subtitle, #style-indicator .indicator-label) {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
:root[data-scope-mask='off']:not([data-ui-theme='cyber']) #title-bar .subtitle {
|
||||
:root[data-scope-mask='off'] #title-bar .subtitle {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
|
||||
#style-indicator
|
||||
.indicator-value {
|
||||
:root[data-scope-mask='off'] #style-indicator .indicator-value {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
@@ -431,8 +425,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
|
||||
#title-bar
|
||||
.frame-rate-readout {
|
||||
:root[data-scope-mask='off'] #title-bar .frame-rate-readout {
|
||||
margin-top: 6px;
|
||||
}
|
||||
@@ -42,23 +42,6 @@
|
||||
--panel-surface-collapsed-width: var(--left-collapsed-width);
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber'] {
|
||||
--panel-surface-font: var(--font-mono);
|
||||
--panel-surface-detail: var(--cyber-panel-surface-detail);
|
||||
--panel-surface-frame: var(--cyber-panel-frame);
|
||||
--panel-surface-shadow: var(--cyber-panel-shadow);
|
||||
--panel-surface-title: var(--cyber-red-bright);
|
||||
--panel-surface-error: var(--cyber-red-bright);
|
||||
--panel-surface-width: var(--cyber-panel-width);
|
||||
--panel-surface-collapsed-width: var(--cyber-panel-collapsed-width);
|
||||
}
|
||||
|
||||
:root[data-ui-theme='cyber']
|
||||
#right-context-rail
|
||||
> [data-panel-id]:has(> [data-panel-surface]) {
|
||||
--panel-surface-width: var(--cyber-right-panel-width);
|
||||
}
|
||||
|
||||
:is([data-panel-surface], [data-panel-popup]) {
|
||||
isolation: isolate;
|
||||
min-width: 0;
|
||||
|
||||
@@ -104,8 +104,8 @@
|
||||
|
||||
/* In clean view the screen-edge gutters stay empty: the HUD's vertical edge
|
||||
readouts (ONA / COLL on the left, BAND / BITS / LVL on the right) are not
|
||||
shown. Cyber lays its HUD out differently and keeps them. */
|
||||
:root:not([data-ui-theme='cyber']) body.ui-clean-view #intel-hud .hud-edge {
|
||||
shown. */
|
||||
:root body.ui-clean-view #intel-hud .hud-edge {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@@ -116,9 +116,43 @@
|
||||
bottom: calc(2vh + 6.5rem - 26px);
|
||||
}
|
||||
|
||||
/* From 1200px the dock sits 74px up (command-dock.css) and clears both
|
||||
corners, which are at most ~340px wide beside a ~500px dock. The readout
|
||||
sits 8px above the bottom-right corner row (Power Up and the language
|
||||
picker: 32px tall, 14px up) and the coordinates start level with it. The
|
||||
World Timeline sits on the dock's floor between the corners (44rem
|
||||
narrower than the screen), so the corners stay put while it shows. */
|
||||
@media (min-width: 1200px) {
|
||||
#intel-hud[data-variant='tactical'] .hud-bottom-right {
|
||||
bottom: calc(4.2rem - 26px);
|
||||
bottom: 3.375rem;
|
||||
}
|
||||
|
||||
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
|
||||
.hud-bottom-left,
|
||||
:root[data-scope-mask='off']
|
||||
#intel-hud[data-variant='minimal']
|
||||
.hud-bottom-left {
|
||||
bottom: calc(3.375rem + 26px);
|
||||
}
|
||||
|
||||
#world-timeline {
|
||||
width: min(820px, calc(100vw - 44rem));
|
||||
}
|
||||
|
||||
/* The raised dock is 74px - 2vh higher than the bottom-edge dock these
|
||||
height budgets were written for. Toasts keep 12px above the 62px dock. */
|
||||
#gev-voice-control .gev-voice-panel {
|
||||
max-height: min(
|
||||
28rem,
|
||||
max(
|
||||
7.5rem,
|
||||
calc(100dvh - 12rem - 74px + 2vh - var(--gev-provider-lift, 0px))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
body:not(.ui-clean-view):not(.recording-mode):not(.cockpit-mode) #toast {
|
||||
bottom: calc(148px + var(--world-timeline-lift, 0px));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,12 +92,6 @@ html:lang(he) :is(#intel-hud, #cockpit-hud) {
|
||||
left: var(--right-rail-x);
|
||||
}
|
||||
}
|
||||
@media (min-width: 961px) and (min-height: 650px) {
|
||||
html[dir='rtl'][data-ui-theme='cyber'] #right-context-rail {
|
||||
right: auto;
|
||||
left: calc(51px + var(--panel-rail-clearance));
|
||||
}
|
||||
}
|
||||
|
||||
/* The dock's wings swap sides (Location on the right, Visual presets on the
|
||||
left), so each slide-up tray is anchored from the wing's outer edge and
|
||||
|
||||
@@ -220,7 +220,7 @@ html:not([lang='en']) #scene-panel .scene-controls .scene-btn {
|
||||
}
|
||||
|
||||
/* One primary action per step: CAPTURE SHOT and PLAY. The panel id keeps
|
||||
this above Cyber's shared button surface. */
|
||||
this above the shared button surface. */
|
||||
#scene-panel .scene-btn-primary:not(:disabled) {
|
||||
color: var(--accent);
|
||||
border-color: color-mix(in srgb, var(--accent) 55%, transparent);
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/* Sonar is an opt-in visual style over any HUD layout (Display > HUD >
|
||||
Sonar). Off by default; cockpit mode and reduced motion keep the map still. */
|
||||
|
||||
.hud-sonar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: min(
|
||||
var(--cyber-sonar-size-vw, 80vw),
|
||||
var(--cyber-sonar-size-vh, 104vh)
|
||||
);
|
||||
aspect-ratio: 1;
|
||||
border: 1px solid rgba(226, 235, 236, 0.2);
|
||||
border-radius: 50%;
|
||||
opacity: var(--cyber-sonar-visual-intensity, 0.57);
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
transform: translate(-50%, -50%);
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(196, 84, 84, 0.12),
|
||||
inset 0 0 48px rgba(196, 84, 84, 0.035);
|
||||
}
|
||||
|
||||
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::before,
|
||||
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: inherit;
|
||||
content: '';
|
||||
}
|
||||
|
||||
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::before {
|
||||
opacity: 0.52;
|
||||
background: repeating-radial-gradient(
|
||||
circle,
|
||||
transparent 0 calc(var(--cyber-sonar-ring-step, 12.5%) - 1px),
|
||||
rgba(226, 235, 236, 0.17) calc(var(--cyber-sonar-ring-step, 12.5%) - 1px)
|
||||
var(--cyber-sonar-ring-step, 12.5%)
|
||||
);
|
||||
}
|
||||
|
||||
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
|
||||
background: conic-gradient(
|
||||
from 0deg,
|
||||
rgba(245, 250, 250, 0.3) 0deg,
|
||||
rgba(235, 116, 116, 0.14) 0.55deg,
|
||||
rgba(196, 84, 84, 0.075) var(--cyber-sonar-sector-quarter, 6deg),
|
||||
rgba(150, 206, 215, 0.035) var(--cyber-sonar-sector-middle, 14.4deg),
|
||||
transparent var(--cyber-sonar-sector-width, 24deg) 360deg
|
||||
);
|
||||
filter: drop-shadow(0 0 4px rgba(226, 235, 236, 0.1));
|
||||
mask-image: radial-gradient(
|
||||
circle,
|
||||
#000 0 84%,
|
||||
rgba(0, 0, 0, 0.65) 92%,
|
||||
transparent 100%
|
||||
);
|
||||
transform-origin: 50% 50%;
|
||||
will-change: transform;
|
||||
animation: cyber-sonar-sweep 5.2s linear infinite;
|
||||
animation-delay: var(--cyber-sonar-phase-delay, 0ms);
|
||||
}
|
||||
|
||||
@keyframes cyber-sonar-sweep {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#cyber-sonar-status:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[data-cyber-sonar='on'] body.cockpit-mode #intel-hud .hud-sonar,
|
||||
:root[data-cyber-sonar='on'] #intel-hud:not(.active) .hud-sonar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
|
||||
display: none;
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
@@ -158,9 +158,8 @@ body.mobile-shell #pp-toggles .visual-presets {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
/* The card skin below is the default look; the Cyber HUD keeps its own red
|
||||
skin for these controls (cyber.css), so the skin stands aside there. */
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-group {
|
||||
/* The Display panel's card skin. */
|
||||
:root #pp-toggles .pp-toggle-group {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
@@ -169,11 +168,8 @@ body.mobile-shell #pp-toggles .visual-presets {
|
||||
}
|
||||
|
||||
/* The header row of a card, and the lone Clean UI button. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
> .pp-toggle-btn,
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-panel-body > .pp-toggle-btn {
|
||||
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn,
|
||||
:root #pp-toggles .pp-panel-body > .pp-toggle-btn {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
@@ -188,20 +184,20 @@ body.mobile-shell #pp-toggles .visual-presets {
|
||||
-webkit-backdrop-filter: none;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-panel-body > .pp-toggle-btn {
|
||||
:root #pp-toggles .pp-panel-body > .pp-toggle-btn {
|
||||
background: rgba(255, 255, 255, 0.03) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.07) !important;
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn .pp-icon {
|
||||
:root #pp-toggles .pp-toggle-btn .pp-icon {
|
||||
width: 18px;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
color: rgba(199, 214, 222, 0.75);
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn .pp-label {
|
||||
:root #pp-toggles .pp-toggle-btn .pp-label {
|
||||
color: rgba(236, 244, 248, 0.9);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.62rem;
|
||||
@@ -211,14 +207,8 @@ body.mobile-shell #pp-toggles .visual-presets {
|
||||
|
||||
/* An on/off pill at the right of every button header (Scope keeps its
|
||||
checkbox, which already says it). */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
> button.pp-toggle-btn::after,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-panel-body
|
||||
> button.pp-toggle-btn::after {
|
||||
:root #pp-toggles .pp-toggle-group > button.pp-toggle-btn::after,
|
||||
:root #pp-toggles .pp-panel-body > button.pp-toggle-btn::after {
|
||||
/* The state is the button's own (aria-pressed); the pill only shows it. */
|
||||
content: var(--pp-pill-off, 'OFF') / '';
|
||||
margin-inline-start: auto;
|
||||
@@ -231,68 +221,40 @@ body.mobile-shell #pp-toggles .visual-presets {
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
> button.pp-toggle-btn.active::after,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root #pp-toggles .pp-toggle-group > button.pp-toggle-btn.active::after,
|
||||
:root
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
> button.pp-toggle-btn[aria-pressed='true']::after,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-panel-body
|
||||
> button.pp-toggle-btn.active::after {
|
||||
:root #pp-toggles .pp-panel-body > button.pp-toggle-btn.active::after {
|
||||
content: var(--pp-pill-on, 'ON') / '';
|
||||
color: #7af0ff;
|
||||
border-color: rgba(54, 220, 255, 0.5);
|
||||
background: rgba(54, 220, 255, 0.1);
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn.active .pp-icon,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-btn[aria-pressed='true']
|
||||
.pp-icon,
|
||||
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn.active .pp-label,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-btn[aria-pressed='true']
|
||||
.pp-label {
|
||||
:root #pp-toggles .pp-toggle-btn.active .pp-icon,
|
||||
:root #pp-toggles .pp-toggle-btn[aria-pressed='true'] .pp-icon,
|
||||
:root #pp-toggles .pp-toggle-btn.active .pp-label,
|
||||
:root #pp-toggles .pp-toggle-btn[aria-pressed='true'] .pp-label {
|
||||
color: #7af0ff;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
> .pp-toggle-btn:hover,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-panel-body
|
||||
> .pp-toggle-btn:hover {
|
||||
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn:hover,
|
||||
:root #pp-toggles .pp-panel-body > .pp-toggle-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.04) !important;
|
||||
}
|
||||
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-scope-toggle
|
||||
input[type='checkbox'] {
|
||||
:root #pp-toggles .pp-scope-toggle input[type='checkbox'] {
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
/* Settings inside a card: separated by hairlines, no boxes of their own. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
:root #pp-toggles .pp-toggle-group .pp-slider-row.visible,
|
||||
:root
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
.pp-slider-row.visible,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
.pp-slider-row:not([class*='cyber-sonar']):is(
|
||||
.visible,
|
||||
#scope-slider-row,
|
||||
#scope-opacity-row
|
||||
) {
|
||||
.pp-slider-row:is(.visible, #scope-slider-row, #scope-opacity-row) {
|
||||
margin: 0;
|
||||
padding: 7px 12px;
|
||||
background: transparent;
|
||||
@@ -302,14 +264,8 @@ body.mobile-shell #pp-toggles .visual-presets {
|
||||
}
|
||||
|
||||
/* The Dense button lights green elsewhere; in a card it uses the shared pill. */
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
> .pp-toggle-btn.panoptic,
|
||||
:root:not([data-ui-theme='cyber'])
|
||||
#pp-toggles
|
||||
.pp-toggle-group
|
||||
> .pp-toggle-btn.active {
|
||||
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn.panoptic,
|
||||
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn.active {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
|
||||
@@ -418,12 +418,7 @@ body.recording-mode .gev-pointer-reticle {
|
||||
text-align: start;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
:root[data-ui-theme='cyber'] #gev-voice-control .gev-voice-panel {
|
||||
background-color: var(--cyber-panel-surface);
|
||||
background-image: var(--cyber-panel-surface-detail);
|
||||
border-color: var(--glass-border);
|
||||
box-shadow: var(--cyber-panel-shadow);
|
||||
}
|
||||
|
||||
#gev-voice-control .gev-voice-panel[hidden],
|
||||
#gev-voice-control .gev-voice-panel [hidden] {
|
||||
display: none;
|
||||
|
||||
@@ -319,16 +319,7 @@ html:not([lang='en'])
|
||||
outline: 2px solid var(--voice-panel-accent, var(--accent));
|
||||
outline-offset: 2px;
|
||||
}
|
||||
:root[data-ui-theme='cyber']
|
||||
#gev-voice-control:has(> .gev-voice-settings-button) {
|
||||
--voice-panel-accent: var(--cyber-red-bright);
|
||||
}
|
||||
:root[data-ui-theme='cyber']
|
||||
#gev-voice-control:has(> .gev-voice-settings-button)
|
||||
.gev-voice-provider-field {
|
||||
background: var(--cyber-panel-surface);
|
||||
border-color: var(--glass-border);
|
||||
}
|
||||
|
||||
@media (pointer: coarse) {
|
||||
#gev-voice-control .gev-voice-settings-button {
|
||||
width: 44px;
|
||||
|
||||
@@ -28,7 +28,8 @@ body.cockpit-mode #world-timeline {
|
||||
#world-timeline {
|
||||
direction: ltr;
|
||||
position: fixed;
|
||||
bottom: 2vh;
|
||||
/* The dock's floor (command-dock.css); the dock rises above the bar. */
|
||||
bottom: 74px;
|
||||
left: 50%;
|
||||
z-index: 146;
|
||||
display: flex;
|
||||
@@ -309,6 +310,12 @@ body.cockpit-mode #world-timeline {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
#world-timeline {
|
||||
bottom: 2vh;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
#world-timeline {
|
||||
bottom: 8px;
|
||||
@@ -347,4 +354,3 @@ body.mobile-shell #world-timeline .world-timeline-speed {
|
||||
order: 2;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
@@ -126,10 +126,8 @@ const tickStyle = (tick) =>
|
||||
<div v-if="generic && hud.veil" class="cockpit-veil" :class="{ streaks: hud.veil.streaks }" :style="veilStyle" aria-hidden="true"></div>
|
||||
<!-- In orbit the picture keeps only the nadir reticle, readout and zoom. -->
|
||||
<CockpitOrbital v-if="orbital" />
|
||||
<!-- One optical coordinate system: every targeting mark shares this center.
|
||||
Decorative only; telemetry and interactive panels remain separate.
|
||||
A bridge looks out through straight window mullions instead: a header
|
||||
beam, two pane posts and the sill either side of the console. -->
|
||||
<!-- A bridge looks out through straight window mullions: a header beam,
|
||||
two pane posts and the sill either side of the console. -->
|
||||
<svg v-if="bridge" class="cockpit-frame-lines cockpit-bridge-frame" viewBox="0 0 1200 720" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
||||
<g fill="none" stroke="currentColor">
|
||||
<path d="M0 96H1200 M0 101H1200"/>
|
||||
@@ -137,48 +135,6 @@ const tickStyle = (tick) =>
|
||||
<path d="M0 600H324 M876 600H1200"/>
|
||||
</g>
|
||||
</svg>
|
||||
<svg v-else-if="!orbital && !generic" class="cockpit-frame-lines" viewBox="0 0 1200 720" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
||||
<g fill="none" stroke="currentColor">
|
||||
<path d="M42 106H234L266 126H334 M866 126H934L966 106H1158 M42 114H226L258 136H318 M882 136H942L974 114H1158"/>
|
||||
<path d="M42 616H226L254 598H320 M880 598H946L974 616H1158 M42 624H238L266 606H330 M870 606H934L962 624H1158"/>
|
||||
<path d="M322 650H878L858 622H728L708 634H492L472 622H342Z M348 659H852"/>
|
||||
<path d="M72 160H144L158 174V186 M1056 160H1128L1142 174V186 M72 562H144L158 548V536 M1056 562H1128L1142 548V536"/>
|
||||
</g>
|
||||
<path class="cockpit-frame-warning" d="M338 645H476L490 654H710L724 645H862" fill="none"/>
|
||||
<path class="cockpit-frame-meter" d="M372 642H418 M782 642H828"/>
|
||||
</svg>
|
||||
<div v-if="!bridge && !orbital && !generic" class="cockpit-scan-array" aria-hidden="true">
|
||||
<svg class="cockpit-target-geometry" viewBox="0 0 600 600" fill="none" focusable="false">
|
||||
<g class="cockpit-target-hairline">
|
||||
<circle cx="300" cy="300" r="276"/>
|
||||
<circle class="cockpit-target-drift" cx="300" cy="300" r="250" stroke-dasharray="1 13"/>
|
||||
<circle cx="300" cy="300" r="164"/>
|
||||
<path d="M190 237V363 M410 237V363 M99 227H139 M461 227H501 M99 373H139 M461 373H501"/>
|
||||
<path d="M86 113H118L134 129 M514 113H482L466 129 M86 487H118L134 471 M514 487H482L466 471"/>
|
||||
</g>
|
||||
<g class="cockpit-target-side-arcs">
|
||||
<path d="M70 167A266 266 0 0 0 70 433 M530 167A266 266 0 0 1 530 433"/>
|
||||
</g>
|
||||
<g class="cockpit-target-ticks">
|
||||
<path d="M166 125A220 220 0 0 1 434 125 M166 475A220 220 0 0 0 434 475"/>
|
||||
</g>
|
||||
<g class="cockpit-target-dots">
|
||||
<path d="M180 130A208 208 0 0 1 420 130 M180 470A208 208 0 0 0 420 470"/>
|
||||
</g>
|
||||
<g class="cockpit-target-warning-dots">
|
||||
<path d="M172 112A227 227 0 0 1 428 112 M172 488A227 227 0 0 0 428 488"/>
|
||||
</g>
|
||||
<g class="cockpit-target-core">
|
||||
<!-- One outer ring and a spaced rotor leave the aiming center open. -->
|
||||
<circle class="cockpit-target-orbit" cx="300" cy="300" r="132" stroke-dasharray="186 21"/>
|
||||
<circle class="cockpit-target-rotor" cx="300" cy="300" r="104" stroke-dasharray="128 35" transform="rotate(9 300 300)"/>
|
||||
<path class="cockpit-target-spokes" d="M206 206L250 250 M350 350L394 394 M394 206L350 250 M250 350L206 394"/>
|
||||
<path d="M168 291H180V309H168 M432 291H420V309H432"/>
|
||||
<circle cx="206" cy="206" r="3"/><circle cx="394" cy="206" r="3"/>
|
||||
<circle cx="206" cy="394" r="3"/><circle cx="394" cy="394" r="3"/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div v-if="!orbital" class="cockpit-visor-shell" aria-hidden="true">
|
||||
<!-- A ship's bridge keeps no roll arc or pitch ladder. -->
|
||||
<div v-if="!bridge && !generic" class="cockpit-roll-arc">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { computed, onBeforeUnmount, onMounted, shallowRef } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { t } from '../../i18n/index.js';
|
||||
import { vClassToggle } from '../rail/classToggle.js';
|
||||
import { vFieldValue } from '../rail/fieldValue.js';
|
||||
@@ -18,23 +18,6 @@ const available = computed(() => view.value?.available !== false);
|
||||
const chip = computed(() => view.value?.chip ?? null);
|
||||
const dialog = computed(() => view.value?.dialog ?? { hidden: true, visible: false });
|
||||
|
||||
// Cyber puts the chip in the top toolbar; every other theme keeps it first in
|
||||
// the corner row, beside the language picker.
|
||||
const cyber = shallowRef(false);
|
||||
let themeObserver = null;
|
||||
onMounted(() => {
|
||||
const theme = document.documentElement;
|
||||
const sync = () => {
|
||||
cyber.value =
|
||||
theme.dataset.uiTheme === 'cyber' &&
|
||||
Boolean(document.getElementById('top-center-actions'));
|
||||
};
|
||||
themeObserver = new MutationObserver(sync);
|
||||
themeObserver.observe(theme, { attributes: true, attributeFilter: ['data-ui-theme'] });
|
||||
sync();
|
||||
});
|
||||
onBeforeUnmount(() => themeObserver?.disconnect());
|
||||
|
||||
// The status line is a live region; vStatusText re-announces repeats.
|
||||
const statusText = computed(() => ({
|
||||
text:
|
||||
@@ -55,12 +38,10 @@ const removeTitle = (title) =>
|
||||
<!-- Bottom-right HUD row: the POWER UP chip (while keys are missing) and
|
||||
the language picker, once the shell publishes it. -->
|
||||
<div id="corner-actions">
|
||||
<Teleport v-if="available" :to="cyber ? '#top-center-actions' : 'body'" :disabled="!cyber">
|
||||
<button id="key-setup-chip" type="button" :hidden="!chip || chip.hidden" aria-haspopup="dialog" aria-controls="key-setup" :title="chip?.title" :aria-label="chip?.title" @click="controls?.open()">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">bolt</span>
|
||||
<span data-key-setup-chip-label>{{ chip ? chip.label : t('POWER UP') }}</span>
|
||||
</button>
|
||||
</Teleport>
|
||||
<button v-if="available" id="key-setup-chip" type="button" :hidden="!chip || chip.hidden" aria-haspopup="dialog" aria-controls="key-setup" :title="chip?.title" :aria-label="chip?.title" @click="controls?.open()">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">bolt</span>
|
||||
<span data-key-setup-chip-label>{{ chip ? chip.label : t('POWER UP') }}</span>
|
||||
</button>
|
||||
<LocalePicker v-if="picker" :key="picker.current" :current="picker.current" :on-select="picker.onSelect" :focus="picker.focus" />
|
||||
</div>
|
||||
<aside v-if="available" id="key-setup" role="dialog" aria-labelledby="key-setup-title" aria-describedby="key-setup-description" :hidden="dialog.hidden" v-class-toggle="{ visible: dialog.visible }" :data-ready="view?.ready ? 'true' : undefined" @transitionend="controls?.transitionEnd()">
|
||||
|
||||
@@ -37,7 +37,7 @@ const pillWords = computed(() => ({
|
||||
}));
|
||||
const hud = computed(() => view.value?.hud ?? null);
|
||||
const sonar = computed(() => view.value?.sonar ?? null);
|
||||
const sonarOn = computed(() => sonar.value?.enabled ?? true);
|
||||
const sonarOn = computed(() => sonar.value?.enabled ?? false);
|
||||
const detection = computed(() => view.value?.detection ?? null);
|
||||
const detectButton = computed(() => detection.value?.button ?? null);
|
||||
const allocation = computed(() => detection.value?.allocation ?? 'ELASTIC');
|
||||
@@ -93,35 +93,34 @@ const allocationOptions = computed(() => [
|
||||
<UiSelect id="hud-layout-select" class="pp-select gev-field gev-field--compact" :model-value="hud?.variant ?? 'tactical'" @update:model-value="act('setHudLayout', $event)" :aria-label="t('HUD layout')">
|
||||
<option value="tactical">{{ t('Tactical') }}</option>
|
||||
<option value="minimal">{{ t('Minimal') }}</option>
|
||||
<option value="cyber">{{ t('Cyber') }}</option>
|
||||
</UiSelect>
|
||||
</div>
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-toggle-row" id="cyber-sonar-row">
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-toggle-row" :class="{ visible: hud?.visible }" id="cyber-sonar-row">
|
||||
<span class="pp-slider-mini-label">{{ t('Sonar') }}</span>
|
||||
<UiButton class="pp-mode-btn" :pressed="sonarOn" pressed-class="active" id="cyber-sonar-toggle" @click="act('toggleSonar')" :title="t('Cyber sonar contact scanner')" :aria-label="t('Cyber sonar contact scanner')">{{ sonarOn ? t('ON') : t('OFF') }}</UiButton>
|
||||
<UiButton class="pp-mode-btn" :pressed="sonarOn" pressed-class="active" id="cyber-sonar-toggle" @click="act('toggleSonar')" :title="t('Sonar contact scanner')" :aria-label="t('Sonar contact scanner')">{{ sonarOn ? t('ON') : t('OFF') }}</UiButton>
|
||||
</div>
|
||||
<output id="cyber-sonar-status" class="cyber-sonar-control" role="status"></output>
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" id="cyber-sonar-rings-row">
|
||||
<output id="cyber-sonar-status" class="cyber-sonar-control" role="status" :hidden="!(hud?.visible && sonarOn)"></output>
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" :class="{ visible: hud?.visible && sonarOn }" id="cyber-sonar-rings-row">
|
||||
<label class="pp-slider-mini-label" for="cyber-sonar-rings">{{ t('Rings') }}</label>
|
||||
<UiSlider class="pp-slider" id="cyber-sonar-rings" @update:model-value="act('setSonarRings', $event)" min="3" max="12" step="1" :model-value="sonar?.rings ?? 8" :aria-label="t('Sonar ring count')" />
|
||||
<span class="pp-slider-value" id="cyber-sonar-rings-value">{{ sonar?.rings ?? 8 }}</span>
|
||||
</div>
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" id="cyber-sonar-range-row">
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" :class="{ visible: hud?.visible && sonarOn }" id="cyber-sonar-range-row">
|
||||
<label class="pp-slider-mini-label" for="cyber-sonar-range">{{ t('Range') }}</label>
|
||||
<UiSlider class="pp-slider" id="cyber-sonar-range" @update:model-value="act('setSonarRange', $event)" min="60" max="120" step="1" :model-value="sonar?.range ?? 100" :aria-label="t('Sonar ring range')" />
|
||||
<span class="pp-slider-value" id="cyber-sonar-range-value">{{ pct(sonar?.range ?? 100) }}</span>
|
||||
</div>
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" id="cyber-sonar-intensity-row">
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" :class="{ visible: hud?.visible && sonarOn }" id="cyber-sonar-intensity-row">
|
||||
<label class="pp-slider-mini-label" for="cyber-sonar-intensity">{{ t('Power') }}</label>
|
||||
<UiSlider class="pp-slider" id="cyber-sonar-intensity" @update:model-value="act('setSonarIntensity', $event)" min="0" max="100" step="1" :model-value="sonar?.intensity ?? 70" :aria-label="t('Sonar intensity')" />
|
||||
<span class="pp-slider-value" id="cyber-sonar-intensity-value">{{ pct(sonar?.intensity ?? 70) }}</span>
|
||||
</div>
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" id="cyber-sonar-opacity-row">
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" :class="{ visible: hud?.visible && sonarOn }" id="cyber-sonar-opacity-row">
|
||||
<label class="pp-slider-mini-label" for="cyber-sonar-opacity">{{ t('Opacity') }}</label>
|
||||
<UiSlider class="pp-slider" id="cyber-sonar-opacity" @update:model-value="act('setSonarOpacity', $event)" min="35" max="100" step="1" :model-value="sonar?.opacity ?? 84" :aria-label="t('Cyber contact and label opacity')" :title="t('Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes')" />
|
||||
<UiSlider class="pp-slider" id="cyber-sonar-opacity" @update:model-value="act('setSonarOpacity', $event)" min="35" max="100" step="1" :model-value="sonar?.opacity ?? 84" :aria-label="t('Sonar contact and label opacity')" :title="t('Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes')" />
|
||||
<span class="pp-slider-value" id="cyber-sonar-opacity-value">{{ pct(sonar?.opacity ?? 84) }}</span>
|
||||
</div>
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" id="cyber-sonar-sector-row">
|
||||
<div class="pp-slider-row cyber-sonar-control cyber-sonar-setting" :class="{ visible: hud?.visible && sonarOn }" id="cyber-sonar-sector-row">
|
||||
<label class="pp-slider-mini-label" for="cyber-sonar-sector">{{ t('Sector') }}</label>
|
||||
<UiSlider class="pp-slider" id="cyber-sonar-sector" @update:model-value="act('setSonarSector', $event)" min="8" max="60" step="1" :model-value="sonar?.sector ?? 24" :aria-label="t('Sonar sector width')" />
|
||||
<span class="pp-slider-value" id="cyber-sonar-sector-value">{{ `${sonar?.sector ?? 24}°` }}</span>
|
||||
|
||||
@@ -13,7 +13,7 @@ const { mission: m, missionsLayer: layer } = storeToRefs(useContextStore());
|
||||
const root = ref(null);
|
||||
|
||||
// Each newly presented selection returns the Context panel to the top.
|
||||
const SCROLLER = ":root[data-ui-theme='cyber'] .cyber-panel-body, .global-context-panel-inner";
|
||||
const SCROLLER = '.global-context-panel-inner';
|
||||
watch(
|
||||
() => m.value?.scrollRequest,
|
||||
async (request) => {
|
||||
|
||||
+37
-76
@@ -48,7 +48,10 @@ import {
|
||||
readCyberSonarSettings,
|
||||
setCyberSonarEnabled,
|
||||
} from '../cyberSonar.js';
|
||||
import { cyberVisualDefaultsForHudTransition } from '../hudLayouts.js';
|
||||
import {
|
||||
isLegacySonarHudLayout,
|
||||
LEGACY_SONAR_HUD_LAYOUTS,
|
||||
} from '../hudLayouts.js';
|
||||
const DETECTION_ALLOCATION_STORAGE_KEY = 'gev:detection-allocation:v1';
|
||||
|
||||
/** Own visual preferences, detection overrides and display-control state. */
|
||||
@@ -119,7 +122,7 @@ export class VisualSettings {
|
||||
this._setSharpenIntensity(sharpenIntensity, { syncShare: false });
|
||||
if (typeof bloom === 'boolean') this._setBloomEnabled(bloom);
|
||||
if (typeof sharpen === 'boolean') this._setSharpenEnabled(sharpen);
|
||||
if (hudVariant) this._setHudVariant(hudVariant);
|
||||
if (hudVariant) this._setHudVariant(hudVariant, { restore: true });
|
||||
if (typeof hudVisible === 'boolean') {
|
||||
this.hud.setMode(hudVisible ? 'on' : 'off');
|
||||
this._updateHudButtonState();
|
||||
@@ -243,8 +246,6 @@ export class VisualSettings {
|
||||
this._scopeOpacityShown = null;
|
||||
this._celestialShown = null;
|
||||
this.activeStyle = 'normal';
|
||||
this._preCyberStyle = null;
|
||||
this._cyberStyleUserSelected = false;
|
||||
document.documentElement.dataset.gevStyle = this.activeStyle;
|
||||
this._detectionUserOverridden = false;
|
||||
this._cockpitVisionMode = 'optical';
|
||||
@@ -716,64 +717,27 @@ export class VisualSettings {
|
||||
this._syncShareState();
|
||||
}
|
||||
|
||||
_setHudVariant(variantName, { applyVisualDefaults = false } = {}) {
|
||||
/**
|
||||
* @param {string} variantName Layout, or the removed `cyber` layout.
|
||||
* @param {{restore?: boolean}} [options] A share link, scene or saved view
|
||||
* is authoritative for Sonar too: it is on only when the state names
|
||||
* Cyber. Other callers leave Sonar as the viewer set it.
|
||||
*/
|
||||
_setHudVariant(variantName, { restore = false } = {}) {
|
||||
if (!variantName) return;
|
||||
const previousVariant = this.hud.getVariant();
|
||||
// Cyber was removed; its sonar became a visual style. A state that names
|
||||
// Cyber opens in Tactical with Sonar on.
|
||||
const sonar = isLegacySonarHudLayout(variantName);
|
||||
if (sonar || (restore && isCyberSonarEnabled()))
|
||||
this._setCyberSonarEnabled(sonar);
|
||||
this.hud.setVariant(variantName);
|
||||
const nextVariant = this.hud.getVariant();
|
||||
const enteredCyber = previousVariant !== 'cyber' && nextVariant === 'cyber';
|
||||
const leftCyber = previousVariant === 'cyber' && nextVariant !== 'cyber';
|
||||
if (!applyVisualDefaults) {
|
||||
// Scene/share/programmatic state is authoritative even when it reapplies
|
||||
// the current Cyber variant. Do not let an older explicit entry restore
|
||||
// stale local preset memory on the next user-selected exit.
|
||||
this._preCyberStyle = null;
|
||||
this._cyberStyleUserSelected = false;
|
||||
} else if (enteredCyber) {
|
||||
this._preCyberStyle = this.activeStyle;
|
||||
this._cyberStyleUserSelected = false;
|
||||
}
|
||||
this._hudVariantShown = nextVariant;
|
||||
this._hudVariantShown = this.hud.getVariant();
|
||||
this._publishDisplay();
|
||||
const visualDefaults = cyberVisualDefaultsForHudTransition(
|
||||
previousVariant,
|
||||
nextVariant,
|
||||
{ explicit: applyVisualDefaults },
|
||||
);
|
||||
if (visualDefaults) this._applyCyberVisualDefaults(visualDefaults);
|
||||
if (leftCyber) {
|
||||
const restoreStyle =
|
||||
applyVisualDefaults && !this._cyberStyleUserSelected
|
||||
? this._preCyberStyle
|
||||
: null;
|
||||
this._preCyberStyle = null;
|
||||
this._cyberStyleUserSelected = false;
|
||||
if (restoreStyle && restoreStyle !== this.activeStyle) {
|
||||
this.setStyle(restoreStyle, {
|
||||
applyPreset: false,
|
||||
revealParameters: false,
|
||||
preserveCyberRestore: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
this._syncCyberSonarControl();
|
||||
this._syncShareState();
|
||||
this._scheduleAdaptivePanelLayout({ settle: true });
|
||||
}
|
||||
|
||||
_applyCyberVisualDefaults({ style, ironbow }) {
|
||||
this.setStyle(style, {
|
||||
applyPreset: false,
|
||||
revealParameters: false,
|
||||
preserveCyberRestore: true,
|
||||
});
|
||||
const thermalUniforms = this.stages?.thermal?.uniforms;
|
||||
if (!thermalUniforms || thermalUniforms.palette === undefined) return;
|
||||
thermalUniforms.palette = ironbow;
|
||||
this._updateSliderPanel('thermal', { reveal: false });
|
||||
this.services.governorRequestRender('cyber-visual-defaults');
|
||||
}
|
||||
|
||||
_syncCyberSonarControl() {
|
||||
const settings = applyCyberSonarSettings(readCyberSonarSettings());
|
||||
this._sonarShown = {
|
||||
@@ -791,9 +755,22 @@ export class VisualSettings {
|
||||
const next = setCyberSonarEnabled(!!enabled);
|
||||
this._syncCyberSonarControl();
|
||||
this.services.governorRequestRender('cyber-sonar-toggle');
|
||||
this._syncShareState();
|
||||
return next;
|
||||
}
|
||||
|
||||
/**
|
||||
* The HUD layout a share link or scene shot records. Tactical with Sonar on
|
||||
* is written as the retired Cyber code, which restores exactly that; Minimal
|
||||
* has no such code, so its Sonar stays local.
|
||||
*/
|
||||
_sharedHudVariant() {
|
||||
const variant = this.hud.getVariant();
|
||||
return variant === 'tactical' && isCyberSonarEnabled()
|
||||
? LEGACY_SONAR_HUD_LAYOUTS[0]
|
||||
: variant;
|
||||
}
|
||||
|
||||
_setCyberSonarSetting(name, value) {
|
||||
const settings = readCyberSonarSettings();
|
||||
if (!Object.hasOwn(settings, name)) return settings;
|
||||
@@ -838,9 +815,7 @@ export class VisualSettings {
|
||||
this._setSharpenEnabled(sharpenInput.enabled);
|
||||
}
|
||||
|
||||
// Cyber is an explicit shell choice, independent of the imagery filter.
|
||||
// Scene/share restoration still applies its own HUD through _setHudVariant.
|
||||
if (preset.hudVariant && this.hud.getVariant() !== 'cyber') {
|
||||
if (preset.hudVariant) {
|
||||
this._setHudVariant(preset.hudVariant);
|
||||
}
|
||||
if (typeof preset.hudVisible === 'boolean') {
|
||||
@@ -865,8 +840,8 @@ export class VisualSettings {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{keepHudVariant?: boolean}} [options] `keepHudVariant` leaves the
|
||||
* HUD layout to the style, as choosing a style does (Visual's reset).
|
||||
* @param {{keepHudVariant?: boolean}} [options] `keepHudVariant` keeps the
|
||||
* current HUD layout (Visual's reset).
|
||||
*/
|
||||
_applyGlobalPostDefaults({ keepHudVariant = false } = {}) {
|
||||
const defaults = GLOBAL_POST_DEFAULTS;
|
||||
@@ -943,7 +918,7 @@ export class VisualSettings {
|
||||
bloomIntensity: this._getBloomIntensity(),
|
||||
bloomVersion: BLOOM_SCALE_VERSION,
|
||||
sharpenIntensity: this._sharpenPct,
|
||||
hudVariant: this.hud.getVariant(),
|
||||
hudVariant: this._sharedHudVariant(),
|
||||
hudVisible: this.hud.visible,
|
||||
detectionMode: detection.mode,
|
||||
detectionDensity: detection.densityPct,
|
||||
@@ -1261,7 +1236,7 @@ export class VisualSettings {
|
||||
},
|
||||
hud: {
|
||||
visible: this.hud.visible,
|
||||
variant: this.hud.getVariant(),
|
||||
variant: this._sharedHudVariant(),
|
||||
},
|
||||
detection: {
|
||||
mode: getDetectionMode(),
|
||||
@@ -1309,7 +1284,7 @@ export class VisualSettings {
|
||||
|
||||
const hudState = state.hud || {};
|
||||
if (hudState.variant) {
|
||||
this._setHudVariant(hudState.variant);
|
||||
this._setHudVariant(hudState.variant, { restore: true });
|
||||
}
|
||||
if (typeof hudState.visible === 'boolean') {
|
||||
this.hud.setMode(hudState.visible ? 'on' : 'off');
|
||||
@@ -1527,8 +1502,6 @@ export class VisualSettings {
|
||||
applyPreset = true,
|
||||
revealParameters = applyPreset,
|
||||
restore = false,
|
||||
userInitiated = false,
|
||||
preserveCyberRestore = false,
|
||||
} = {},
|
||||
) {
|
||||
if (
|
||||
@@ -1538,18 +1511,6 @@ export class VisualSettings {
|
||||
return;
|
||||
const { setDetectionStyle } = this.services;
|
||||
if (!restore) this.shareLinkManager?.claimRestoreLane?.('visual');
|
||||
if (this.hud.getVariant() === 'cyber') {
|
||||
if (userInitiated) {
|
||||
// A direct preset choice owns the active style even when it selects the
|
||||
// same value as Cyber's automatic FLIR default.
|
||||
this._cyberStyleUserSelected = true;
|
||||
} else if (!preserveCyberRestore) {
|
||||
// Scene/share/reset state is authoritative and must not be overwritten
|
||||
// by a remembered local Cyber entry when the user later exits.
|
||||
this._preCyberStyle = null;
|
||||
this._cyberStyleUserSelected = false;
|
||||
}
|
||||
}
|
||||
if (styleName === this.activeStyle) {
|
||||
if (revealParameters && styleName !== 'normal')
|
||||
this._revealStyleParameters();
|
||||
|
||||
@@ -60,7 +60,9 @@ test('the complete Realtime tool payload pins the manifest-generated layer relea
|
||||
// absolute with its -45 default, with steps sent as a direction.
|
||||
// show_street_level (map, source, photo) adds one tool.
|
||||
// open_stories adds the Stories Explore entry action.
|
||||
'5a2deb65bef5db8fa49ee55dd66efb884e7c3ba97dbdcaad3fada087170d2225',
|
||||
// The Cyber HUD layout leaves set_hud's layout enum (its sonar is a
|
||||
// visual style; set_cyber_sonar is excluded above).
|
||||
'97f78bc5e66d757da87333c515ebdbf5c2a6908156b3e676e9c2ca45e9b5e4f3',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -227,9 +229,9 @@ test('all legacy action arguments are byte-identical after removing the delibera
|
||||
delete center.properties[axis].minimum;
|
||||
delete center.properties[axis].maximum;
|
||||
}
|
||||
// Cyber adds one HUD layout and Operator was retired.
|
||||
// Operator and then Cyber were retired.
|
||||
const hud = property('set_hud').layout;
|
||||
assert.deepEqual(hud.enum, ['tactical', 'minimal', 'cyber']);
|
||||
assert.deepEqual(hud.enum, ['tactical', 'minimal']);
|
||||
hud.enum = ['tactical', 'operator', 'minimal'];
|
||||
// Snow is retired from set_visual_style; restore it to keep the legacy pin.
|
||||
const visualStyle = legacy.find((tool) => tool.name === 'set_visual_style')
|
||||
|
||||
@@ -1604,7 +1604,7 @@ export function createGevActionRunner({
|
||||
return {
|
||||
ok: false,
|
||||
action: 'set_cyber_sonar',
|
||||
error: 'Cyber sonar controls are unavailable.',
|
||||
error: 'Sonar controls are unavailable.',
|
||||
};
|
||||
}
|
||||
return { action: 'set_cyber_sonar', ...styleManager.setCyberSonar(args) };
|
||||
|
||||
+1
-1
@@ -1066,7 +1066,7 @@ const STEP_TITLES = Object.freeze({
|
||||
control_cockpit: msg('Control cockpit'),
|
||||
set_visual_style: msg('Change visual style'),
|
||||
set_hud: msg('Adjust HUD'),
|
||||
set_cyber_sonar: msg('Adjust cyber sonar'),
|
||||
set_cyber_sonar: msg('Adjust sonar'),
|
||||
set_detection: msg('Adjust detection overlay'),
|
||||
set_map_stack: msg('Change map stack'),
|
||||
set_post_processing: msg('Adjust post-processing'),
|
||||
|
||||
Reference in new issue
Block a user