apply to terimal

This commit is contained in:
neon443
2025-08-25 21:32:53 +01:00
parent cc028321db
commit f85ef3deaf
2 changed files with 116 additions and 112 deletions

View File

@@ -12,11 +12,7 @@ struct ContentView: View {
@ObservedObject var hostsManager: HostsManager
@ObservedObject var keyManager: KeyManager
@State private var spawnTime: Date = .now
var body: some View {
TimelineView(.animation) { tl in
let time = tl.date.distance(to: spawnTime)
NavigationStack {
ZStack {
hostsManager.selectedTheme.background.suiColor.opacity(0.7)
@@ -102,14 +98,6 @@ struct ContentView: View {
}
}
}
.visualEffect { content, proxy in
content
.colorEffect(ShaderLibrary.crt(
.float2(proxy.size),
.float(time)
))
}
}
}
}

View File

@@ -16,9 +16,14 @@ struct ShellView: View {
@Environment(\.dismiss) var dismiss
@State var startTime: Date = .now
var body: some View {
NavigationStack {
ZStack {
TimelineView(.animation) { tl in
let time = tl.date.distance(to: startTime)
let shaderEnabled = hostsManager.settings.filter == .crt
hostsManager.selectedTheme.background.suiColor
.ignoresSafeArea(.all)
TerminalController(handler: handler, hostsManager: hostsManager)
@@ -44,6 +49,17 @@ struct ShellView: View {
AudioServicesPlaySystemSound(1103)
}
}
.visualEffect { content, proxy in
content
.colorEffect(
ShaderLibrary.crt(
.float2(proxy.size),
.float(time)
),
isEnabled: shaderEnabled
)
}
}
}
}
}