mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 05:56:53 +00:00
fix(mobile,map): long toasts wrap and http selfhosts get the right geolocation message (#2095)
The phone toast was a single truncated pill, which cut the denied message exactly before the settings hint it exists for; long messages wrap up to four lines now. An insecure context is reported as its own error instead of masquerading as a blocked device permission.
This commit is contained in:
@@ -17,11 +17,14 @@ interface Props {
|
||||
// The raw error string from the browser is unlocalized WebKit English, so the
|
||||
// user-facing message is looked up from the typed code instead. 'unsupported'
|
||||
// shares the generic text: a browser without geolocation cannot locate you.
|
||||
// 'insecure-context' borrows the journal editor's wording, which already says
|
||||
// exactly this in all locales.
|
||||
const ERROR_KEYS: Record<GeoWatchErrorCode, string> = {
|
||||
'permission-denied': 'map.location.denied',
|
||||
'unavailable': 'map.location.unavailable',
|
||||
'timeout': 'map.location.timeout',
|
||||
'unsupported': 'map.location.unavailable',
|
||||
'insecure-context': 'journey.editor.locationInsecureContext',
|
||||
}
|
||||
|
||||
// Three-state FAB. Matches the Apple/Google Maps pattern:
|
||||
|
||||
Reference in New Issue
Block a user