Yep. AI rewrote the whole thing.

This commit is contained in:
2026-03-13 03:24:24 +11:00
parent e4719cb9f4
commit fe6c7d8c12
47 changed files with 5348 additions and 1182 deletions

View File

@@ -0,0 +1,72 @@
import SwiftUI
struct AnimationSettingsView: View {
@ObservedObject private var settingsController = AppSettingsController.shared
var body: some View {
Form {
Section("Open Animation") {
springControls(
response: settingsController.binding(\.animation.openSpringResponse),
damping: settingsController.binding(\.animation.openSpringDamping)
)
}
Section("Close Animation") {
springControls(
response: settingsController.binding(\.animation.closeSpringResponse),
damping: settingsController.binding(\.animation.closeSpringDamping)
)
}
Section("Hover Animation") {
springControls(
response: settingsController.binding(\.animation.hoverSpringResponse),
damping: settingsController.binding(\.animation.hoverSpringDamping)
)
}
Section("Resize Animation") {
durationControl(duration: settingsController.binding(\.animation.resizeAnimationDuration))
}
Section {
Button("Reset to Defaults") {
settingsController.update {
$0.animation = AppSettings.default.animation
}
}
}
}
.formStyle(.grouped)
}
@ViewBuilder
private func springControls(response: Binding<Double>, damping: Binding<Double>) -> some View {
HStack {
Text("Response")
Slider(value: response, in: 0.1...1.5, step: 0.01)
Text(String(format: "%.2f", response.wrappedValue))
.monospacedDigit()
.frame(width: 50)
}
HStack {
Text("Damping")
Slider(value: damping, in: 0.1...1.5, step: 0.01)
Text(String(format: "%.2f", damping.wrappedValue))
.monospacedDigit()
.frame(width: 50)
}
}
@ViewBuilder
private func durationControl(duration: Binding<Double>) -> some View {
HStack {
Text("Duration")
Slider(value: duration, in: 0.05...1.5, step: 0.01)
Text(String(format: "%.2fs", duration.wrappedValue))
.monospacedDigit()
.frame(width: 56)
}
}
}