mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 21:36:17 +00:00
apply to terimal
This commit is contained in:
@@ -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)
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user