small bug fixes
This commit is contained in:
@@ -41,16 +41,16 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
private bool isEditing;
|
||||
|
||||
[ObservableProperty]
|
||||
private string greenStatusText = "Grün";
|
||||
private string greenStatusText = "Green";
|
||||
|
||||
[ObservableProperty]
|
||||
private string yellowStatusText = "Gelb";
|
||||
private string yellowStatusText = "Yellow";
|
||||
|
||||
[ObservableProperty]
|
||||
private string redStatusText = "Rot";
|
||||
private string redStatusText = "Red";
|
||||
|
||||
[ObservableProperty]
|
||||
private string grayStatusText = "Schwarz";
|
||||
private string grayStatusText = "Black";
|
||||
|
||||
[ObservableProperty]
|
||||
private Color greenStateColor = Color.FromArgb("#4E8B69");
|
||||
@@ -81,7 +81,7 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
public ObservableCollection<DayPartOptionItemViewModel> Parts { get; } = new();
|
||||
|
||||
public string ModeText => IsFutureDate
|
||||
? "Zukünftige Tage können nicht gespeichert werden."
|
||||
? LocalizationService.Translate("QuickEntry_FutureDateMessage")
|
||||
: string.Empty;
|
||||
|
||||
public bool CanSave => !IsFutureDate;
|
||||
@@ -89,8 +89,8 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
public bool CanExplicitSave => IsEditing && SelectedState.HasValue && !IsFutureDate;
|
||||
|
||||
public string SelectedStateSummaryText => SelectedState.HasValue
|
||||
? $"Gewählter Status: {GetStateText(SelectedState.Value)}"
|
||||
: "Bitte Status wählen";
|
||||
? LocalizationService.Format("QuickEntry_SelectedStatusFormat", GetStateText(SelectedState.Value))
|
||||
: LocalizationService.Translate("QuickEntry_SelectStatusPrompt");
|
||||
|
||||
public IAsyncRelayCommand SaveGreenCommand { get; }
|
||||
public IAsyncRelayCommand SaveYellowCommand { get; }
|
||||
@@ -214,11 +214,11 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
Activities.Add(new ActivityPickerItemViewModel
|
||||
{
|
||||
Id = null,
|
||||
Name = "Keine Tätigkeit"
|
||||
Name = LocalizationService.Translate("Activity_None")
|
||||
});
|
||||
|
||||
var items = await _activityRepository.GetActiveAsync();
|
||||
foreach (var item in items.Where(x => !string.Equals(x.Name, "Keine Tätigkeit", StringComparison.OrdinalIgnoreCase)))
|
||||
foreach (var item in items.Where(x => !LocalizationService.IsNoActivityLabel(x.Name)))
|
||||
{
|
||||
Activities.Add(new ActivityPickerItemViewModel
|
||||
{
|
||||
@@ -251,13 +251,13 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
Parts.Add(new DayPartOptionItemViewModel
|
||||
{
|
||||
Value = DayPart.Morning,
|
||||
Name = "Vormittag"
|
||||
Name = LocalizationService.Translate("Common_Morning")
|
||||
});
|
||||
|
||||
Parts.Add(new DayPartOptionItemViewModel
|
||||
{
|
||||
Value = DayPart.Afternoon,
|
||||
Name = "Nachmittag"
|
||||
Name = LocalizationService.Translate("Common_Afternoon")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -366,10 +366,18 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
|
||||
private void LoadAppearance()
|
||||
{
|
||||
GreenStatusText = _appearanceService.GetText(AppearanceKeys.StatusGreenText, "Grün");
|
||||
YellowStatusText = _appearanceService.GetText(AppearanceKeys.StatusYellowText, "Gelb");
|
||||
RedStatusText = _appearanceService.GetText(AppearanceKeys.StatusRedText, "Rot");
|
||||
GrayStatusText = _appearanceService.GetText(AppearanceKeys.StatusGrayText, "Schwarz");
|
||||
GreenStatusText = _appearanceService.GetText(
|
||||
AppearanceKeys.StatusGreenText,
|
||||
LocalizationService.GetDefaultStatusText(AppearanceKeys.StatusGreenText));
|
||||
YellowStatusText = _appearanceService.GetText(
|
||||
AppearanceKeys.StatusYellowText,
|
||||
LocalizationService.GetDefaultStatusText(AppearanceKeys.StatusYellowText));
|
||||
RedStatusText = _appearanceService.GetText(
|
||||
AppearanceKeys.StatusRedText,
|
||||
LocalizationService.GetDefaultStatusText(AppearanceKeys.StatusRedText));
|
||||
GrayStatusText = _appearanceService.GetText(
|
||||
AppearanceKeys.StatusGrayText,
|
||||
LocalizationService.GetDefaultStatusText(AppearanceKeys.StatusGrayText));
|
||||
|
||||
GreenStateColor = _appearanceService.GetColor(AppearanceKeys.StateGreen, "#4E8B69");
|
||||
YellowStateColor = _appearanceService.GetColor(AppearanceKeys.StateYellow, "#B89A42");
|
||||
@@ -417,6 +425,7 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
|
||||
case "gray":
|
||||
case "grey":
|
||||
case "black":
|
||||
case "grau":
|
||||
case "schwarz":
|
||||
state = HealthState.Gray;
|
||||
@@ -441,4 +450,4 @@ public partial class QuickEntryViewModel : ObservableObject
|
||||
|
||||
item.IsSelected = !item.IsSelected;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user