mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(voice): localize the area, imagery and OSM cards and tidy OSM Places
From review: - Card lines the actions write in English (area basis, part counts, merged duplicates, OSM caveats, the imagery window) are shown in the UI language through the analyst card's note path; the model still gets the English. One OSM place reads "1 hospital". - Same-named clarification choices show their region code (WA, DC). - OSM Places shows as unavailable once the server says no Overpass is configured, and its points are depth-tested past 2.5 km so they never show through the globe. - find_imagery puts the operator's sources and mode back when a box is refused, and a voice search cancelled mid-flight leaves "Search cancelled" instead of an empty strip. - The README lists OSM Places with the other Utilities.
This commit is contained in:
1 parent
34647758fc
commit
40d8839589
22 files changed
+535
-27
No files matched your search
@@ -47,6 +47,8 @@ function fakeLayer({
|
||||
pins: { a: { key: null } },
|
||||
shown: { a: null },
|
||||
notes: [],
|
||||
sources: { hls: false, viirs: true },
|
||||
mode: 'basemap',
|
||||
};
|
||||
const listeners = new Set();
|
||||
const calls = [];
|
||||
@@ -92,9 +94,11 @@ function fakeLayer({
|
||||
},
|
||||
setSources(sources) {
|
||||
calls.push(['setSources', sources]);
|
||||
set({ sources: { ...sources } });
|
||||
},
|
||||
setMode(mode) {
|
||||
calls.push(['setMode', mode]);
|
||||
set({ mode });
|
||||
},
|
||||
setAssignment(slot, key) {
|
||||
calls.push(['setAssignment', slot, key]);
|
||||
@@ -271,6 +275,15 @@ test('a box the layer refuses is refused with its reason, and the layer is turne
|
||||
assert.deepEqual(toggles, [true]);
|
||||
});
|
||||
|
||||
test('a refused box leaves the operator panel sources and mode as they were', async () => {
|
||||
const layer = fakeLayer({ refuse: 'Box is 1,200 km wide · limit 1,000 km' });
|
||||
const result = await findImagery(deps(layer).value, {});
|
||||
assert.equal(result.code, 'BOX_REFUSED');
|
||||
const snap = layer.getSnapshot();
|
||||
assert.deepEqual(snap.sources, { hls: false, viirs: true });
|
||||
assert.equal(snap.mode, 'basemap');
|
||||
});
|
||||
|
||||
test('a superseded search is cancelled before anything is pinned', async () => {
|
||||
const layer = fakeLayer();
|
||||
let current = true;
|
||||
|
||||
Reference in new issue
Block a user