Removes beta disclaimer

main
Laurent 2 years ago
parent 445e77a6e5
commit 2962e914f4
  1. 25
      LeCountdown/Views/ContentView.swift
  2. 25
      LeCountdown/Views/TimersView.swift
  3. 1
      LeCountdown/en.lproj/Localizable.strings
  4. 1
      LeCountdown/fr.lproj/Localizable.strings

@ -23,6 +23,7 @@ struct ContentView<T : AbstractTimer>: View {
@State private var siriTipShown: Bool = false
@State var showAddSheet: Bool = false
@State private var showSettingsSheet: Bool = false
@State private var showStatsSheet: Bool = false
@State private var showSubscriptionSheet: Bool = false
@ -42,6 +43,7 @@ struct ContentView<T : AbstractTimer>: View {
TimersView(isEditing: self.$isEditing,
showSubscriptionSheet: self.$showSubscriptionSheet,
showAddSheet: self.$showAddSheet,
siriHandler: { timer in
self._handleSiriTips(timer: timer)
})
@ -80,7 +82,7 @@ struct ContentView<T : AbstractTimer>: View {
.sheet(isPresented: self.$boringContext.isShowingNewData, content: {
})
.toolbar {
MainToolbarView(isEditing: self.$isEditing)
MainToolbarView(isEditing: self.$isEditing, showAddSheet: self.$showAddSheet)
}
.onAppear {
self.showTip = Preferences.tipToShow
@ -136,7 +138,6 @@ struct ContentView<T : AbstractTimer>: View {
}
}
}
}
} else {
@ -150,10 +151,10 @@ struct ContentView<T : AbstractTimer>: View {
struct MainToolbarView: ToolbarContent {
@Binding var isEditing: Bool
@Binding var showAddSheet: Bool
@State var showSettingsSheet: Bool = false
@State var showStatsSheet: Bool = false
@State var showAddSheet: Bool = false
@FetchRequest(
sortDescriptors: [NSSortDescriptor(keyPath: \AbstractTimer.order, ascending: true)],
@ -176,20 +177,6 @@ struct MainToolbarView: ToolbarContent {
}
}
ToolbarItemGroup(placement: .navigationBarTrailing) {
// if !self.records.isEmpty {
// Button {
// withAnimation {
// self.showStatsSheet.toggle()
// }
// } label: {
// Image(systemName: "scroll")
// }
// .sheet(isPresented: self.$showStatsSheet, content: {
// NavigationStack {
// ActivitiesView()
// }
// })
// }
if !self.timers.isEmpty {
Button {
withAnimation {
@ -263,7 +250,7 @@ struct Toolbar_Previews: PreviewProvider {
}
.navigationTitle("Title")
.toolbar {
MainToolbarView(isEditing: .constant(false))
MainToolbarView(isEditing: .constant(false), showAddSheet: .constant(false))
}
}
}

@ -15,6 +15,7 @@ struct TimersView: View {
@Binding var isEditing: Bool
@Binding var showSubscriptionSheet: Bool
@Binding var showAddSheet: Bool
var siriHandler: ((AbstractTimer) -> ())
@ -67,10 +68,13 @@ struct TimersView: View {
}
.padding(.horizontal, itemSpacing)
} else {
Text("Disclaimer")
.monospaced()
.padding(32.0)
.multilineTextAlignment(.center)
Button {
self.showAddSheet = true
} label: {
AddButtonView().frame(width: 180.0)
}
}
}
@ -116,8 +120,19 @@ struct TimersView: View {
}
struct AddButtonView: View {
var body: some View {
VStack(spacing: 8.0) {
Image(systemName: "plus.circle").font(.system(size: 60.0))
Text("Create your first timer or stopwatch!")
}
}
}
struct TimersView_Previews: PreviewProvider {
static var previews: some View {
TimersView(isEditing: .constant(false), showSubscriptionSheet: .constant(false), siriHandler: { _ in })
TimersView(isEditing: .constant(false), showSubscriptionSheet: .constant(false), showAddSheet: .constant(false), siriHandler: { _ in })
AddButtonView()
}
}

@ -2,3 +2,4 @@
"Disclaimer" = "This is a beta version of Enchant.\n\nPlease don't depend on the app for critical events :)\n\n If you have some feedback or an issue, please tell me about it through the settings or within Testflight!";
"Widget Tip" = "Quickly launch your timers with widgets. You can add them by modifying your home or lock screen.";
"Play confirmation sound" = "Play sound on start";
"Create your first timer or stopwatch!" = "Create your first timer or stopwatch!";

@ -286,3 +286,4 @@
"Select and launch your timers" = "Choisissez vos raccourcis";
"Create your own timer" = "Créer un minuteur";
"Create your own stopwatch" = "Créer un chronomètre";
"Create your first timer or stopwatch!" = "Créer votre premier minuteur ou chronomètre !";

Loading…
Cancel
Save