mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
Bring Contacts, Space Missions and Radio back into Context
The Context panel's main tab shows the mode row again, with Contacts (nearby sites search, the TR-3B toggle and the Awareness list) and Space Missions (the roster and launch replay); only the Properties tab hides them. Radio shows while its layer is on, and turning Radio or Launches on opens Context. When Contacts follows the aircraft the card shows, its list sits inside the card in a compact form and the card leaves out the flights and vessels Contacts already lists. The card's Enter Cockpit replaces the Contacts button, and leaving the cockpit returns focus to it. Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
1 parent
6e03871d5a
commit
1ce7e51c22
10 files changed
+109
-43
No files matched your search
@@ -1142,12 +1142,19 @@ export function nearbyEntities(
|
||||
* @param {number} [options.radiusKm]
|
||||
* @param {number} [options.limit] Rows per group.
|
||||
* @param {string} [options.excludeKey] A record to leave out (the selected one).
|
||||
* @param {string[]} [options.excludeLayers] Layers already presented by another section.
|
||||
* @returns {{flights: {count: number, items: Array<object>}, vessels: {count: number, items: Array<object>}, other: Array<object>}}
|
||||
*/
|
||||
export function nearbyByKind(
|
||||
dataManager,
|
||||
here,
|
||||
{ radiusKm = 250, limit = 4, excludeKey = '', query = '' } = {},
|
||||
{
|
||||
radiusKm = 250,
|
||||
limit = 4,
|
||||
excludeKey = '',
|
||||
excludeLayers = [],
|
||||
query = '',
|
||||
} = {},
|
||||
) {
|
||||
const needle = text(query).toLowerCase();
|
||||
const groups = {
|
||||
@@ -1160,6 +1167,7 @@ export function nearbyByKind(
|
||||
const found = { aircraft: [], vessel: [] };
|
||||
const other = [];
|
||||
for (const layer of enabledLayers(dataManager)) {
|
||||
if (excludeLayers.includes(layer.id)) continue;
|
||||
const kind = entityKind(layer.id).kind;
|
||||
const group = found[kind];
|
||||
let closest = null;
|
||||
|
||||
@@ -1370,8 +1370,9 @@ test('a cached Context subject re-reads its label when enrichment lands after se
|
||||
/N123AB/,
|
||||
'the rendered Context panel must show the registration without a position change',
|
||||
);
|
||||
// `subjectIdentity` is the subject's id for matching, never shown.
|
||||
assert.doesNotMatch(
|
||||
JSON.stringify(repainted.view),
|
||||
JSON.stringify({ ...repainted.view, subjectIdentity: undefined }),
|
||||
/ae1fa4/,
|
||||
'the hex must be gone from the panel',
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user