mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-28 09:55:53 +00:00
Fix final Swift formatting issue
This commit is contained in:
parent
e77fdfe909
commit
cce2ea6343
4 changed files with 28 additions and 4 deletions
|
|
@ -153,7 +153,7 @@ struct DashboardSettingsView: View {
|
|||
showPasswordFields = false
|
||||
password = ""
|
||||
confirmPassword = ""
|
||||
|
||||
|
||||
// Clear cached password in LazyBasicAuthMiddleware
|
||||
LazyBasicAuthMiddleware<BasicRequestContext>.clearCache()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ import AppKit
|
|||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
/// Supported terminal applications.
|
||||
///
|
||||
/// Represents terminal emulators that VibeTunnel can launch
|
||||
/// with commands, including detection of installed terminals.
|
||||
enum Terminal: String, CaseIterable {
|
||||
case terminal = "Terminal"
|
||||
case iTerm2 = "iTerm2"
|
||||
|
|
@ -41,6 +45,10 @@ enum Terminal: String, CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
/// Errors that can occur when launching terminal commands.
|
||||
///
|
||||
/// Represents failures during terminal application launch,
|
||||
/// including permission issues and missing applications.
|
||||
enum TerminalLauncherError: LocalizedError {
|
||||
case terminalNotFound
|
||||
case appleScriptPermissionDenied
|
||||
|
|
@ -58,6 +66,11 @@ enum TerminalLauncherError: LocalizedError {
|
|||
}
|
||||
}
|
||||
|
||||
/// Manages launching terminal commands in the user's preferred terminal.
|
||||
///
|
||||
/// Handles terminal application detection, preference management,
|
||||
/// and command execution through AppleScript or direct process launching.
|
||||
/// Supports Terminal, iTerm2, and Ghostty with automatic fallback.
|
||||
@MainActor
|
||||
final class TerminalLauncher {
|
||||
static let shared = TerminalLauncher()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
/// Handles the presentation of the welcome screen window
|
||||
/// Handles the presentation of the welcome screen window.
|
||||
///
|
||||
/// Manages the lifecycle and presentation of the onboarding welcome window,
|
||||
/// including window configuration, positioning, and notification-based showing.
|
||||
/// Configured as a floating panel with transparent titlebar for modern appearance.
|
||||
@MainActor
|
||||
final class WelcomeWindowController: NSWindowController {
|
||||
static let shared = WelcomeWindowController()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@ import AppKit
|
|||
import Observation
|
||||
import SwiftUI
|
||||
|
||||
/// A custom window size animator that works with SwiftUI Settings windows
|
||||
/// A custom window size animator that works with SwiftUI Settings windows.
|
||||
///
|
||||
/// Provides smooth animated transitions when resizing windows, particularly
|
||||
/// useful for settings windows that change size based on tab selection.
|
||||
/// Works around SwiftUI limitations by using AppKit's NSViewAnimation.
|
||||
@MainActor
|
||||
@Observable
|
||||
final class WindowSizeAnimator {
|
||||
|
|
@ -73,7 +77,10 @@ final class WindowSizeAnimator {
|
|||
}
|
||||
}
|
||||
|
||||
/// A view modifier that captures the window and enables animated resizing
|
||||
/// A view modifier that captures the window and enables animated resizing.
|
||||
///
|
||||
/// Automatically captures the host window and animates size changes
|
||||
/// when the provided size value changes.
|
||||
struct AnimatedWindowSizing: ViewModifier {
|
||||
let size: CGSize
|
||||
@State private var animator = WindowSizeAnimator.shared
|
||||
|
|
|
|||
Loading…
Reference in a new issue