fix(location): correct UI layout and translation keys
Resolve vertical text rendering issue by using Modifier.weight(1f) in ConfigSelector. Add proper translation keys to the 'better_location' block in en_US.json so they are accessible to BetterLocationRoot. Update key references to match the new structure. - Add keys: location_search_provider_title, google_maps_api_key_title, option_osm, option_google_maps. - Fix UI layout to handle text wrapping properly.
This commit is contained in:
@@ -427,9 +427,13 @@ class BetterLocationRoot : Routes.Route() {
|
|||||||
.padding(horizontal = 16.dp, vertical = 12.dp),
|
.padding(horizontal = 16.dp, vertical = 12.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Text(text = text)
|
Text(text = text, modifier = Modifier.weight(1f))
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Text(
|
||||||
Text(text = value, color = PurrfectPalette.textSecondary, fontSize = 14.sp)
|
text = value,
|
||||||
|
color = PurrfectPalette.textSecondary,
|
||||||
|
fontSize = 14.sp,
|
||||||
|
modifier = Modifier.padding(start = 8.dp)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,13 +444,13 @@ class BetterLocationRoot : Routes.Route() {
|
|||||||
|
|
||||||
val currentProvider = context.config.root.global.betterLocation.locationSearchProvider.get()
|
val currentProvider = context.config.root.global.betterLocation.locationSearchProvider.get()
|
||||||
ConfigSelector(
|
ConfigSelector(
|
||||||
text = translation["properties.location_search_provider.name"],
|
text = translation["location_search_provider_title"],
|
||||||
value = context.translation["options.location_search_provider.$currentProvider"]
|
value = translation["option_$currentProvider"]
|
||||||
) { showProviderDialog = true }
|
) { showProviderDialog = true }
|
||||||
|
|
||||||
if (currentProvider == "google_maps") {
|
if (currentProvider == "google_maps") {
|
||||||
ConfigInput(
|
ConfigInput(
|
||||||
text = translation["properties.google_maps_api_key.name"],
|
text = translation["google_maps_api_key_title"],
|
||||||
value = context.config.root.global.betterLocation.googleMapsApiKey.get()
|
value = context.config.root.global.betterLocation.googleMapsApiKey.get()
|
||||||
) { showApiKeyDialog = true }
|
) { showApiKeyDialog = true }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -444,7 +444,11 @@
|
|||||||
"no_friends_map": "No friends on the map",
|
"no_friends_map": "No friends on the map",
|
||||||
"no_friends_found": "No friends found",
|
"no_friends_found": "No friends found",
|
||||||
"include_saved_locations": "Include Saved Locations",
|
"include_saved_locations": "Include Saved Locations",
|
||||||
"include_saved_locations_description": "Export your saved location coordinates"
|
"include_saved_locations_description": "Export your saved location coordinates",
|
||||||
|
"location_search_provider_title": "Location Search Provider",
|
||||||
|
"google_maps_api_key_title": "Google Maps API Key",
|
||||||
|
"option_osm": "OpenStreetMap (Free)",
|
||||||
|
"option_google_maps": "Google Maps"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dialogs": {
|
"dialogs": {
|
||||||
|
|||||||
Reference in New Issue
Block a user