Farbpalette vorladen lassen

Bootstraper läd jetzt die farbeinstellung sofort und nicht nachträglich

cleanup and rework

PDF switch to HTML

export fix

Colorsystem

Farben für knöpfe hinzugefügt als anpassung

button color

button color primary and secondary change
This commit is contained in:
2026-03-23 22:42:52 +01:00
parent d5649dc189
commit d85f2e0fb3
84 changed files with 4216 additions and 1814 deletions
+11 -3
View File
@@ -1,9 +1,17 @@
using SQLite;
namespace cfs_tracker.Models;
[Table("Activities")]
public class ActivityItem
{
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Unique] public string Name { get; set; } = string.Empty;
public bool IsActive { get; set; } = true;
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[MaxLength(120), Unique]
public string Name { get; set; } = string.Empty;
public int SortOrder { get; set; }
public bool IsActive { get; set; } = true;
}
+7 -3
View File
@@ -1,11 +1,15 @@
using SQLite;
using SQLite;
namespace cfs_tracker.Models;
[Table("AppearanceSettings")]
public class AppearanceSetting
{
[PrimaryKey]
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[MaxLength(80), Unique]
public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
}
}
+8
View File
@@ -0,0 +1,8 @@
namespace cfs_tracker.Models;
public sealed class AverageStateResult
{
public bool HasValue { get; init; }
public double AverageScore { get; init; }
public HealthState State { get; init; }
}
-8
View File
@@ -1,8 +0,0 @@
namespace cfs_tracker.Models;
public class CalendarDaySummary
{
public DateTime Date { get; set; }
public double? Average { get; set; }
public int EntryCount { get; set; }
public HealthState? DisplayState { get; set; }
}
-10
View File
@@ -1,10 +0,0 @@
namespace cfs_tracker.Models;
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();
}
-2
View File
@@ -1,2 +0,0 @@
namespace cfs_tracker.Models;
public enum DayPart { Morning=0, Afternoon=1 }
-2
View File
@@ -1,2 +0,0 @@
namespace cfs_tracker.Models;
public enum EntrySource { App=0, Notification=1 }
+31 -3
View File
@@ -1,11 +1,39 @@
using SQLite;
namespace cfs_tracker.Models;
[Table("HealthEntries")]
public class HealthEntry
{
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Indexed] public DateTime Timestamp { get; set; }
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[Indexed]
public DateTime EntryDate { get; set; }
[Indexed]
public DateTime Timestamp { get; set; }
[Indexed]
public HealthState State { get; set; }
[Indexed]
public EntrySource Source { get; set; }
[Indexed] public int? ActivityId { get; set; }
[Indexed]
public int? DayPartValue { get; set; }
[Indexed]
public int? ActivityId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
[Ignore]
public DayPart? DayPart
{
get => DayPartValue.HasValue ? (DayPart)DayPartValue.Value : null;
set => DayPartValue = value.HasValue ? (int)value.Value : null;
}
}
+12 -4
View File
@@ -1,8 +1,16 @@
using SQLite;
namespace cfs_tracker.Models;
[Table("HealthEntrySymptom")]
public class HealthEntrySymptom
{
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Indexed] public int HealthEntryId { get; set; }
[Indexed] public int SymptomItemId { get; set; }
}
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[Indexed]
public int HealthEntryId { get; set; }
[Indexed]
public int SymptomItemId { get; set; }
}
-2
View File
@@ -1,2 +0,0 @@
namespace cfs_tracker.Models;
public enum HealthState { Gray=0, Red=1, Yellow=2, Green=3 }
-42
View File
@@ -1,42 +0,0 @@
using cfs_tracker.Helpers;
namespace cfs_tracker.Models;
public static class HealthStateExtensions
{
public static string ToColorKey(this HealthState state)
{
return state switch
{
HealthState.Green => ThemeKeys.StateGreen,
HealthState.Yellow => ThemeKeys.StateYellow,
HealthState.Red => ThemeKeys.StateRed,
HealthState.Gray => ThemeKeys.StateGray,
_ => ThemeKeys.PanelBackground2
};
}
public static string ToTextKey(this HealthState state)
{
return state switch
{
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",
_ => ""
};
}
}
+25
View File
@@ -0,0 +1,25 @@
using SQLite;
namespace cfs_tracker.Models;
[Table("NotificationSchedules")]
public class NotificationSchedule
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public int DayOfWeekValue { get; set; }
public int Hour { get; set; }
public int Minute { get; set; }
public bool IsEnabled { get; set; } = true;
[Ignore]
public DayOfWeek DayOfWeek
{
get => (DayOfWeek)DayOfWeekValue;
set => DayOfWeekValue = (int)value;
}
}
-2
View File
@@ -1,2 +0,0 @@
namespace cfs_tracker.Models;
public enum OptionsTab { Database, Activities, Symptoms, Appearance }
+11 -3
View File
@@ -1,9 +1,17 @@
using SQLite;
namespace cfs_tracker.Models;
[Table("Symptoms")]
public class SymptomItem
{
[PrimaryKey, AutoIncrement] public int Id { get; set; }
[Unique] public string Name { get; set; } = string.Empty;
public bool IsActive { get; set; } = true;
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[MaxLength(120), Unique]
public string Name { get; set; } = string.Empty;
public int SortOrder { get; set; }
public bool IsActive { get; set; } = true;
}
-7
View File
@@ -1,7 +0,0 @@
using SQLite;
namespace cfs_tracker.Models;
public class ThemeSettingItem
{
[PrimaryKey] public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
}
+23
View File
@@ -0,0 +1,23 @@
namespace cfs_tracker.Models;
public enum HealthState : byte
{
Green = 0,
Yellow = 1,
Red = 2,
Gray = 3
}
public enum DayPart : byte
{
Morning = 0,
Afternoon = 1
}
public enum EntrySource : byte
{
App = 0,
Backfill = 1,
Notification = 2,
Import = 3
}
-9
View File
@@ -1,9 +0,0 @@
namespace cfs_tracker.Models;
public class WeekDaySummary
{
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; }
}