Details ausgearbeitet

Linked colors to options menu

Options extension

Aussehen aufgebohrt:
 - erlaubt text von status zu ändern,
 - bessere beschriftung von Farben

desing änderung und bedienung

- heute status felder anklickbar,
- Farbpalette verdunkelt und kontrast reduziert
- Kalender Tage anklickbar gemacht
- Optionen überarbeitet
This commit is contained in:
2026-03-22 20:37:35 +01:00
parent 8615d1de07
commit 2b0797f50f
68 changed files with 1746 additions and 1351 deletions
+9
View File
@@ -0,0 +1,9 @@
using SQLite;
namespace cfs_tracker.Models;
public class ActivityItem
{
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Unique] public string Name { get; set; } = string.Empty;
public bool IsActive { get; set; } = true;
public int SortOrder { get; set; }
}
+11
View File
@@ -0,0 +1,11 @@
using SQLite;
namespace cfs_tracker.Models;
public class AppearanceSetting
{
[PrimaryKey]
public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
}
+7 -11
View File
@@ -1,12 +1,8 @@
namespace cfs_tracker.Models
namespace cfs_tracker.Models;
public class CalendarDaySummary
{
public class CalendarDaySummary
{
public DateTime Date { get; set; }
public double? Average { get; set; } // null = kein Eintrag
public int EntryCount { get; set; }
public HealthState? DisplayState { get; set; }
}
}
public DateTime Date { get; set; }
public double? Average { get; set; }
public int EntryCount { get; set; }
public HealthState? DisplayState { get; set; }
}
+9 -13
View File
@@ -1,14 +1,10 @@
namespace cfs_tracker.Models
namespace cfs_tracker.Models;
public class DayDetailSummary
{
public class DayDetailSummary
{
public DateTime Date { get; set; }
public int GreenCount { get; set; }
public int YellowCount { get; set; }
public int RedCount { get; set; }
public int GrayCount { get; set; }
public List<HealthEntry> Entries { get; set; } = new();
}
}
public DateTime Date { get; set; }
public int GreenCount { get; set; }
public int YellowCount { get; set; }
public int RedCount { get; set; }
public int GrayCount { get; set; }
public List<HealthEntry> Entries { get; set; } = new();
}
+2 -7
View File
@@ -1,7 +1,2 @@
namespace cfs_tracker.Models;
public enum DayPart
{
Morning = 0,
Afternoon = 1
}
namespace cfs_tracker.Models;
public enum DayPart { Morning=0, Afternoon=1 }
+2 -8
View File
@@ -1,8 +1,2 @@
namespace cfs_tracker.Models
{
public enum EntrySource
{
App = 0,
Notification = 1
}
}
namespace cfs_tracker.Models;
public enum EntrySource { App=0, Notification=1 }
+5 -10
View File
@@ -1,16 +1,11 @@
using cfs_tracker.Models;
using SQLite;
namespace cfs_tracker.Models;
public class HealthEntry
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public DateTime Timestamp { get; set; }
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Indexed] public DateTime Timestamp { get; set; }
public HealthState State { get; set; }
public EntrySource Source { get; set; }
[Indexed] public int? ActivityId { get; set; }
public DateTime UpdatedAt { get; set; }
}
}
+8
View File
@@ -0,0 +1,8 @@
using SQLite;
namespace cfs_tracker.Models;
public class HealthEntrySymptom
{
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Indexed] public int HealthEntryId { get; set; }
[Indexed] public int SymptomItemId { get; set; }
}
+2 -10
View File
@@ -1,10 +1,2 @@
namespace cfs_tracker.Models
{
public enum HealthState
{
Gray = 0, // Totalausfall
Red = 1, // schlecht
Yellow = 2, // so lala
Green = 3 // gut
}
}
namespace cfs_tracker.Models;
public enum HealthState { Gray=0, Red=1, Yellow=2, Green=3 }
+26 -12
View File
@@ -1,27 +1,41 @@
namespace cfs_tracker.Models;
using cfs_tracker.Helpers;
namespace cfs_tracker.Models;
public static class HealthStateExtensions
{
public static Color ToColor(this HealthState state)
public static string ToColorKey(this HealthState state)
{
return state switch
{
HealthState.Green => Color.FromArgb("#4CAF50"),
HealthState.Yellow => Color.FromArgb("#FBC02D"),
HealthState.Red => Color.FromArgb("#E53935"),
HealthState.Gray => Color.FromArgb("#757575"),
_ => Colors.Transparent
HealthState.Green => ThemeKeys.StateGreen,
HealthState.Yellow => ThemeKeys.StateYellow,
HealthState.Red => ThemeKeys.StateRed,
HealthState.Gray => ThemeKeys.StateGray,
_ => ThemeKeys.PanelBackground2
};
}
public static string ToLabel(this HealthState state)
public static string ToTextKey(this HealthState state)
{
return state switch
{
HealthState.Green => "Gut",
HealthState.Yellow => "So lala",
HealthState.Red => "Schlecht",
HealthState.Gray => "Totalausfall",
HealthState.Green => ThemeKeys.StatusGreenText,
HealthState.Yellow => ThemeKeys.StatusYellowText,
HealthState.Red => ThemeKeys.StatusRedText,
HealthState.Gray => ThemeKeys.StatusGrayText,
_ => ""
};
}
public static string ToFallbackText(this HealthState state)
{
return state switch
{
HealthState.Green => "Grün",
HealthState.Yellow => "Gelb",
HealthState.Red => "Rot",
HealthState.Gray => "Grau",
_ => ""
};
}
+2
View File
@@ -0,0 +1,2 @@
namespace cfs_tracker.Models;
public enum OptionsTab { Database, Activities, Symptoms, Appearance }
+9
View File
@@ -0,0 +1,9 @@
using SQLite;
namespace cfs_tracker.Models;
public class SymptomItem
{
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Unique] public string Name { get; set; } = string.Empty;
public bool IsActive { get; set; } = true;
public int SortOrder { get; set; }
}
+7
View File
@@ -0,0 +1,7 @@
using SQLite;
namespace cfs_tracker.Models;
public class ThemeSettingItem
{
[PrimaryKey] public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
}
+8 -12
View File
@@ -1,13 +1,9 @@
namespace cfs_tracker.Models
namespace cfs_tracker.Models;
public class WeekDaySummary
{
public class WeekDaySummary
{
public DateTime Date { get; set; }
public double? MorningAverage { get; set; } // vor 12 Uhr
public double? AfternoonAverage { get; set; } // ab 12 Uhr
public int MorningCount { get; set; }
public int AfternoonCount { get; set; }
}
}
public DateTime Date { get; set; }
public double? MorningAverage { get; set; }
public double? AfternoonAverage { get; set; }
public int MorningCount { get; set; }
public int AfternoonCount { get; set; }
}