SPB Git

Repository Public

AmbientTheme.swift 5.1 KB 129 lines swift

1// =============================================================================2//                  SP BOUCHER | SOFTWARE & RESEARCH3//             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING4// =============================================================================5//6// PROJECT METADATA7// -----------------------------------------------------------------------------8// Project          : SP Browser9// File             : SPBrowser/Core/Aura/AmbientTheme.swift10// Module           : SPBrowser11// Repository       : https://git.spboucher.ai/sp-browser12// Created          : 2026-11-1913// Last Modified    : 2026-11-1914//15// =============================================================================16// AUTHOR & PROFESSIONAL AFFILIATION17// =============================================================================18//19// Author           : Simon-Pierre Boucher20// Position         : Professor of Finance21// Institution      : Université du Québec en Outaouais (UQO)22// Department       : Département des sciences administratives23// Organization     : SP Boucher24//25// Website          : https://spboucher.ai26// Git              : https://git.spboucher.ai27//28// =============================================================================29// OFFICIAL CONTACT DIRECTORY30// =============================================================================31//32// General          : info@spboucher.ai33// Professional     : contact@spboucher.ai34// Direct           : simon@spboucher.ai35// Research         : research@spboucher.ai36// Development      : dev@spboucher.ai37// Support          : support@spboucher.ai38// Security/Admin   : admin@spboucher.ai39// Notifications    : notifications@spboucher.ai40//41// Preferred Contact: support@spboucher.ai42//43// =============================================================================44// COPYRIGHT & INTELLECTUAL PROPERTY45// =============================================================================46//47// Copyright (c) 202648// Simon-Pierre Boucher49//50// All rights reserved where applicable.51//52// This file is governed by the applicable project license,53// copyright notices, institutional agreements and relevant law.54//55// Unless expressly authorized by the applicable license or56// rights holder, copying, redistribution, sublicensing,57// publication and commercial exploitation are not permitted.58//59// Existing third-party rights and notices remain unaffected.60//61// =============================================================================62// CONFIDENTIALITY & SECURITY63// =============================================================================64//65// Classification   : Public66// Distribution     : Public repository; use is governed by the project license67// Security Contact : admin@spboucher.ai68//69// Access to this source does not independently grant permission70// to redistribute or disclose confidential materials.71//72// Do not embed credentials, private keys, access tokens,73// certificates or confidential personal information.74//75// =============================================================================76// LICENSE & MAINTENANCE77// =============================================================================78//79// License          : None specified (no license file in this repository)80// Maintainer       : Simon-Pierre Boucher81// Technical Contact: dev@spboucher.ai82//83// =============================================================================84// END OF SP BOUCHER SOURCE HEADER85// =============================================================================8687import Foundation8889/// The ambient themes of the start page (AURA Ambient Home). Pure description; drawing lives in `Shared/Aura/AmbientBackground.swift`.90enum AmbientTheme: String, Codable, CaseIterable, Sendable, Identifiable {91    case obsidian, aurora, liquid, cosmos, minimal92    var id: String { rawValue }9394    var title: String {95        switch self {96        case .obsidian: return L("Obsidian")97        case .aurora: return L("Aurora")98        case .liquid: return L("Liquid")99        case .cosmos: return L("Cosmos")100        case .minimal: return L("Minimal")101        }102    }103104    var summary: String {105        switch self {106        case .obsidian: return L("Deep black, no movement")107        case .aurora: return L("Slow coloured light")108        case .liquid: return L("Flowing glass")109        case .cosmos: return L("Depth of space")110        case .minimal: return L("Plain, no decoration")111        }112    }113114    /// Themes that only exist in a dark rendition; the start page content switches to light-on-dark over them.115    var isAlwaysDark: Bool { self == .obsidian || self == .cosmos }116    /// Whether the theme has a moving layer at all (it still stops under Reduce Motion, Low Power or in the background).117    var isAnimated: Bool { self == .aurora || self == .liquid || self == .cosmos }118119    /// The value used for a start page background saved by SP Browser 2.0.120    init(legacy: StartPageBackground) {121        switch legacy {122        case .aurora: self = .aurora123        case .plain: self = .minimal124        case .graphite: self = .obsidian125        case .dusk, .forest: self = .liquid126        }127    }128}129
Files main
Menu

Theme