From c02ebf39c746661a0c64f9279da2470ec80c3e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20V=C3=A1gner?= Date: Sun, 2 Jun 2024 20:45:31 +0200 Subject: [PATCH 01/13] fix: set correct text color in Editor --- Diary/Diary/Views/Entry/EntryCreateView.xaml | 3 ++- Diary/Diary/Views/Entry/EntryEditView.xaml | 3 ++- Diary/Diary/Views/Template/TemplateCreateView.xaml | 3 ++- Diary/Diary/Views/Template/TemplateEditView.xaml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Diary/Diary/Views/Entry/EntryCreateView.xaml b/Diary/Diary/Views/Entry/EntryCreateView.xaml index c052d13..3ea3e6d 100644 --- a/Diary/Diary/Views/Entry/EntryCreateView.xaml +++ b/Diary/Diary/Views/Entry/EntryCreateView.xaml @@ -120,7 +120,8 @@ + Text="{Binding Entry.Content}" + TextColor="{StaticResource PrimaryDarkText}" /> diff --git a/Diary/Diary/Views/Entry/EntryEditView.xaml b/Diary/Diary/Views/Entry/EntryEditView.xaml index d10d4cc..a0a8d49 100644 --- a/Diary/Diary/Views/Entry/EntryEditView.xaml +++ b/Diary/Diary/Views/Entry/EntryEditView.xaml @@ -107,7 +107,8 @@ + Text="{Binding Entry.Content}" + TextColor="{StaticResource PrimaryDarkText}" /> diff --git a/Diary/Diary/Views/Template/TemplateCreateView.xaml b/Diary/Diary/Views/Template/TemplateCreateView.xaml index 14fbae4..d86b063 100644 --- a/Diary/Diary/Views/Template/TemplateCreateView.xaml +++ b/Diary/Diary/Views/Template/TemplateCreateView.xaml @@ -43,7 +43,8 @@ + Text="{Binding Template.Content}" + TextColor="{StaticResource PrimaryDarkText}" /> diff --git a/Diary/Diary/Views/Template/TemplateEditView.xaml b/Diary/Diary/Views/Template/TemplateEditView.xaml index 4cb57a4..dcec4ee 100644 --- a/Diary/Diary/Views/Template/TemplateEditView.xaml +++ b/Diary/Diary/Views/Template/TemplateEditView.xaml @@ -43,7 +43,8 @@ + Text="{Binding Template.Content}" + TextColor="{StaticResource PrimaryDarkText}" /> From 83dfa8bbe2bef316ad2c02b6f04426d1d67ced7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20V=C3=A1gner?= Date: Sun, 2 Jun 2024 20:49:47 +0200 Subject: [PATCH 02/13] feat: make TimeMachine text more clear --- Diary/Diary/Services/DataSeedService.cs | 4 ++-- Diary/Diary/ViewModels/Entry/TimeMachineViewModel.cs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Diary/Diary/Services/DataSeedService.cs b/Diary/Diary/Services/DataSeedService.cs index 27e75e1..fdc1b5b 100644 --- a/Diary/Diary/Services/DataSeedService.cs +++ b/Diary/Diary/Services/DataSeedService.cs @@ -83,8 +83,8 @@ public static async Task SeedAsync(IEntryRepository entryRepository, ILabelRepos Id = Guid.NewGuid(), Title = "Family Dinner", Content = "We had a family dinner at Grandma's house. The food was amazing, and it was great to catch up with everyone.", - CreatedAt = new DateTime(2024, 5, 14, 21, 57, 43), - EditedAt = new DateTime(2024, 5, 14, 21, 57, 43), + CreatedAt = DateTime.Today.AddYears(-1), + EditedAt = DateTime.Today.AddYears(-1), IsFavorite = true, Mood = 5, NotificationId = NotificationHelper.GetNotificationIdFromCreationDate(new DateTime(2024, 5, 14, 21, 57, 43)) diff --git a/Diary/Diary/ViewModels/Entry/TimeMachineViewModel.cs b/Diary/Diary/ViewModels/Entry/TimeMachineViewModel.cs index bf49bab..a509bd9 100644 --- a/Diary/Diary/ViewModels/Entry/TimeMachineViewModel.cs +++ b/Diary/Diary/ViewModels/Entry/TimeMachineViewModel.cs @@ -8,7 +8,7 @@ namespace Diary.ViewModels.Entry; public partial class TimeMachineViewModel : ViewModelBase { private readonly IEntryClient _entryClient; - public string HeadingText { get; set; } = "Time machine is loading..."; + public string HeadingText { get; set; } = string.Empty; public ICollection? Entries { get; set; } public TimeMachineViewModel(IEntryClient entryClient) @@ -20,7 +20,9 @@ public override async Task OnAppearingAsync() { var _ = new BusyIndicator(this); Entries = await _entryClient.GetByDayFromPreviousYearsAsync(DateTime.Now); - HeadingText = Entries.Count > 0 ? "This day in the past..." : "Time machine has nothing to show today..."; + HeadingText = Entries.Count > 0 + ? "You created the following entries on this day in previous years:" + : "You haven't created any entries on this day in previous years."; } [RelayCommand] From f12a632e48c4decc3df940ecc772e4eaed257de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20V=C3=A1gner?= Date: Sun, 2 Jun 2024 20:57:53 +0200 Subject: [PATCH 03/13] fix: prevent content overflowing through the favorite icon --- Diary/Diary/Views/Entry/EntryListView.xaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Diary/Diary/Views/Entry/EntryListView.xaml b/Diary/Diary/Views/Entry/EntryListView.xaml index 67577ff..66287e6 100644 --- a/Diary/Diary/Views/Entry/EntryListView.xaml +++ b/Diary/Diary/Views/Entry/EntryListView.xaml @@ -94,14 +94,24 @@ Text="{Binding Content}" TextColor="{AppThemeBinding Light={StaticResource PrimaryDarkText}, Dark={StaticResource PrimaryLightText}}" - VerticalOptions="Center" /> + VerticalOptions="Center"> + + + + + +