pageta-native/Sources/Core/Theme/PagetaBrand.swift
Till JS 47699888c6 mana statt »e.V.«: Schweizer Verein (kein Store-Release, nur Quelltext-Korrektur)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 20:32:06 +02:00

37 lines
1.2 KiB
Swift

import ManaAuthUI
import ManaTokens
/// Brücke zwischen der aktiven Theme-Variant und der ``ManaBrandConfig``
/// von `ManaAuthUI`. Baut die Brand-Werte aus einer beliebigen
/// ``ManaTheme``-Variant — so folgt auch die Auth-Reise (Login,
/// Sign-Up, Konto) der User-Theme-Wahl.
enum PagetaBrand {
/// `ManaBrandConfig` für eine konkrete Variant. App-Name, Tagline und
/// Logo bleiben fix (Pageta-Identität), nur die Farben kommen aus der
/// gewählten Variant.
static func config(for theme: ManaTheme) -> ManaBrandConfig {
ManaBrandConfig(
appName: "Pageta",
tagline: "Reader für den Verein mana",
logoSymbol: "book.pages",
// Echtes Pageta-Logo (paper-themed SVG aus dem Apple Icon
// Composer) statt SF-Symbol-Stand-in im Login-Sheet.
logoAssetName: "PagetaLogo",
background: theme.background,
foreground: theme.foreground,
surface: theme.surface,
mutedForeground: theme.mutedForeground,
border: theme.border,
primary: theme.primary,
primaryForeground: theme.primaryForeground,
error: theme.error,
success: theme.success
)
}
/// Convenience für den Default-Brand (paper) — für Previews und
/// Stellen ohne reaktiven Variant-Bezug.
static var manaBrand: ManaBrandConfig {
config(for: .paper)
}
}