mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
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
35 lines
745 B
Swift
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)
|
|
}
|
|
}
|
|
}
|