Add default fallback city (fixes #199), add beginning of UpdateService

Weather: always fallback to "Tokyo" if the city name is empty
UpdateService: simple versioning control
This commit is contained in:
Ly-sec 2025-09-03 13:37:24 +02:00
parent 7141a91994
commit c6e56d4264
6 changed files with 46 additions and 29 deletions

View file

@ -37,8 +37,10 @@ NBox {
spacing: Style.marginXXS * scaling
NText {
text: {
// Use the location name or fallback to default if empty
const locationName = Settings.data.location.name || "Tokyo"
// Ensure the name is not too long if one had to specify the country
const chunks = Settings.data.location.name.split(",")
const chunks = locationName.split(",")
return chunks[0]
}
font.pointSize: Style.fontSizeL * scaling