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