Compare commits

...

2 Commits

Author SHA1 Message Date
Shadowfacts b006293896 Mint! 2021-08-25 00:12:06 -04:00
Shadowfacts 26512b7318 clearEntries -> reset 2021-08-24 22:51:14 -04:00
6 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,10 @@
{
"colors" : [
{
"color" : {
"platform" : "universal",
"reference" : "systemMintColor"
},
"idiom" : "universal"
}
],

View File

@ -54,8 +54,9 @@ struct KeyData: Codable {
entries.removeAll(where: { $0.id == id })
}
mutating func clearEntries() {
mutating func reset() {
entries.removeAll()
folders.removeAll()
}
mutating func addFolder() {

View File

@ -66,8 +66,8 @@ class KeyStore: ObservableObject {
data.removeKey(entryID: id)
}
func clearEntries() {
data.clearEntries()
func reset() {
data.reset()
}
func addFolder() {

View File

@ -38,6 +38,7 @@ struct AppView: View {
isPresentingPreferences = true
} label: {
Label("Preferences", systemImage: "gear")
.tint(.accentColor)
}
}
@ -70,6 +71,7 @@ struct AppView: View {
}
} label: {
Label("Add Key", systemImage: "plus.circle")
.tint(.accentColor)
}
}
}

View File

@ -94,12 +94,14 @@ struct EditKeyForm: View {
Button("Cancel") {
dismiss(.cancel)
}
.tint(.accentColor)
}
}
ToolbarItem(placement: .navigationBarTrailing) {
Button("Save") {
dismiss(.save(editedKey.toTOTPKey()!))
}
.tint(.accentColor)
.disabled(!isValid)
}
}

View File

@ -76,6 +76,7 @@ struct QRCodeView: View {
Button("Done") {
dismiss()
}
.tint(.accentColor)
}
}
.background {
@ -105,6 +106,7 @@ struct QRCodeView: View {
Label("Save", systemImage: "square.and.arrow.down")
}
}
.tint(.accentColor)
}
// fix the size so that the HStack doesn't grow beyond with width of the image
.fixedSize()