From cf3eda1a865a421b30c003f7ec518a9ebf51cb03 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Fri, 20 Dec 2024 16:24:52 +0100 Subject: [PATCH] feat(templates): improve data loading and caching in Boilerplate #9515 (#9516) --- .../Components/Layout/UserMenu.razor | 31 +++++----- .../Components/Layout/UserMenu.razor.cs | 7 +-- .../Authorized/Settings/ProfileSection.razor | 6 +- .../Settings/ProfileSection.razor.cs | 12 ++-- .../Authorized/Settings/SettingsPage.razor | 4 -- .../Authorized/Settings/SettingsPage.razor.cs | 6 +- .../Components/Pages/HomePage.razor | 58 +++++++++---------- .../Components/Pages/HomePage.razor.cs | 24 +++++--- .../OfflineDbContextModelBuilder.cs | 2 +- .../Data/CompiledModel/UserDtoEntityType.cs | 9 ++- ...241220023903_InitialMigration.Designer.cs} | 8 ++- ....cs => 20241220023903_InitialMigration.cs} | 7 ++- .../OfflineDbContextModelSnapshot.cs | 6 ++ .../Controllers/AttachmentController.cs | 10 ++-- .../Statistics/StatisticsController.cs | 2 +- .../src/Shared/Dtos/Identity/UserDto.cs | 9 +++ .../Extensions/ByteArrayExtensions.cs | 2 + 17 files changed, 113 insertions(+), 90 deletions(-) rename src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Data/Migrations/{20241030140343_InitialMigration.Designer.cs => 20241220023903_InitialMigration.Designer.cs} (89%) rename src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Data/Migrations/{20241030140343_InitialMigration.cs => 20241220023903_InitialMigration.cs} (80%) rename src/Templates/Boilerplate/Bit.Boilerplate/src/{Client/Boilerplate.Client.Core => Shared}/Extensions/ByteArrayExtensions.cs (94%) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/UserMenu.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/UserMenu.razor index d6c56d0648..75c0aacf01 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/UserMenu.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/UserMenu.razor @@ -1,8 +1,4 @@ -@inherits AppComponentBase - -@{ - var imageUrl = user.ProfileImageName is null ? null : $"{profileImageUrl}&file={user.ProfileImageName}"; -} +@inherits AppComponentBase