Add social media share functionality to Month and Year views

- Add share button to MonthCard and YearCard headers
- Create social media-friendly "Monthly Mood Wrap" and "Year in Review" designs
- Show top mood, days tracked, and mood breakdown with colorful bar charts
- Add ImageOnlyShareSheet to share images without extra text
- Uses user's selected theme colors and icon pack

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-10 23:16:48 -06:00
parent f822927e98
commit 4713192d55
3 changed files with 306 additions and 37 deletions

View File

@@ -40,20 +40,35 @@ class ShareActivityItemSource: NSObject, UIActivityItemSource {
struct ShareSheet: UIViewControllerRepresentable {
let photo: UIImage
func makeUIViewController(context: Context) -> UIActivityViewController {
let text = "ifeel"
let itemSource = ShareActivityItemSource(shareText: text, shareImage: photo)
let activityItems: [Any] = [photo, text, itemSource]
let controller = UIActivityViewController(
activityItems: activityItems,
applicationActivities: nil)
return controller
}
func updateUIViewController(_ vc: UIActivityViewController, context: Context) {
}
}
struct ImageOnlyShareSheet: UIViewControllerRepresentable {
let photo: UIImage
func makeUIViewController(context: Context) -> UIActivityViewController {
let controller = UIActivityViewController(
activityItems: [photo],
applicationActivities: nil)
return controller
}
func updateUIViewController(_ vc: UIActivityViewController, context: Context) {
}
}