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:
@@ -7,21 +7,19 @@ namespace cfs_tracker.ViewModels;
|
||||
public partial class DayEntryItemViewModel : ObservableObject
|
||||
{
|
||||
public int Id { get; init; }
|
||||
|
||||
public string TimeText { get; init; } = string.Empty;
|
||||
public DateTime Date { get; init; }
|
||||
public string SlotText { get; init; } = string.Empty;
|
||||
public string StateText { get; init; } = string.Empty;
|
||||
|
||||
public string ActivityText { get; init; } = string.Empty;
|
||||
public string SymptomsText { get; init; } = string.Empty;
|
||||
public bool IsBackfill { get; init; }
|
||||
public Color StateColor { get; init; } = Colors.Transparent;
|
||||
public Color ForegroundColor { get; init; } = Colors.White;
|
||||
|
||||
public bool HasActivity => !string.IsNullOrWhiteSpace(ActivityText);
|
||||
public bool HasSymptoms => !string.IsNullOrWhiteSpace(SymptomsText);
|
||||
public bool HasDetails => HasActivity || HasSymptoms;
|
||||
|
||||
public string FoldoutText => IsExpanded ? "Details ausblenden" : "Details anzeigen";
|
||||
|
||||
public Color BackgroundColor { get; init; } = Colors.Transparent;
|
||||
public Color TextColor { get; init; } = Colors.White;
|
||||
public string DetailsButtonText => IsExpanded ? "Details ausblenden" : "Details anzeigen";
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isExpanded;
|
||||
@@ -33,12 +31,16 @@ public partial class DayEntryItemViewModel : ObservableObject
|
||||
ToggleExpandedCommand = new RelayCommand(ToggleExpanded);
|
||||
}
|
||||
|
||||
partial void OnIsExpandedChanged(bool value)
|
||||
{
|
||||
OnPropertyChanged(nameof(DetailsButtonText));
|
||||
}
|
||||
|
||||
private void ToggleExpanded()
|
||||
{
|
||||
if (!HasDetails)
|
||||
return;
|
||||
|
||||
IsExpanded = !IsExpanded;
|
||||
OnPropertyChanged(nameof(FoldoutText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user