mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 21:36:17 +00:00
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:
34
ShhShell/Views/Misc/HostSymbolPreview.swift
Normal file
34
ShhShell/Views/Misc/HostSymbolPreview.swift
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user