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" : [ "colors" : [
{ {
"color" : {
"platform" : "universal",
"reference" : "systemMintColor"
},
"idiom" : "universal" "idiom" : "universal"
} }
], ],

View File

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

View File

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

View File

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

View File

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

View File

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