From d21210163bbbfd13eb422e405c6d8975fe37a4ed Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 20 Jun 2025 20:01:06 +0200 Subject: [PATCH] formatting --- .../Views/Settings/SettingsView.swift | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/ios/VibeTunnel/Views/Settings/SettingsView.swift b/ios/VibeTunnel/Views/Settings/SettingsView.swift index d84c956d..27bb656e 100644 --- a/ios/VibeTunnel/Views/Settings/SettingsView.swift +++ b/ios/VibeTunnel/Views/Settings/SettingsView.swift @@ -2,7 +2,8 @@ import SwiftUI /// Main settings view with tabbed navigation struct SettingsView: View { - @Environment(\.dismiss) var dismiss + @Environment(\.dismiss) + var dismiss @State private var selectedTab = SettingsTab.general enum SettingsTab: String, CaseIterable { @@ -23,11 +24,11 @@ struct SettingsView: View { // Tab selector HStack(spacing: 0) { ForEach(SettingsTab.allCases, id: \.self) { tab in - Button(action: { + Button { withAnimation(Theme.Animation.smooth) { selectedTab = tab } - }) { + } label: { VStack(spacing: Theme.Spacing.small) { Image(systemName: tab.icon) .font(.title2) @@ -80,10 +81,14 @@ struct SettingsView: View { /// General settings tab content struct GeneralSettingsView: View { - @AppStorage("defaultFontSize") private var defaultFontSize: Double = 14 - @AppStorage("defaultTerminalWidth") private var defaultTerminalWidth: Int = 80 - @AppStorage("autoScrollEnabled") private var autoScrollEnabled = true - @AppStorage("enableURLDetection") private var enableURLDetection = true + @AppStorage("defaultFontSize") + private var defaultFontSize: Double = 14 + @AppStorage("defaultTerminalWidth") + private var defaultTerminalWidth: Int = 80 + @AppStorage("autoScrollEnabled") + private var autoScrollEnabled = true + @AppStorage("enableURLDetection") + private var enableURLDetection = true var body: some View { VStack(alignment: .leading, spacing: Theme.Spacing.large) { @@ -169,8 +174,10 @@ struct GeneralSettingsView: View { /// Advanced settings tab content struct AdvancedSettingsView: View { - @AppStorage("verboseLogging") private var verboseLogging = false - @AppStorage("debugModeEnabled") private var debugModeEnabled = false + @AppStorage("verboseLogging") + private var verboseLogging = false + @AppStorage("debugModeEnabled") + private var debugModeEnabled = false var body: some View { VStack(alignment: .leading, spacing: Theme.Spacing.large) { @@ -200,7 +207,6 @@ struct AdvancedSettingsView: View { .padding() .background(Theme.Colors.cardBackground) .cornerRadius(Theme.CornerRadius.card) - } } @@ -242,4 +248,4 @@ struct AdvancedSettingsView: View { #Preview { SettingsView() -} \ No newline at end of file +}