Initial commit: Conjuga Spanish conjugation app
Includes SwiftData dual-store architecture (local reference + CloudKit user data), JSON-based data seeding, 20 tense guides, 20 grammar notes, SRS review system, course vocabulary, and widget support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
15
Conjuga/ConjugaWidget/NewWordIntent.swift
Normal file
15
Conjuga/ConjugaWidget/NewWordIntent.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
import AppIntents
|
||||
import WidgetKit
|
||||
|
||||
struct NewWordIntent: AppIntent {
|
||||
static let title: LocalizedStringResource = "New Word"
|
||||
static let description: IntentDescription = "Show a different word of the day"
|
||||
|
||||
func perform() async throws -> some IntentResult {
|
||||
let shared = UserDefaults(suiteName: "group.com.conjuga.app")
|
||||
let current = shared?.integer(forKey: "wordOffset") ?? 0
|
||||
shared?.set(current + 1, forKey: "wordOffset")
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
return .result()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user