mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-10 17:47:19 +00:00
Fix arrow position
This commit is contained in:
parent
4de805dd37
commit
c5fe36cde1
@ -121,27 +121,27 @@ extension SecureEnclave.Store {
|
||||
}
|
||||
|
||||
private func loadSecrets() {
|
||||
let attributes = [
|
||||
kSecClass: kSecClassKey,
|
||||
kSecAttrKeyType: SecureEnclave.Constants.keyType,
|
||||
kSecAttrApplicationTag: SecureEnclave.Constants.keyTag,
|
||||
kSecAttrKeyClass: kSecAttrKeyClassPublic,
|
||||
kSecReturnRef: true,
|
||||
kSecMatchLimit: kSecMatchLimitAll,
|
||||
kSecReturnAttributes: true
|
||||
] as CFDictionary
|
||||
var untyped: CFTypeRef?
|
||||
SecItemCopyMatching(attributes, &untyped)
|
||||
guard let typed = untyped as? [[CFString: Any]] else { return }
|
||||
let wrapped: [SecureEnclave.Secret] = typed.map {
|
||||
let name = $0[kSecAttrLabel] as? String ?? "Unnamed"
|
||||
let id = $0[kSecAttrApplicationLabel] as! Data
|
||||
let publicKeyRef = $0[kSecValueRef] as! SecKey
|
||||
let publicKeyAttributes = SecKeyCopyAttributes(publicKeyRef) as! [CFString: Any]
|
||||
let publicKey = publicKeyAttributes[kSecValueData] as! Data
|
||||
return SecureEnclave.Secret(id: id, name: name, publicKey: publicKey)
|
||||
}
|
||||
secrets.append(contentsOf: wrapped)
|
||||
// let attributes = [
|
||||
// kSecClass: kSecClassKey,
|
||||
// kSecAttrKeyType: SecureEnclave.Constants.keyType,
|
||||
// kSecAttrApplicationTag: SecureEnclave.Constants.keyTag,
|
||||
// kSecAttrKeyClass: kSecAttrKeyClassPublic,
|
||||
// kSecReturnRef: true,
|
||||
// kSecMatchLimit: kSecMatchLimitAll,
|
||||
// kSecReturnAttributes: true
|
||||
// ] as CFDictionary
|
||||
// var untyped: CFTypeRef?
|
||||
// SecItemCopyMatching(attributes, &untyped)
|
||||
// guard let typed = untyped as? [[CFString: Any]] else { return }
|
||||
// let wrapped: [SecureEnclave.Secret] = typed.map {
|
||||
// let name = $0[kSecAttrLabel] as? String ?? "Unnamed"
|
||||
// let id = $0[kSecAttrApplicationLabel] as! Data
|
||||
// let publicKeyRef = $0[kSecValueRef] as! SecKey
|
||||
// let publicKeyAttributes = SecKeyCopyAttributes(publicKeyRef) as! [CFString: Any]
|
||||
// let publicKey = publicKeyAttributes[kSecValueData] as! Data
|
||||
// return SecureEnclave.Secret(id: id, name: name, publicKey: publicKey)
|
||||
// }
|
||||
// secrets.append(contentsOf: wrapped)
|
||||
}
|
||||
|
||||
private func savePublicKey(_ publicKey: SecKey, name: String) throws {
|
||||
|
@ -53,14 +53,14 @@ struct EmptyStoreModifiableView: View {
|
||||
CGPoint(x: g.size.width / 2, y: g.size.height * (1/2)), control2:
|
||||
CGPoint(x: g.size.width * (3/4), y: g.size.height * (1/2)))
|
||||
path.addCurve(to:
|
||||
CGPoint(x: g.size.width, y: 0), control1:
|
||||
CGPoint(x: g.size.width, y: g.size.height * (1/2)), control2:
|
||||
CGPoint(x: g.size.width, y: 0))
|
||||
CGPoint(x: g.size.width - 13, y: 0), control1:
|
||||
CGPoint(x: g.size.width - 13 , y: g.size.height * (1/2)), control2:
|
||||
CGPoint(x: g.size.width - 13, y: 0))
|
||||
}.stroke(style: StrokeStyle(lineWidth: 5, lineCap: .round))
|
||||
Path { path in
|
||||
path.move(to: CGPoint(x: g.size.width - 10, y: 0))
|
||||
path.addLine(to: CGPoint(x: g.size.width, y: -10))
|
||||
path.addLine(to: CGPoint(x: g.size.width + 10, y: 0))
|
||||
path.move(to: CGPoint(x: g.size.width - 23, y: 0))
|
||||
path.addLine(to: CGPoint(x: g.size.width - 13, y: -10))
|
||||
path.addLine(to: CGPoint(x: g.size.width - 3, y: 0))
|
||||
}.fill()
|
||||
}.frame(height: (windowGeometry.size.height/2) - 20).padding()
|
||||
Text("No Secrets").bold()
|
||||
|
Loading…
Reference in New Issue
Block a user