diff options
| author | gigagamerchaddhruv-spec <gigagamerchaddhruv-spec@users.noreply.github.com> | 2026-10-14 20:18:20 +0530 |
|---|---|---|
| committer | gigagamerchaddhruv-spec <gigagamerchaddhruv-spec@users.noreply.github.com> | 2026-10-14 20:18:20 +0530 |
| commit | aceca8b5dfc8edd378ee9ff891bccb0f94c69f31 (patch) | |
| tree | 08401ce8d050afbbe77514f479601a8e9535f4ec /Sources/BubombCore/Models/AppSettings.swift | |
Diffstat (limited to 'Sources/BubombCore/Models/AppSettings.swift')
| -rw-r--r-- | Sources/BubombCore/Models/AppSettings.swift | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Sources/BubombCore/Models/AppSettings.swift b/Sources/BubombCore/Models/AppSettings.swift new file mode 100644 index 0000000..949ae75 --- /dev/null +++ b/Sources/BubombCore/Models/AppSettings.swift @@ -0,0 +1,55 @@ +import Foundation + +public enum AnimationPreference: String, Codable, CaseIterable, Equatable, Sendable { + case full = "Full (Sparks & Smoke)" + case subtle = "Subtle (Sparks Only)" + case none = "None (Reduced Motion)" +} + +/// Persistent user configuration for Bubomb. +public struct AppSettings: Codable, Equatable, Sendable { + public var activePayload: Payload? + public var savedPayloads: [Payload] + public var launchAtLogin: Bool + public var startSilentlyInMenuBar: Bool + public var animationPreference: AnimationPreference + public var confirmDestructiveActions: Bool + public var playCompletionFeedback: Bool + public var recentExecutions: [ExecutionRecord] + + public static let currentVersion = "1.0.0" + public static let buildNumber = "1" + + public init( + activePayload: Payload? = nil, + savedPayloads: [Payload] = [], + launchAtLogin: Bool = false, + startSilentlyInMenuBar: Bool = true, + animationPreference: AnimationPreference = .full, + confirmDestructiveActions: Bool = true, + playCompletionFeedback: Bool = true, + recentExecutions: [ExecutionRecord] = [] + ) { + self.activePayload = activePayload + self.savedPayloads = savedPayloads + self.launchAtLogin = launchAtLogin + self.startSilentlyInMenuBar = startSilentlyInMenuBar + self.animationPreference = animationPreference + self.confirmDestructiveActions = confirmDestructiveActions + self.playCompletionFeedback = playCompletionFeedback + self.recentExecutions = recentExecutions + } + + public static var defaultSettings: AppSettings { + AppSettings( + activePayload: nil, + savedPayloads: [], + launchAtLogin: false, + startSilentlyInMenuBar: true, + animationPreference: .full, + confirmDestructiveActions: true, + playCompletionFeedback: true, + recentExecutions: [] + ) + } +} |
