- MoodListView: guestHint entfernt (Hilfetext oben weg) - MoodCard: nur noch ein Titel (mood.name), Animation-Badge raus; statischer LinearGradient statt TimelineView — kein Flimmern in der Auswahl, Animation kickt erst im Player - DefaultMoods: Preset-Namen ins Deutsche (Feuer, Atem, Polarlicht, Gewitter, Licht, Blitz, Ozean, Kerze, Polizei, Warnung, Sonnenaufgang, Sonnenuntergang, Wald, Lavendel, Kirschblüte, Herbst, Eis, Romanze, Mitternacht; IDs unangetastet) - MoodPlayerView: Tap auf Hintergrund toggelt Controls (vorher nur reveal — Tap-to-hide ging nur über 3s-Auto-Fade) - Widget-Entitlements: xcodegen hat keychain-access-groups ev.mana.session reinsynchronisiert (war in project.yml deklariert, im File fehlend — Drift behoben) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
76 lines
4 KiB
Swift
76 lines
4 KiB
Swift
import Foundation
|
|
|
|
/// 24 Preset-Moods — 1:1-Port von
|
|
/// `Code/moodlit/packages/moodlit-domain/src/default-moods.ts`.
|
|
///
|
|
/// Reihenfolge ist die Wire-Reihenfolge (Web-Bundle), damit die
|
|
/// Native-App dieselbe Sortierung auf der Übersicht zeigt wie die
|
|
/// Web-App. Beim Hinzufügen neuer Presets: gleichzeitig hier UND
|
|
/// im TS-File aktualisieren — kein automatischer Sync.
|
|
public enum DefaultMoods {
|
|
public static let all: [Mood] = [
|
|
Mood(id: "fire", userId: nil, name: "Feuer",
|
|
colors: ["#ff6b35", "#ff4500", "#dc143c", "#8b0000"], animation: .candle, isPreset: true),
|
|
Mood(id: "breath", userId: nil, name: "Atem",
|
|
colors: ["#667eea", "#764ba2", "#f093fb"], animation: .breath, isPreset: true),
|
|
Mood(id: "northern-lights", userId: nil, name: "Polarlicht",
|
|
colors: ["#5f27cd", "#341f97", "#8854d0", "#a29bfe"], animation: .wave, isPreset: true),
|
|
Mood(id: "thunder", userId: nil, name: "Gewitter",
|
|
colors: ["#2c3e50", "#34495e", "#ffffff", "#95a5a6"], animation: .thunder, isPreset: true),
|
|
Mood(id: "light", userId: nil, name: "Licht",
|
|
colors: ["#ffffff", "#f8f9fa", "#e9ecef"], animation: .gradient, isPreset: true),
|
|
Mood(id: "flash", userId: nil, name: "Blitz",
|
|
colors: ["#ffffff"], animation: .flash, isPreset: true),
|
|
Mood(id: "sos", userId: nil, name: "SOS",
|
|
colors: ["#ffffff"], animation: .sos, isPreset: true),
|
|
Mood(id: "ocean", userId: nil, name: "Ozean",
|
|
colors: ["#48dbfb", "#0abde3", "#10ac84", "#1dd1a1"], animation: .wave, isPreset: true),
|
|
Mood(id: "candle", userId: nil, name: "Kerze",
|
|
colors: ["#ff9f43", "#ee5a24", "#ffeaa7"], animation: .candle, isPreset: true),
|
|
Mood(id: "police", userId: nil, name: "Polizei",
|
|
colors: ["#e74c3c", "#3498db"], animation: .police, isPreset: true),
|
|
Mood(id: "warning", userId: nil, name: "Warnung",
|
|
colors: ["#f39c12", "#e67e22"], animation: .warning, isPreset: true),
|
|
Mood(id: "disco", userId: nil, name: "Disco",
|
|
colors: ["#e74c3c", "#9b59b6", "#3498db", "#1abc9c", "#f1c40f", "#e67e22"],
|
|
animation: .disco, isPreset: true),
|
|
Mood(id: "sunrise", userId: nil, name: "Sonnenaufgang",
|
|
colors: ["#1a1a2e", "#16213e", "#e94560", "#ff6b6b", "#feca57", "#fffacd"],
|
|
animation: .sunrise, isPreset: true),
|
|
Mood(id: "sunset", userId: nil, name: "Sonnenuntergang",
|
|
colors: ["#ff6b6b", "#feca57", "#ff9ff3", "#a29bfe", "#341f97", "#1a1a2e"],
|
|
animation: .sunset, isPreset: true),
|
|
Mood(id: "forest", userId: nil, name: "Wald",
|
|
colors: ["#27ae60", "#2ecc71", "#1abc9c", "#16a085"], animation: .pulse, isPreset: true),
|
|
Mood(id: "rave", userId: nil, name: "Rave",
|
|
colors: ["#ff0000", "#ff00ff", "#00ffff", "#00ff00",
|
|
"#ffff00", "#ff6600", "#0066ff", "#ff0066"],
|
|
animation: .rave, isPreset: true),
|
|
Mood(id: "scanner", userId: nil, name: "Scanner",
|
|
colors: ["#e74c3c"], animation: .scanner, isPreset: true),
|
|
Mood(id: "matrix", userId: nil, name: "Matrix",
|
|
colors: ["#00ff00"], animation: .matrix, isPreset: true),
|
|
Mood(id: "lavender", userId: nil, name: "Lavendel",
|
|
colors: ["#e6e6fa", "#dda0dd", "#da70d6", "#ba55d3"], animation: .pulse, isPreset: true),
|
|
Mood(id: "cherry-blossom", userId: nil, name: "Kirschblüte",
|
|
colors: ["#ffb7c5", "#ff69b4", "#ff1493", "#db7093"], animation: .wave, isPreset: true),
|
|
Mood(id: "autumn", userId: nil, name: "Herbst",
|
|
colors: ["#d35400", "#e67e22", "#f39c12", "#c0392b"], animation: .gradient, isPreset: true),
|
|
Mood(id: "ice", userId: nil, name: "Eis",
|
|
colors: ["#74b9ff", "#0984e3", "#81ecec", "#00cec9"], animation: .wave, isPreset: true),
|
|
Mood(id: "romance", userId: nil, name: "Romanze",
|
|
colors: ["#fd79a8", "#e84393", "#d63031", "#ff7675"], animation: .pulse, isPreset: true),
|
|
Mood(id: "midnight", userId: nil, name: "Mitternacht",
|
|
colors: ["#0c0c0c", "#1a1a2e", "#16213e", "#0f3460"], animation: .breath, isPreset: true),
|
|
]
|
|
|
|
private static let presetIds: Set<String> = Set(all.map(\.id))
|
|
|
|
public static func isPresetId(_ id: String) -> Bool {
|
|
presetIds.contains(id)
|
|
}
|
|
|
|
public static func byId(_ id: String) -> Mood? {
|
|
all.first { $0.id == id }
|
|
}
|
|
}
|