Finalize stuff for 1.0

main
Laurent 3 years ago
parent 5d6bdb8c96
commit 1df168f4a8
  1. 10
      LeCountdown.xcodeproj/project.pbxproj
  2. 2
      LeCountdown/Intent/TimerShortcuts.swift
  3. 9
      LeCountdown/Views/ContentView.swift
  4. 2
      LeCountdown/Views/Countdown/CountdownFormView.swift
  5. 24
      LeCountdown/Views/PresetsView.swift
  6. 44
      LeCountdown/Views/Reusable/SoundFormView.swift
  7. 31
      LeCountdown/Views/Stats/ActivitiesView.swift
  8. 2
      LeCountdown/Views/Stopwatch/StopwatchFormView.swift
  9. 20
      LeCountdown/Views/TimersView.swift
  10. 246
      LeCountdown/en.lproj/Localizable.strings
  11. 2
      LeCountdown/fr.lproj/Localizable.strings

@ -172,7 +172,7 @@
C4F8B15F298961A7005C86A5 /* ReorderableForEach.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B15E298961A7005C86A5 /* ReorderableForEach.swift */; };
C4F8B162298A9A1F005C86A5 /* NewAlarmView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B161298A9A1F005C86A5 /* NewAlarmView.swift */; };
C4F8B164298A9A92005C86A5 /* AlarmFormView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B163298A9A92005C86A5 /* AlarmFormView.swift */; };
C4F8B166298A9ABB005C86A5 /* SoundImageFormView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B165298A9ABB005C86A5 /* SoundImageFormView.swift */; };
C4F8B166298A9ABB005C86A5 /* SoundFormView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B165298A9ABB005C86A5 /* SoundFormView.swift */; };
C4F8B169298AA236005C86A5 /* StopwatchFormView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B168298AA236005C86A5 /* StopwatchFormView.swift */; };
C4F8B16B298AA240005C86A5 /* NewStopwatchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B16A298AA240005C86A5 /* NewStopwatchView.swift */; };
C4F8B17A298AC234005C86A5 /* Countdown+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F8B16C298AC234005C86A5 /* Countdown+CoreDataClass.swift */; };
@ -282,6 +282,7 @@
C40FDB612992985C0042A390 /* TextToSpeechRecorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextToSpeechRecorder.swift; sourceTree = "<group>"; };
C40FDB672993D5E80042A390 /* LeCountdown.0.4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = LeCountdown.0.4.xcdatamodel; sourceTree = "<group>"; };
C415D3C929BF6D360037B215 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
C415D3CB29C0A8C50037B215 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
C418A14F298428CB00C22230 /* LeCountdown.0.1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = LeCountdown.0.1.xcdatamodel; sourceTree = "<group>"; };
C438C7C02980228B00BF3EF9 /* CountdownScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CountdownScheduler.swift; sourceTree = "<group>"; };
C438C7C4298024E900BF3EF9 /* NSManagedContext+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSManagedContext+Extensions.swift"; sourceTree = "<group>"; };
@ -390,7 +391,7 @@
C4F8B160298A90E8005C86A5 /* LeCountdown.0.3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = LeCountdown.0.3.xcdatamodel; sourceTree = "<group>"; };
C4F8B161298A9A1F005C86A5 /* NewAlarmView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewAlarmView.swift; sourceTree = "<group>"; };
C4F8B163298A9A92005C86A5 /* AlarmFormView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmFormView.swift; sourceTree = "<group>"; };
C4F8B165298A9ABB005C86A5 /* SoundImageFormView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoundImageFormView.swift; sourceTree = "<group>"; };
C4F8B165298A9ABB005C86A5 /* SoundFormView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoundFormView.swift; sourceTree = "<group>"; };
C4F8B168298AA236005C86A5 /* StopwatchFormView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StopwatchFormView.swift; sourceTree = "<group>"; };
C4F8B16A298AA240005C86A5 /* NewStopwatchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewStopwatchView.swift; sourceTree = "<group>"; };
C4F8B16C298AC234005C86A5 /* Countdown+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Countdown+CoreDataClass.swift"; sourceTree = "<group>"; };
@ -778,7 +779,7 @@
C4F8B15E298961A7005C86A5 /* ReorderableForEach.swift */,
C4E5D68329BB2425008E7465 /* SeparatorView.swift */,
C4E5D68729BB3FE1008E7465 /* SiriTimerView.swift */,
C4F8B165298A9ABB005C86A5 /* SoundImageFormView.swift */,
C4F8B165298A9ABB005C86A5 /* SoundFormView.swift */,
C4BA2AD52993F62700CB4FBA /* SoundSelectionView.swift */,
C4BA2ADA299549BC00CB4FBA /* TimerModel.swift */,
C473C33829ACDBD70056B38A /* TipView.swift */,
@ -1061,7 +1062,7 @@
C4F8B16B298AA240005C86A5 /* NewStopwatchView.swift in Sources */,
C4BA2AF22996A11900CB4FBA /* CustomSound+CoreDataProperties.swift in Sources */,
C4060DF5297AE9A7003FAB80 /* TimeInterval+Extensions.swift in Sources */,
C4F8B166298A9ABB005C86A5 /* SoundImageFormView.swift in Sources */,
C4F8B166298A9ABB005C86A5 /* SoundFormView.swift in Sources */,
C4F8B17D298AC234005C86A5 /* Record+CoreDataProperties.swift in Sources */,
C4F8B184298AC234005C86A5 /* AbstractTimer+CoreDataClass.swift in Sources */,
C4F8B17A298AC234005C86A5 /* Countdown+CoreDataClass.swift in Sources */,
@ -1256,6 +1257,7 @@
isa = PBXVariantGroup;
children = (
C473C32B29AA330E0056B38A /* fr */,
C415D3CB29C0A8C50037B215 /* en */,
);
name = Localizable.strings;
sourceTree = "<group>";

@ -11,8 +11,8 @@ struct TimerShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(intent: StartTimerIntent(), phrases: [
"Start \(\.$timer) with \(.applicationName)",
"\(.applicationName) \(\.$timer)",
"Start \(\.$timer) with \(.applicationName)",
"Launch \(\.$timer) with \(.applicationName)",
"Start \(.applicationName)",
"Launch \(.applicationName)"

@ -64,19 +64,18 @@ struct ContentView<T : AbstractTimer>: View {
.environment(\.managedObjectContext, viewContext)
.environmentObject(self.boringContext)
// if !self.tipsShown, let tip = Preferences.tipToShow {
// TipView(tip: tip) {
// self._hideTip(tip)
// }.padding()
// }
Spacer()
SiriTimerView(timer: self.boringContext.siriTimer)
if !conductor.liveTimers.isEmpty {
Spacer()
SiriTimerView(timer: self.boringContext.siriTimer)
HStack(alignment: .center) {
VolumeView().padding(12.0)
}.frame(width: 300.0, height: 40.0)

@ -54,7 +54,7 @@ struct CountdownFormView : View {
}
}
SoundImageFormView(
SoundFormView(
imageBinding: imageBinding,
repeatCountBinding: repeatCountBinding)
.environmentObject(self.model)

@ -57,13 +57,13 @@ struct PresetsView: View {
.frame(height: 40.0)
}.monospaced().buttonStyle(.bordered)
Button {
self.isShowingNewStopwatch = true
} label: {
Text("Create stopwatch".uppercased())
.frame(maxWidth: .infinity)
.frame(height: 40.0)
}.monospaced().buttonStyle(.bordered)
// Button {
// self.isShowingNewStopwatch = true
// } label: {
// Text("Create stopwatch".uppercased())
// .frame(maxWidth: .infinity)
// .frame(height: 40.0)
// }.monospaced().buttonStyle(.bordered)
Text("Presets")
.font(.system(.title, weight: .heavy))
@ -149,7 +149,7 @@ enum PresetSection: Int, Identifiable, CaseIterable {
var presets: [Preset] {
switch self {
case .cooking: return [.softBoiled, .mediumBoiledEggs, .hardBoiledEggs]
case .cooking: return [.pasta, .rice, .softBoiled, .mediumBoiledEggs, .hardBoiledEggs]
case .tea: return [.greenTea, .blackTea]
// case .workout: return [.runningSplits]
case .chill: return [.nap, .meditation]
@ -190,6 +190,8 @@ enum Preset: Int, Identifiable, CaseIterable {
case toothbrushing
case blackTea
case greenTea
case pasta
case rice
var localizedName: String {
switch self {
@ -202,6 +204,8 @@ enum Preset: Int, Identifiable, CaseIterable {
case .toothbrushing: return NSLocalizedString("Tooth brushing", comment: "")
case .blackTea: return NSLocalizedString("Black tea", comment: "")
case .greenTea: return NSLocalizedString("Green tea", comment: "")
case .pasta: return NSLocalizedString("Pasta", comment: "")
case .rice: return NSLocalizedString("Rice", comment: "")
}
}
@ -227,6 +231,8 @@ enum Preset: Int, Identifiable, CaseIterable {
case .toothbrushing: return 2 * 60.0
case .greenTea: return 3 * 60.0
case .blackTea: return 4 * 60.0
case .pasta: return 10 * 60.0
case .rice: return 10 * 60.0
}
}
@ -241,6 +247,8 @@ enum Preset: Int, Identifiable, CaseIterable {
case .toothbrushing: return []
case .blackTea: return []
case .greenTea: return []
case .pasta: return []
case .rice: return []
}
}

@ -7,7 +7,7 @@
import SwiftUI
struct SoundImageFormView : View {
struct SoundFormView : View {
var imageBinding: Binding<CoolPic>
@ -81,26 +81,26 @@ struct SoundImageFormView : View {
}
Section(header: Text("Background")) {
Button {
self.imageSelectionSheetShown = true
} label: {
Group {
if let image = self.imageBinding.wrappedValue {
Image(image.rawValue).resizable()
} else {
Image(imageBinding.wrappedValue.rawValue).resizable()
}
}
.font(Font.system(size: 90.0))
.aspectRatio(1, contentMode: .fit)
.frame(width: 100.0, height: 100.0)
.cornerRadius(20.0)
}
}
// Section(header: Text("Background")) {
//
// Button {
// self.imageSelectionSheetShown = true
// } label: {
// Group {
// if let image = self.imageBinding.wrappedValue {
// Image(image.rawValue).resizable()
// } else {
// Image(imageBinding.wrappedValue.rawValue).resizable()
// }
// }
// .font(Font.system(size: 90.0))
// .aspectRatio(1, contentMode: .fit)
// .frame(width: 100.0, height: 100.0)
// .cornerRadius(20.0)
//
// }
//
// }
}.sheet(isPresented: self.$imageSelectionSheetShown) {
ImageSelectionView(showBinding: self.$imageSelectionSheetShown, imageBinding: self.imageBinding)
}
@ -112,7 +112,7 @@ struct SoundImageFormView_Previews: PreviewProvider {
static var previews: some View {
Form {
SoundImageFormView(
SoundFormView(
imageBinding: .constant(.pic1),
repeatCountBinding: .constant(2))
.environmentObject(TimerModel())

@ -30,18 +30,27 @@ struct ActivitiesView: View {
List {
ForEach(self.activities) { activity in
NavigationLink {
ActivityView(activity: activity)
.environment(\.managedObjectContext, viewContext)
} label: {
HStack {
Text(activity.name ?? "no activity")
Spacer()
Text(activity.recordCount)
.font(.system(.body, weight: .bold))
.foregroundColor(.accentColor)
}
HStack {
Text(activity.name ?? "no activity")
Spacer()
Text(activity.recordCount)
.font(.system(.body, weight: .bold))
.foregroundColor(.accentColor)
}
// NavigationLink {
// ActivityView(activity: activity)
// .environment(\.managedObjectContext, viewContext)
// } label: {
// HStack {
// Text(activity.name ?? "no activity")
// Spacer()
// Text(activity.recordCount)
// .font(.system(.body, weight: .bold))
// .foregroundColor(.accentColor)
// }
// }
}
}
}

@ -34,7 +34,7 @@ struct StopwatchFormView: View {
}
}
SoundImageFormView(imageBinding: imageBinding,
SoundFormView(imageBinding: imageBinding,
optionalSound: playSoundBinding)
.environmentObject(self.model)

@ -24,13 +24,13 @@ struct TimersView: View {
var body: some View {
GeometryReader { reader in
let abstractTimers: [AbstractTimer] = Array(self.timers)
if abstractTimers.count > 0 {
let columns: [GridItem] = self._columns()
let width: CGFloat = reader.size.width / CGFloat(columns.count) - 5.0
let abstractTimers: [AbstractTimer] = Array(self.timers)
if abstractTimers.count > 0 {
GeometryReader { reader in
let columns: [GridItem] = self._columns()
let width: CGFloat = reader.size.width / CGFloat(columns.count) - 5.0
ScrollView {
@ -53,10 +53,10 @@ struct TimersView: View {
}
}
} else {
Text("You'll find your timers here. Start by creating them on the left screen")
}
}.padding(.horizontal, itemSpacing)
}.padding(.horizontal, itemSpacing)
} else {
Text("You'll find your timers here. Start by creating them on the left screen").multilineTextAlignment(.center)
}
}

@ -1,245 +1 @@
/* No comment provided by engineer. */
".create countdown" = ".Créer un minuteur";
/* No comment provided by engineer. */
".create stopwatch" = ".Créer un chrono";
/* No comment provided by engineer. */
"Activities" = "Activités";
/* No comment provided by engineer. */
"alarm" = "Alarme";
/* No comment provided by engineer. */
"All" = "Tout";
/* No comment provided by engineer. */
"Average duration" = "Durée moyenne";
/* No comment provided by engineer. */
"Black tea" = "Thé noir";
/* No comment provided by engineer. */
"Cancel" = "Annuler";
/* No comment provided by engineer. */
"Cancelled" = "Annulé";
/* No comment provided by engineer. */
"Cooking" = "Cuisine";
/* No comment provided by engineer. */
"Coundown" = "Minuteur";
/* No comment provided by engineer. */
"Count" = "Nombre";
/* No comment provided by engineer. */
"countdown" = "compteur";
/* No comment provided by engineer. */
"Create" = "Nouveau";
/* No comment provided by engineer. */
"Create a new countdown" = "Créer un nouveau minuteur";
/* No comment provided by engineer. */
"Create countdown" = "Créer un minuteur";
/* No comment provided by engineer. */
"Custom" = "Personnalisé";
/* No comment provided by engineer. */
"date" = "Date";
/* No comment provided by engineer. */
"Do you really want to delete?" = "Voulez-vous vraiment effacer ?";
/* No comment provided by engineer. */
"Do you wish to rename or create a new activity" = "Souhaitez-vous renommer ou créer une nouvelle activité ?";
/* No comment provided by engineer. */
"Don't show this again" = "Ne plus montrer";
/* No comment provided by engineer. */
"Done" = "Sauver";
/* No comment provided by engineer. */
"Duration" = "Durée";
/* No comment provided by engineer. */
"Edit" = "Editer";
/* No comment provided by engineer. */
"Edit alarm" = "Éditer alarme";
/* No comment provided by engineer. */
"Edit countdown" = "Éditer minuteur";
/* No comment provided by engineer. */
"Edit stopwatch" = "Éditer chrono";
/* No comment provided by engineer. */
"Fun" = "Fun";
/* No comment provided by engineer. */
"Green tea" = "Thé vert";
/* No comment provided by engineer. */
"haha" = "";
/* No comment provided by engineer. */
"Hard boiled eggs" = "Oeufs dur";
/* No comment provided by engineer. */
"Home" = "Kikai";
/* No comment provided by engineer. */
"It's time!" = "C'est l'heure !";
/* No comment provided by engineer. */
"Make sure your device is not on silent mode" = "Vérifiez que votre appareil n'est pas en mode silencieux";
/* No comment provided by engineer. */
"Meditation" = "Méditation";
/* No comment provided by engineer. */
"Medium boiled eggs" = "Oeufs mollets";
/* No comment provided by engineer. */
"Min" = "Min";
/* No comment provided by engineer. */
"Minutes" = "Minutes";
/* No comment provided by engineer. */
"Month" = "Mois";
/* No comment provided by engineer. */
"name" = "nom";
/* No comment provided by engineer. */
"Name (activates tracking)" = "Nom (active le suivi)";
/* No comment provided by engineer. */
"Name for tracking the activity" = "Nom pour suivre l'activité";
/* No comment provided by engineer. */
"Nap" = "Sieste";
/* No comment provided by engineer. */
"Nature" = "Nature";
/* No comment provided by engineer. */
"New activity" = "Nouvelle activité";
/* No comment provided by engineer. */
"New alarm" = "Nouvelle alarme";
/* No comment provided by engineer. */
"New countdown" = "Nouveau minuteur";
/* No comment provided by engineer. */
"New stopwatch" = "Nouveau chrono";
/* No comment provided by engineer. */
"No" = "Non";
/* No comment provided by engineer. */
"OK" = "OK";
/* No comment provided by engineer. */
"Other" = "Autre";
/* No comment provided by engineer. */
"Play sound on end" = "Jouer un son de fin";
/* No comment provided by engineer. */
"Presets" = "Préselection";
/* No comment provided by engineer. */
"Properties" = "Propriétes";
/* No comment provided by engineer. */
"Rename" = "Renommer";
/* No comment provided by engineer. */
"Repeat Count" = "Nombre de répétitions";
/* No comment provided by engineer. */
"Save" = "Sauvegarder";
/* No comment provided by engineer. */
"Seconds" = "Secondes";
/* No comment provided by engineer. */
"Show permissions" = "Voir permissions";
/* No comment provided by engineer. */
"Soft boiled eggs" = "Oeufs coque";
/* No comment provided by engineer. */
"Sound" = "Son";
/* sounds */
"sounds" = "sons";
/* No comment provided by engineer. */
"Sounds" = "Sons";
/* No comment provided by engineer. */
"Stats" = "Statistiques";
/* No comment provided by engineer. */
"Stop" = "Arrêter";
/* No comment provided by engineer. */
"stopwatch" = "chrono";
/* No comment provided by engineer. */
"Stopwatch" = "Chrono";
/* No comment provided by engineer. */
"Tea" = "Thé";
/* No comment provided by engineer. */
"Time" = "Temps";
/* No comment provided by engineer. */
"Time's up for %@!" = "C'est l'heure pour %@ !";
/* No comment provided by engineer. */
"Tooth brushing" = "Brossage de dent";
/* No comment provided by engineer. */
"value" = "valeur";
/* No comment provided by engineer. */
"Workout" = "Exercice";
/* No comment provided by engineer. */
"Year" = "Année";
/* No comment provided by engineer. */
"Yes" = "Oui";
"You can add widget for your timers and countdowns by modifying your home or lock screen" = "You pouvez ajouter des widgets pour vos minuteurs et chronomètres en modifiant votre écran verrouillé ou votre page d'accueil";
/* No comment provided by engineer. */
"You can ask Siri to create and launch countdowns and stopwatches" = "Vous pouvez demander à Siri de vous lancer les minuteurs et les chronos";
/* No comment provided by engineer. */
"You can edit the duration, sound and label before adding" = "Vous pouvez changer la durée, le son et le label avant l'ajout";
/* No comment provided by engineer. */
"You don't have any recorded activity yet" = "Vous n'avez pas encore d'activités enregistrées";
/* No comment provided by engineer. */
"You need to accept notifications, please check your settings" = "Vous devez accepter les notifications, veuillez vérifier vos réglages";
/* No comment provided by engineer. */
"Your %@ countdown is over!" = "Votre minuteur de %@ est terminé !";
"Launch" = "Démarrer";
"Launch %@" = "Lance %@";
"You'll find your timers here. Start by creating them on the left screen" = "You'll find your timers here.\nStart by creating them on the left screen";

@ -247,5 +247,5 @@
"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";
"You'll find your timers here. Start by creating them on the left screen" = "Vous retrouverez vos minuteurs ici.\nCommencez par en créer dans l'écran de gauche";
"Settings" = "Réglages";

Loading…
Cancel
Save