main
Laurent 3 years ago
parent 32bd299739
commit b42e494ac5
  1. 20
      LeCountdown/Views/ContentView.swift
  2. 1
      LeCountdown/fr.lproj/Localizable.strings

@ -65,6 +65,10 @@ struct ContentView<T : AbstractTimer>: View {
var body: some View {
let columns: [GridItem] = self._columns()
let timers: [AbstractTimer] = Array(self.timers)
Group {
if timers.count > 0 {
GeometryReader { reader in
let width: CGFloat = reader.size.width / CGFloat(columns.count) - 15.0
@ -78,7 +82,7 @@ struct ContentView<T : AbstractTimer>: View {
spacing: itemSpacing
) {
ReorderableForEach(items: Array(self.timers)) { timer in
ReorderableForEach(items: timers) { timer in
DialView(timer: timer, isEditingBinding: self.$isEditing, frameSize: width, handler: { id in
self._handleSiriTips(timerId: id)
@ -121,6 +125,10 @@ struct ContentView<T : AbstractTimer>: View {
}
}
}
} else {
Text("You'll find your timers here. Start by creating them on the left screen")
}
}
.navigationTitle("Home")
.alert(boringContext.error?.localizedDescription ?? "missing error", isPresented: $boringContext.showDefaultAlert) {
Button("OK", role: .cancel) { }
@ -133,15 +141,6 @@ struct ContentView<T : AbstractTimer>: View {
// .environment(\.managedObjectContext, viewContext)
})
.toolbar {
// ToolbarItem(placement: .navigationBarTrailing) {
// Button {
// self.boringContext.isShowingNewData = true
// } label: {
// HStack {
// Image(systemName: "plus")
// }
// }
// }
ToolbarItem(placement: .navigationBarTrailing) {
Button {
withAnimation {
@ -154,7 +153,6 @@ struct ContentView<T : AbstractTimer>: View {
}
.onAppear {
self._askPermissions()
// self.showLiveTimersSheet = !conductor.liveTimers.isEmpty
}
.onOpenURL { url in
self._performActionIfPossible(url: url)

@ -247,3 +247,4 @@
"Timer %@ started" = "Le minuteur %@ a démarré";
"The timer has not been found in the app" = "Le minuteur n'a pas été trouvé dans l'app";
"In-app purchase disabled" = "Les achats in-app sont désactivés. Veuillez les activer si vous souhaitez vous abonner";
"You'll find your timers here. Start by creating them on the left screen" = "Vous retrouverez vos minuteurs ici. Commencez par en créer dans l'écran de gauche";

Loading…
Cancel
Save