mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
Voice Cockpit entry no longer switches Contacts on (#1889)
* fix(voice): voice Cockpit entry no longer turns Contacts on Voice entry now changes no Context mode or detection setting, as the COCKPIT button does not. An entry that names a layer or class searches that layer's own aircraft, nearest first from the followed aircraft or the ground under the camera, and follows the nearest match before entering; the followed aircraft counts when it matches. A military request while Military Flights is off switches that layer on as a plain layer. The class filter is shared with Contacts navigation. * fix(voice): a military Cockpit entry waits for the layer's first data and leaves no layer behind A military entry that switched Military Flights on waits for that layer to report its first data before searching it, bounded by that update, the layer failing or going off, and the request's cancellation. If entry then fails, the layer is switched off again; a layer that was already on stays on. The search covers only the aircraft the person's filters show. * Add the changelog entry
This commit is contained in:
1 parent
5608b12a25
commit
fbbe6cd91f
9 files changed
+568
-384
No files matched your search
@@ -1165,7 +1165,10 @@ test('mobile Cockpit prioritizes flight instruments and collision-safe controls'
|
||||
mobileCockpit[1],
|
||||
/@media \(min-width: 390px\) and \(min-height: 240px\),\s*\(min-height: 450px\) \{\s*body\.cockpit-mode\.mobile-shell/,
|
||||
);
|
||||
assert.match(css, /\.cockpit-visor-shell \{[^}]*?inset:\s*var\(--cockpit-visor-top\)/);
|
||||
assert.match(
|
||||
css,
|
||||
/\.cockpit-visor-shell \{[^}]*?inset:\s*var\(--cockpit-visor-top\)/,
|
||||
);
|
||||
assert.match(
|
||||
mobileCockpit[1],
|
||||
/body\.cockpit-mode \.cockpit-utility-control\.is-expanded[\s\S]*?top:\s*96px;/,
|
||||
@@ -1185,8 +1188,14 @@ test('mobile Cockpit prioritizes flight instruments and collision-safe controls'
|
||||
});
|
||||
|
||||
test('the unread Stories announcement waits until Cockpit closes', () => {
|
||||
assert.match(css, /body\.cockpit-mode #gev-stories #hPop \{\s*display:\s*none;\s*\}/);
|
||||
const storiesView = fs.readFileSync(path.join(ROOT, 'src', 'ui', 'views', 'StoriesView.vue'), 'utf8');
|
||||
assert.match(
|
||||
css,
|
||||
/body\.cockpit-mode #gev-stories #hPop \{\s*display:\s*none;\s*\}/,
|
||||
);
|
||||
const storiesView = fs.readFileSync(
|
||||
path.join(ROOT, 'src', 'ui', 'views', 'StoriesView.vue'),
|
||||
'utf8',
|
||||
);
|
||||
assert.match(
|
||||
storiesView,
|
||||
/async function openExplore\(\) \{[^}]*?if \(await store\.controller\.open\(\)\) markPopSeen\(\);/,
|
||||
@@ -1374,12 +1383,17 @@ test('voice Cockpit entry honours a requested contact layer before it enters', (
|
||||
|
||||
const retarget = ui.slice(
|
||||
ui.indexOf(' _retargetCockpitEntryLayer({'),
|
||||
ui.indexOf(' * Controls cockpit entry/exit and context navigation.'),
|
||||
ui.indexOf(' controlCockpit(\n'),
|
||||
);
|
||||
assert.match(
|
||||
retarget,
|
||||
/militaryAwarenessLayer\.navigateNext\(\{\s*targetLayer,\s*aircraftClass,\s*origin: 'voice',\s*\}\)/,
|
||||
'retargeting reuses filtered navigation with durable voice selection authority',
|
||||
/layer\.trackById\?\.\(match\.icao24, \{ origin: 'voice' \}\)/,
|
||||
'retargeting follows the match with durable voice selection authority',
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
retarget,
|
||||
/militaryAwarenessLayer/,
|
||||
'retargeting needs nothing from Contacts',
|
||||
);
|
||||
assert.match(
|
||||
retarget,
|
||||
|
||||
Reference in new issue
Block a user