made the new key/import key buttons look nicer

made the no snippet/theme icons larger
animated generating a new key
This commit is contained in:
neon443
2025-08-01 12:03:40 +01:00
parent b6ad217f44
commit 1aabaeeb8d
4 changed files with 12 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ class KeyManager: ObservableObject {
try! passwordStore.storeKey(curve25519.genericKeyRepresentation, account: keypair.id.uuidString)
}
if !keypairs.contains(keypair) {
keypairs.append(keypair)
withAnimation { keypairs.append(keypair) }
saveKeypairs()
}
}

View File

@@ -51,12 +51,16 @@ struct KeyManagerView: View {
.id(keyManager.keypairs)
}
Button("Generate a new Ed25519 Key") {
let comment = UIDevice().model + " at " + Date().formatted(date: .numeric, time: .omitted)
keyManager.generateKey(type: .ed25519, comment: comment)
}
CenteredLabel(title: "Generate a key", systemName: "plus")
.onTapGesture {
let comment = UIDevice().model + " at " + Date().formatted(date: .numeric, time: .omitted)
keyManager.generateKey(type: .ed25519, comment: comment)
}
Button("Import Key") { showImporter.toggle() }
CenteredLabel(title: "Import a key", systemName: "square.and.arrow.down")
.onTapGesture {
showImporter.toggle()
}
.sheet(isPresented: $showImporter) {
KeyImporterView(keyManager: keyManager)
}

View File

@@ -21,7 +21,7 @@ struct SnippetManagerView: View {
VStack(alignment: .leading) {
Image(systemName: "questionmark.square.dashed")
.resizable().scaledToFit()
.frame(width: 50)
.frame(width: 75)
.foregroundStyle(hostsManager.tint)
.shadow(color: hostsManager.tint, radius: 2)
Text("No Snippets")

View File

@@ -68,7 +68,7 @@ struct ThemeManagerView: View {
.resizable().scaledToFit()
.symbolRenderingMode(.multicolor)
}
.frame(width: 50, height: 50)
.frame(width: 75, height: 75)
Text("No themes (yet)")
.font(.title)
.padding(.vertical, 10)