mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
center text
fix alignment comment out ssh_free fix Face ID appearing on touch id devices
This commit is contained in:
@@ -113,7 +113,7 @@ class HostsManager: ObservableObject, @unchecked Sendable {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
let reason = "Authenticate yourself with Face ID to view private keys"
|
let reason = "Authenticate yourself to view private keys"
|
||||||
return await withCheckedContinuation { continuation in
|
return await withCheckedContinuation { continuation in
|
||||||
context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason) { success, _ in
|
context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason) { success, _ in
|
||||||
continuation.resume(returning: success)
|
continuation.resume(returning: success)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
|
|||||||
if connected && (ssh_is_connected(session) == 1) {
|
if connected && (ssh_is_connected(session) == 1) {
|
||||||
ssh_disconnect(self.session)
|
ssh_disconnect(self.session)
|
||||||
}
|
}
|
||||||
ssh_free(self.session)
|
// ssh_free(self.session)
|
||||||
self.session = nil
|
self.session = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ struct KeyDetailView: View {
|
|||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("Private key")
|
Text("Private key")
|
||||||
.bold()
|
.bold()
|
||||||
ZStack {
|
.frame(maxWidth: .infinity)
|
||||||
|
ZStack(alignment: .center) {
|
||||||
Text(String(data: keypair.privateKey!, encoding: .utf8) ?? "nil")
|
Text(String(data: keypair.privateKey!, encoding: .utf8) ?? "nil")
|
||||||
.blur(radius: reveal ? 0 : 5)
|
.blur(radius: reveal ? 0 : 5)
|
||||||
VStack {
|
VStack {
|
||||||
@@ -33,6 +34,7 @@ struct KeyDetailView: View {
|
|||||||
}
|
}
|
||||||
.opacity(reveal ? 0 : 1)
|
.opacity(reveal ? 0 : 1)
|
||||||
}
|
}
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
Task {
|
Task {
|
||||||
if !reveal {
|
if !reveal {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ struct KeyManagerView: View {
|
|||||||
NavigationLink {
|
NavigationLink {
|
||||||
List {
|
List {
|
||||||
if hostsManager.savedHosts.isEmpty {
|
if hostsManager.savedHosts.isEmpty {
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .leading) {
|
||||||
Text("Looking empty 'round here...")
|
Text("Looking empty 'round here...")
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
.bold()
|
.bold()
|
||||||
|
|||||||
Reference in New Issue
Block a user