improve ui on keydetailview

add set(keypair, onHost) to set a keypair on host
remove getkeys it always returns []
add delete button to
remove rsa from keytype
rename symbolpreview ->hostsymbolpreview
This commit is contained in:
neon443
2025-07-02 21:55:50 +01:00
parent 6ad8ed22a0
commit c9d7b06305
10 changed files with 110 additions and 88 deletions

View File

@@ -0,0 +1,34 @@
//
// HostSymbolPreview.swift
// ShhShell
//
// Created by neon443 on 26/06/2025.
//
import SwiftUI
struct HostSymbolPreview: View {
@State var symbol: HostSymbol
@State var label: String
var body: some View {
ZStack(alignment: .center) {
if symbol.isCustom {
Image(symbol.sf)
.resizable().scaledToFit()
.symbolRenderingMode(.monochrome)
} else {
Image(systemName: symbol.sf)
.resizable().scaledToFit()
.symbolRenderingMode(.monochrome)
}
Text(label)
.font(.headline)
.offset(symbol.offset)
}
}
}
#Preview {
HostSymbolPreview(symbol: HostSymbol.desktopcomputer, label: "lo0")
}