Files
ShhShell/ShhShell/ShhShellApp.swift
neon443 b5f8c4e716 made the titlebar have the host label and hide tab bar when only one tab
added a lot of logic fore foreground color calculation, based on luminance of foreground, background and selectedAnsi colors
fixed fallback when opening the first session
fixed text of unselected tabs being unreadable
added tint var to hostsmanager to get accentcolor
reduced ios version to ios 16
2025-07-04 14:51:54 +01:00

35 lines
745 B
Swift

//
// ShhShellApp.swift
// ShhShell
//
// Created by neon443 on 02/06/2025.
//
import SwiftUI
@main
struct ShhShellApp: App {
@StateObject var sshHandler: SSHHandler
@StateObject var hostsManager: HostsManager = HostsManager()
@StateObject var keyManager: KeyManager
init() {
let keyManager = KeyManager()
_sshHandler = StateObject(wrappedValue: SSHHandler(host: Host.blank, keyManager: keyManager))
_keyManager = StateObject(wrappedValue: keyManager)
}
var body: some Scene {
WindowGroup {
ContentView(
handler: sshHandler,
hostsManager: hostsManager,
keyManager: keyManager
)
.colorScheme(hostsManager.selectedTheme.background.luminance > 0.5 ? .light : .dark)
.tint(hostsManager.tint)
}
}
}