Files
ShhShell/ShhShell/Views/ContentView.swift
neon443 a80ff66f6e update the entite like crt shader it acc works and imrpoved blending of
the orverlay
its a lil dim but oh well
moved learning shader stuff to ShaderTestggvirw maybe integrate it
later?
2025-08-26 17:44:06 +01:00

112 lines
2.5 KiB
Swift

//
// ContentView.swift
// ShhShell
//
// Created by neon443 on 02/06/2025.
//
import SwiftUI
struct ContentView: View {
@ObservedObject var handler: SSHHandler
@ObservedObject var hostsManager: HostsManager
@ObservedObject var keyManager: KeyManager
var body: some View {
NavigationStack {
ZStack {
hostsManager.selectedTheme.background.suiColor.opacity(0.7)
.ignoresSafeArea(.all)
List {
SessionsListView(
handler: handler,
hostsManager: hostsManager,
keyManager: keyManager
)
RecentsView(
hostsManager: hostsManager,
keyManager: keyManager
)
HostsView(
handler: handler,
hostsManager: hostsManager,
keyManager: keyManager
)
Section() {
NavigationLink {
ThemeManagerView(hostsManager: hostsManager)
} label: {
Label("Themes", systemImage: "swatchpalette")
}
NavigationLink {
FontManagerView(hostsManager: hostsManager)
} label: {
Label("Fonts", systemImage: "textformat")
}
}
Section {
NavigationLink {
SnippetManagerView(hostsManager: hostsManager)
} label: {
Label("Snippets", systemImage: "paperclip")
}
NavigationLink {
KeyManagerView(hostsManager: hostsManager, keyManager: keyManager)
} label: {
Label("Keys", systemImage: "key.fill")
}
NavigationLink {
HostkeysView(hostsManager: hostsManager)
} label: {
Label("Hostkey Fingerprints", systemImage: "lock.display")
}
}
Section {
NavigationLink {
SettingsView(hostsManager: hostsManager, keyManager: keyManager)
} label: {
Label("Settings", systemImage: "gear")
}
NavigationLink {
AboutView(hostsManager: hostsManager)
} label: {
Label("About", systemImage: "info.square")
}
}
}
.scrollContentBackground(.hidden)
}
.navigationTitle("ShhShell")
.toolbar {
ToolbarItem(placement: .confirmationAction) {
NavigationLink {
ConnectionView(
handler: SSHHandler(host: Host.blank, keyManager: keyManager),
hostsManager: hostsManager,
keyManager: keyManager
)
} label: {
Label("Add", systemImage: "plus")
}
}
}
}
}
}
#Preview {
let keymanager = KeyManager()
ContentView(
handler: SSHHandler(host: Host.debug, keyManager: keymanager),
hostsManager: HostsManager(),
keyManager: keymanager
)
}