mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user