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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user