feat(sharing): implement unified sharing system for social media
Replace old ProgressCardGenerator with protocol-based sharing architecture supporting trips, achievements, and stadium progress. Features 8 color themes, Instagram Stories optimization (1080x1920), and reusable card components with map snapshots. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,20 @@ struct AchievementsListView: View {
|
||||
}
|
||||
.themedBackground()
|
||||
.navigationTitle("Achievements")
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarTrailing) {
|
||||
if !earnedAchievements.isEmpty {
|
||||
ShareButton(
|
||||
content: AchievementCollectionContent(
|
||||
achievements: earnedAchievements,
|
||||
year: Calendar.current.component(.year, from: Date())
|
||||
),
|
||||
style: .icon
|
||||
)
|
||||
.foregroundStyle(Theme.warmOrange)
|
||||
}
|
||||
}
|
||||
}
|
||||
.task {
|
||||
await loadAchievements()
|
||||
}
|
||||
@@ -184,6 +198,10 @@ struct AchievementsListView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var earnedAchievements: [AchievementProgress] {
|
||||
achievements.filter { $0.isEarned }
|
||||
}
|
||||
|
||||
private var filteredAchievements: [AchievementProgress] {
|
||||
let filtered: [AchievementProgress]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user