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)
|
try! passwordStore.storeKey(curve25519.genericKeyRepresentation, account: keypair.id.uuidString)
|
||||||
}
|
}
|
||||||
if !keypairs.contains(keypair) {
|
if !keypairs.contains(keypair) {
|
||||||
keypairs.append(keypair)
|
withAnimation { keypairs.append(keypair) }
|
||||||
saveKeypairs()
|
saveKeypairs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,12 +51,16 @@ struct KeyManagerView: View {
|
|||||||
.id(keyManager.keypairs)
|
.id(keyManager.keypairs)
|
||||||
}
|
}
|
||||||
|
|
||||||
Button("Generate a new Ed25519 Key") {
|
CenteredLabel(title: "Generate a key", systemName: "plus")
|
||||||
let comment = UIDevice().model + " at " + Date().formatted(date: .numeric, time: .omitted)
|
.onTapGesture {
|
||||||
keyManager.generateKey(type: .ed25519, comment: comment)
|
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) {
|
.sheet(isPresented: $showImporter) {
|
||||||
KeyImporterView(keyManager: keyManager)
|
KeyImporterView(keyManager: keyManager)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ struct SnippetManagerView: View {
|
|||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Image(systemName: "questionmark.square.dashed")
|
Image(systemName: "questionmark.square.dashed")
|
||||||
.resizable().scaledToFit()
|
.resizable().scaledToFit()
|
||||||
.frame(width: 50)
|
.frame(width: 75)
|
||||||
.foregroundStyle(hostsManager.tint)
|
.foregroundStyle(hostsManager.tint)
|
||||||
.shadow(color: hostsManager.tint, radius: 2)
|
.shadow(color: hostsManager.tint, radius: 2)
|
||||||
Text("No Snippets")
|
Text("No Snippets")
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ struct ThemeManagerView: View {
|
|||||||
.resizable().scaledToFit()
|
.resizable().scaledToFit()
|
||||||
.symbolRenderingMode(.multicolor)
|
.symbolRenderingMode(.multicolor)
|
||||||
}
|
}
|
||||||
.frame(width: 50, height: 50)
|
.frame(width: 75, height: 75)
|
||||||
Text("No themes (yet)")
|
Text("No themes (yet)")
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.padding(.vertical, 10)
|
.padding(.vertical, 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user