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 private var siriTipShown: Bool = false
@State var showAddSheet: Bool = false
@State private var showSettingsSheet: Bool = false @State private var showSettingsSheet: Bool = false
@State private var showStatsSheet: Bool = false @State private var showStatsSheet: Bool = false
@State private var showSubscriptionSheet: Bool = false @State private var showSubscriptionSheet: Bool = false
@ -42,6 +43,7 @@ struct ContentView<T : AbstractTimer>: View {
TimersView(isEditing: self.$isEditing, TimersView(isEditing: self.$isEditing,
showSubscriptionSheet: self.$showSubscriptionSheet, showSubscriptionSheet: self.$showSubscriptionSheet,
showAddSheet: self.$showAddSheet,
siriHandler: { timer in siriHandler: { timer in
self._handleSiriTips(timer: timer) self._handleSiriTips(timer: timer)
}) })
@ -80,7 +82,7 @@ struct ContentView<T : AbstractTimer>: View {
.sheet(isPresented: self.$boringContext.isShowingNewData, content: { .sheet(isPresented: self.$boringContext.isShowingNewData, content: {
}) })
.toolbar { .toolbar {
MainToolbarView(isEditing: self.$isEditing) MainToolbarView(isEditing: self.$isEditing, showAddSheet: self.$showAddSheet)
} }
.onAppear { .onAppear {
self.showTip = Preferences.tipToShow self.showTip = Preferences.tipToShow
@ -136,7 +138,6 @@ struct ContentView<T : AbstractTimer>: View {
} }
} }
} }
} }
} else { } else {
@ -150,10 +151,10 @@ struct ContentView<T : AbstractTimer>: View {
struct MainToolbarView: ToolbarContent { struct MainToolbarView: ToolbarContent {
@Binding var isEditing: Bool @Binding var isEditing: Bool
@Binding var showAddSheet: Bool
@State var showSettingsSheet: Bool = false @State var showSettingsSheet: Bool = false
@State var showStatsSheet: Bool = false @State var showStatsSheet: Bool = false
@State var showAddSheet: Bool = false
@FetchRequest( @FetchRequest(
sortDescriptors: [NSSortDescriptor(keyPath: \AbstractTimer.order, ascending: true)], sortDescriptors: [NSSortDescriptor(keyPath: \AbstractTimer.order, ascending: true)],
@ -176,20 +177,6 @@ struct MainToolbarView: ToolbarContent {
} }
} }
ToolbarItemGroup(placement: .navigationBarTrailing) { 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 { if !self.timers.isEmpty {
Button { Button {
withAnimation { withAnimation {
@ -263,7 +250,7 @@ struct Toolbar_Previews: PreviewProvider {
} }
.navigationTitle("Title") .navigationTitle("Title")
.toolbar { .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 isEditing: Bool
@Binding var showSubscriptionSheet: Bool @Binding var showSubscriptionSheet: Bool
@Binding var showAddSheet: Bool
var siriHandler: ((AbstractTimer) -> ()) var siriHandler: ((AbstractTimer) -> ())
@ -67,10 +68,13 @@ struct TimersView: View {
} }
.padding(.horizontal, itemSpacing) .padding(.horizontal, itemSpacing)
} else { } else {
Text("Disclaimer")
.monospaced() Button {
.padding(32.0) self.showAddSheet = true
.multilineTextAlignment(.center) } 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 { struct TimersView_Previews: PreviewProvider {
static var previews: some View { 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!"; "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."; "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"; "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"; "Select and launch your timers" = "Choisissez vos raccourcis";
"Create your own timer" = "Créer un minuteur"; "Create your own timer" = "Créer un minuteur";
"Create your own stopwatch" = "Créer un chronomètre"; "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