mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(street-level): links keep the recipient's preferences; aim under the screen centre
Review fixes for gekh's #1113 round: - a link runs show_street_level with origin 'programmatic', so its source switch and layer are not saved as the recipient's preferences; - with no place named, the action looks under the screen centre (aim 'screen-centre', armed false), keeps the sky refusal and leaves a link's armed point alone; - an armed OPEN aimed at the sky opens nothing instead of the far link point; - an imagery-stage failure is spoken as an error, missing imagery as missing (street.nearestOutcome); the card says "the view centre" in the interface language; - every photo the action opens reveals its panel, and revealPanel scrolls the panel into view in the phone sheet; - embed: EXPAND survives embed's own clean view, the lifted photo hides in cockpit, recording and scene playback, and a failed photo step closes the earlier photo before the view flies; - links pasted into an open tab run their street-level step after the restore settles; a superseded start link does not; - Mapillary's nearest search gives up after 12 s, body included.
This commit is contained in:
1 parent
3f55077c2c
commit
451f3e41cf
22 files changed
+716
-64
No files matched your search
+13
-4
@@ -626,7 +626,11 @@ function showStreetLevel(result) {
|
||||
const shownSource = result?.providerName
|
||||
? spokenLabel(result.providerName)
|
||||
: t('Street Level');
|
||||
const shown = spokenLabel(localizePlaceName(result?.label || '')) || place;
|
||||
// The view centre is a phrase, not a place name: the card says it in the
|
||||
// interface language.
|
||||
const shown = result?.atViewCentre
|
||||
? t('the view centre')
|
||||
: spokenLabel(localizePlaceName(result?.label || '')) || place;
|
||||
if (result?.cancelled) return null;
|
||||
if (!result?.ok) {
|
||||
let say;
|
||||
@@ -640,10 +644,15 @@ function showStreetLevel(result) {
|
||||
else if (result?.stage === 'layer') say = "Couldn't turn on Street Level.";
|
||||
else if (result?.stage === 'view')
|
||||
say = 'Street-level photos are hidden in this view. Leave it first.';
|
||||
else if (result?.stage === 'imagery' && result?.aim === 'sky')
|
||||
say = 'Aim the middle of the view at a street first.';
|
||||
else if (result?.stage === 'imagery' && result?.filter?.label)
|
||||
say = `No ${source} imagery near ${place} with the ${result.filter.label} on.`;
|
||||
else if (result?.stage === 'imagery' && result?.noImagery === true)
|
||||
say = `No ${source} imagery near ${place}.`;
|
||||
// A service or viewer failure is not missing coverage.
|
||||
else if (result?.stage === 'imagery')
|
||||
say = result?.filter?.label
|
||||
? `No ${source} imagery near ${place} with the ${result.filter.label} on.`
|
||||
: `No ${source} imagery near ${place}.`;
|
||||
say = `${source} could not open imagery near ${place}.`;
|
||||
else say = `Couldn't open ${source}.`;
|
||||
return {
|
||||
say,
|
||||
|
||||
Reference in new issue
Block a user