Anniversary categories (wedding, jubilee, own) and month grouping

- Birthday becomes "anniversary" with a category: birthday, wedding
  anniversary (with Silver/Gold/... names), jubilee, memorial day
- Own categories: Settings > Categories (icon, color, text with {0}/{o})
- Sidebar "Categories" lists anniversaries across folders with counts
- Group by month (any view), groups fold with a click
- Folders named Hochzeit/Wedding migrate yearly tasks once
- Old files keep working (JSON "IsBirthday" maps to IsAnniversary)
- 74 tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-29 15:06:19 +01:00
parent bb6612420d
commit 00e9990feb
22 changed files with 1086 additions and 104 deletions

View File

@@ -18,11 +18,25 @@ namespace ReminderOrganizer.Converters
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Binding.DoNothing;
}
/// <summary>TaskBucket → localized group header ("Overdue", "Today", …).</summary>
/// <summary>Task → first day of its month (group key for month grouping).</summary>
public class MonthKeyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) =>
value is ReminderTask t ? TaskQuery.MonthKey(t) : DateTime.MinValue;
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Binding.DoNothing;
}
/// <summary>Group key → header: TaskBucket → "TODAY" …, month → "DECEMBER 2026".</summary>
public class BucketHeaderConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is DateTime month)
{
var c = ReminderTask.DisplayCulture?.Invoke() ?? CultureInfo.CurrentCulture;
return month.ToString("MMMM yyyy", c).ToUpper(c);
}
var loc = ServiceLocator.Services.GetService(typeof(ILocalizationService)) as ILocalizationService;
var key = "Bucket" + value;
return loc?.GetString(key) ?? key;