Add localization support, add drink icons in list, fix display error for out-of-stock favourites, fix low-res profile picture

This commit is contained in:
2025-04-23 22:35:46 +02:00
parent 5121d14b55
commit d6af1a7438
12 changed files with 674 additions and 71 deletions
+5 -5
View File
@@ -52,14 +52,14 @@ struct ContentView: View {
NavigationView {
List() {
// Drinks
Section("Favourites") {
Section(String(localized: "FAVOURITES")) {
ForEach(favouriteDrinks) { drink in
NavigationLink(drink.name) {
DrinkDetailView(wcMgr: wcMgr, drink: drink)
}
}
}
Section("Drinks") {
Section(String(localized: "DRINKS")) {
ForEach(availableDrinks) { drink in
NavigationLink(drink.name) {
DrinkDetailView(wcMgr: wcMgr, drink: drink)
@@ -69,7 +69,7 @@ struct ContentView: View {
// Controls
Section {
Button("Refresh") {
Button(String(localized: "REFRESH")) {
favouriteDrinks = []
availableDrinks = []
update()
@@ -83,9 +83,9 @@ struct ContentView: View {
}
.onAppear(perform: update)
// Alert to communicate an error in communication with the paired device
.alert("Connection Error", isPresented: $showUpdateError) {
.alert(String(localized: "CONNECTION_ERROR"), isPresented: $showUpdateError) {
Text(updateError).tint(.red).font(.footnote)
Button("Retry", systemImage: "arrow.clockwise", action: update)
Button(String(localized: "RETRY"), systemImage: "arrow.clockwise", action: update)
}
}
}