From c9ce239f4ea36dc119da3a9a568c33046ee2c3f8 Mon Sep 17 00:00:00 2001 From: Mohammad Hosein Rastegarinia Date: Mon, 30 Oct 2023 22:47:23 +0330 Subject: [PATCH] Remove todo pages --- src/Client/Core/Pages/HomePage.razor.cs | 5 - .../Identity/DeleteAccountConfirmModal.razor | 15 -- .../DeleteAccountConfirmModal.razor.cs | 25 --- .../DeleteAccountConfirmModal.razor.scss | 35 ---- .../Core/Pages/Identity/EditProfilePage.razor | 128 ------------ .../Pages/Identity/EditProfilePage.razor.cs | 125 ----------- .../Pages/Identity/EditProfilePage.razor.scss | 140 ------------- .../Identity/EmailConfirmationPage.razor | 50 ----- .../Identity/EmailConfirmationPage.razor.cs | 48 ----- .../Identity/EmailConfirmationPage.razor.scss | 48 ----- .../Pages/Identity/ForgotPasswordPage.razor | 42 ---- .../Identity/ForgotPasswordPage.razor.cs | 38 ---- .../Identity/ForgotPasswordPage.razor.scss | 25 --- .../Pages/Identity/ResetPasswordPage.razor | 47 ----- .../Pages/Identity/ResetPasswordPage.razor.cs | 72 ------- .../Identity/ResetPasswordPage.razor.scss | 20 -- .../Core/Pages/Identity/SignInPage.razor | 56 ----- .../Core/Pages/Identity/SignInPage.razor.cs | 52 ----- .../Core/Pages/Identity/SignInPage.razor.scss | 30 --- .../Core/Pages/Identity/SignUpPage.razor | 99 --------- .../Core/Pages/Identity/SignUpPage.razor.cs | 77 ------- .../Core/Pages/Identity/SignUpPage.razor.scss | 51 ----- src/Client/Core/Pages/TermsPage.razor | 106 ---------- src/Client/Core/Pages/TermsPage.razor.cs | 5 - src/Client/Core/Pages/TermsPage.razor.scss | 124 ----------- src/Client/Core/Pages/Todo/TodoPage.razor | 125 ----------- src/Client/Core/Pages/Todo/TodoPage.razor.cs | 191 ----------------- .../Core/Pages/Todo/TodoPage.razor.scss | 195 ------------------ .../Core/Shared/ConfirmMessageBox.razor | 25 --- .../Core/Shared/ConfirmMessageBox.razor.cs | 39 ---- .../Core/Shared/ConfirmMessageBox.razor.scss | 44 ---- .../Core/Shared/SignOutConfirmModal.razor | 15 -- .../Core/Shared/SignOutConfirmModal.razor.cs | 23 --- .../Shared/SignOutConfirmModal.razor.scss | 34 --- 34 files changed, 2154 deletions(-) delete mode 100644 src/Client/Core/Pages/HomePage.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor delete mode 100644 src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.scss delete mode 100644 src/Client/Core/Pages/Identity/EditProfilePage.razor delete mode 100644 src/Client/Core/Pages/Identity/EditProfilePage.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/EditProfilePage.razor.scss delete mode 100644 src/Client/Core/Pages/Identity/EmailConfirmationPage.razor delete mode 100644 src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.scss delete mode 100644 src/Client/Core/Pages/Identity/ForgotPasswordPage.razor delete mode 100644 src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.scss delete mode 100644 src/Client/Core/Pages/Identity/ResetPasswordPage.razor delete mode 100644 src/Client/Core/Pages/Identity/ResetPasswordPage.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/ResetPasswordPage.razor.scss delete mode 100644 src/Client/Core/Pages/Identity/SignInPage.razor delete mode 100644 src/Client/Core/Pages/Identity/SignInPage.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/SignInPage.razor.scss delete mode 100644 src/Client/Core/Pages/Identity/SignUpPage.razor delete mode 100644 src/Client/Core/Pages/Identity/SignUpPage.razor.cs delete mode 100644 src/Client/Core/Pages/Identity/SignUpPage.razor.scss delete mode 100644 src/Client/Core/Pages/TermsPage.razor delete mode 100644 src/Client/Core/Pages/TermsPage.razor.cs delete mode 100644 src/Client/Core/Pages/TermsPage.razor.scss delete mode 100644 src/Client/Core/Pages/Todo/TodoPage.razor delete mode 100644 src/Client/Core/Pages/Todo/TodoPage.razor.cs delete mode 100644 src/Client/Core/Pages/Todo/TodoPage.razor.scss delete mode 100644 src/Client/Core/Shared/ConfirmMessageBox.razor delete mode 100644 src/Client/Core/Shared/ConfirmMessageBox.razor.cs delete mode 100644 src/Client/Core/Shared/ConfirmMessageBox.razor.scss delete mode 100644 src/Client/Core/Shared/SignOutConfirmModal.razor delete mode 100644 src/Client/Core/Shared/SignOutConfirmModal.razor.cs delete mode 100644 src/Client/Core/Shared/SignOutConfirmModal.razor.scss diff --git a/src/Client/Core/Pages/HomePage.razor.cs b/src/Client/Core/Pages/HomePage.razor.cs deleted file mode 100644 index 6df9af6..0000000 --- a/src/Client/Core/Pages/HomePage.razor.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Bit.Fluent.Player.Client.Core.Pages; - -public partial class HomePage -{ -} diff --git a/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor b/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor deleted file mode 100644 index 82d83f6..0000000 --- a/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor +++ /dev/null @@ -1,15 +0,0 @@ -@inherits AppComponentBase - - - - \ No newline at end of file diff --git a/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.cs b/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.cs deleted file mode 100644 index 89e6d07..0000000 --- a/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace Bit.Fluent.Player.Client.Core.Pages.Identity; - -public partial class DeleteAccountConfirmModal -{ - [Parameter] - public bool IsOpen { get; set; } - - [Parameter] public EventCallback IsOpenChanged { get; set; } - - private async Task CloseModal() - { - IsOpen = false; - - await IsOpenChanged.InvokeAsync(false); - } - - private async Task DeleteAccount() - { - await HttpClient.DeleteAsync("User/Delete"); - - await AuthenticationService.SignOut(); - - await CloseModal(); - } -} diff --git a/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.scss b/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.scss deleted file mode 100644 index daac041..0000000 --- a/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.scss +++ /dev/null @@ -1,35 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.modal-body { - display: flex; - position: relative; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(28px) rem2(110px); - - @include lt-lg { - padding: rem2(28px) rem2(47px); - } -} - -.modal-close-btn-container { - top: 0; - right: 0; - position: absolute; -} - -.modal-title { - color: #dc0000; - font-weight: 600; - font-size: rem2(24px); - line-height: rem2(40px); - margin-bottom: rem2(12px); -} - -.modal-desc { - font-size: rem2(18px); - line-height: rem2(24px); - margin-bottom: rem2(36px); -} diff --git a/src/Client/Core/Pages/Identity/EditProfilePage.razor b/src/Client/Core/Pages/Identity/EditProfilePage.razor deleted file mode 100644 index ebab9ff..0000000 --- a/src/Client/Core/Pages/Identity/EditProfilePage.razor +++ /dev/null @@ -1,128 +0,0 @@ -@page "/edit-profile" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.EditProfileTitle)] - -
-
- @if (string.IsNullOrEmpty(_editProfileMessage) is false) - { - - @_editProfileMessage - - } - -

- @Localizer[nameof(AppStrings.EditProfileTitle)] -

- - @if (_isLoading) - { -
- -
- } - else - { -
- -
- -
- @if (_user.ProfileImageName is not null) - { - - @Localizer[nameof(AppStrings.Remove)] - - } - - @Localizer[nameof(AppStrings.ProfileImage)] - -
@_profileImageError
-
- - - - -
- - -
- -
- - -
- -
- - - - - -
- - - @Localizer[nameof(AppStrings.Save)] - -
- - } -
-
-
- - @Localizer[nameof(AppStrings.DeleteAccount)] - -
-
- - @Localizer[nameof(AppStrings.DeleteAccountPrompt)] - -
-
- - @Localizer[nameof(AppStrings.DeleteAccount)] - -
-
- - diff --git a/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs b/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs deleted file mode 100644 index 8912594..0000000 --- a/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs +++ /dev/null @@ -1,125 +0,0 @@ -using Bit.Fluent.Player.Shared.Dtos.Identity; - -namespace Bit.Fluent.Player.Client.Core.Pages.Identity; - -[Authorize] -public partial class EditProfilePage -{ - private bool _isSaving; - private bool _isRemoving; - private bool _isLoading; - private string? _profileImageUrl; - private string? _profileImageError; - private string? _editProfileMessage; - private string? _profileImageUploadUrl; - private string? _profileImageRemoveUrl; - private BitMessageBarType _editProfileMessageType; - private UserDto _user = new(); - private readonly EditUserDto _userToEdit = new(); - private bool _isDeleteAccountConfirmModalOpen; - - protected override async Task OnInitAsync() - { - _isLoading = true; - - try - { - await LoadEditProfileData(); - - var access_token = await PrerenderStateService.GetValue($"{nameof(EditProfilePage)}-access_token", AuthTokenProvider.GetAccessTokenAsync); - - _profileImageUploadUrl = $"{Configuration.GetApiServerAddress()}Attachment/UploadProfileImage?access_token={access_token}"; - _profileImageUrl = $"{Configuration.GetApiServerAddress()}Attachment/GetProfileImage?access_token={access_token}"; - _profileImageRemoveUrl = $"Attachment/RemoveProfileImage?access_token={access_token}"; - } - finally - { - _isLoading = false; - } - - await base.OnInitAsync(); - } - - private async Task LoadEditProfileData() - { - _user = await PrerenderStateService.GetValue($"{nameof(EditProfilePage)}-{nameof(_user)}", GetCurrentUser) ?? new(); - - UpdateEditProfileData(); - } - - private async Task RefreshProfileData() - { - _user = await GetCurrentUser() ?? new(); - - UpdateEditProfileData(); - - PubSubService.Publish(PubSubMessages.PROFILE_UPDATED, _user); - } - - private void UpdateEditProfileData() - { - _userToEdit.Gender = _user.Gender; - _userToEdit.FullName = _user.FullName; - _userToEdit.BirthDate = _user.BirthDate; - } - - private Task GetCurrentUser() => HttpClient.GetFromJsonAsync("User/GetCurrentUser", AppJsonContext.Default.UserDto); - - - private async Task DoSave() - { - if (_isSaving) return; - - _isSaving = true; - _editProfileMessage = null; - - try - { - _user.FullName = _userToEdit.FullName; - _user.BirthDate = _userToEdit.BirthDate; - _user.Gender = _userToEdit.Gender; - - (await (await HttpClient.PutAsJsonAsync("User/Update", _userToEdit, AppJsonContext.Default.EditUserDto)) - .Content.ReadFromJsonAsync(AppJsonContext.Default.UserDto))!.Patch(_user); - - PubSubService.Publish(PubSubMessages.PROFILE_UPDATED, _user); - - _editProfileMessageType = BitMessageBarType.Success; - _editProfileMessage = Localizer[nameof(AppStrings.ProfileUpdatedSuccessfullyMessage)]; - } - catch (KnownException e) - { - _editProfileMessageType = BitMessageBarType.Error; - - _editProfileMessage = e.Message; - } - finally - { - _isSaving = false; - } - } - - private async Task RemoveProfileImage() - { - if (_isRemoving) return; - - _isRemoving = true; - - try - { - await HttpClient.DeleteAsync(_profileImageRemoveUrl); - - await RefreshProfileData(); - } - catch (KnownException e) - { - _editProfileMessage = e.Message; - _editProfileMessageType = BitMessageBarType.Error; - } - finally - { - _isRemoving = false; - } - } -} - diff --git a/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss b/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss deleted file mode 100644 index 4050698..0000000 --- a/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss +++ /dev/null @@ -1,140 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; -@import '../../Styles/abstracts/_bit-css-variables.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(48px) rem2(16px); - - @include lt-lg { - padding: rem2(16px); - } -} - -.content-container { - width: 100%; - display: flex; - position: relative; - align-items: center; - max-width: rem2(608px); - border-radius: rem2(4px); - flex-flow: column nowrap; - padding: rem2(32px) rem2(14px); - background-color: $bit-color-background-primary; - - &.profile-panel { - box-shadow: $bit-box-shadow-callout; - } - - &.danger-panel { - border: 2px solid darkred; - } -} - -.loading-container { - width: 100%; - height: 100%; - display: flex; - position: absolute; - align-items: center; - justify-content: center; -} - -.form-message-bar { - top: 0; - left: 0; - position: absolute; - border-radius: rem2(4px) rem2(4px) 0 0; -} - -.page-title { - font-weight: 600; - font-size: rem2(28px); - line-height: rem2(44px); - margin-bottom: rem2(16px); -} - -.form-profile-container { - width: 100%; - display: flex; - align-items: center; - max-width: rem2(340px); - flex-flow: row nowrap; - margin-bottom: rem2(17px); - justify-content: flex-start; - - @include lt-xl { - max-width: rem2(300px); - margin-bottom: rem2(13px); - } - - @include md { - margin-bottom: rem2(21px); - } - - @include sm { - max-width: 100%; - margin-bottom: rem2(13px); - } -} - -.form-input-container { - width: 100%; - display: flex; - max-width: rem2(340px); - flex-flow: column nowrap; - margin-bottom: rem2(17px); -} - -.form-input-error { - font-size: rem2(12px); - line-height: rem2(16px); - color: $bit-color-state-error; -} - -.form-choice-container { - width: 100%; - max-width: rem2(340px); - margin-bottom: rem2(19px); - - @include lt-xl { - max-width: rem2(300px); - margin-bottom: rem2(17px); - } - - @include md { - margin-bottom: rem2(25px); - } - - @include sm { - max-width: 100%; - } -} - -::deep .edit-profile-dtp { - .bit-dtp-wrapper { - z-index: 5; - } - - .bit-dtp-overlay { - z-index: 4; - } - - .bit-dtp-callout { - z-index: 6; - } -} - -::deep .edit-profile-form { - width: 100%; - display: flex; - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; -} - diff --git a/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor b/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor deleted file mode 100644 index 0851881..0000000 --- a/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor +++ /dev/null @@ -1,50 +0,0 @@ -@page "/email-confirmation" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.EmailConfirmationTitle)] - -
-
- @if (string.IsNullOrEmpty(_emailConfirmationMessage) is false) - { - - @_emailConfirmationMessage - - } - - @if (EmailConfirmed) - { -

- @Localizer[nameof(AppStrings.EmailConfirmedSuccessfullyMessage)] -

- - @Localizer[nameof(AppStrings.SignIn)] - - } - else - { -

- @Localizer[nameof(AppStrings.EmailConfirmationFailedMessage)] -

- -
- @Localizer[nameof(AppStrings.InvalidConfirmationLinkMessage)] -
- - - @Localizer[nameof(AppStrings.ResendEmail)] - - } -
-
diff --git a/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.cs b/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.cs deleted file mode 100644 index efcd72c..0000000 --- a/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace Bit.Fluent.Player.Client.Core.Pages.Identity; - -public partial class EmailConfirmationPage -{ - private bool _isLoading; - private string? _emailConfirmationMessage; - private BitMessageBarType _emailConfirmationMessageType; - - [Parameter] - [SupplyParameterFromQuery] - public string? Email { get; set; } - - [Parameter] - [SupplyParameterFromQuery(Name = "email-confirmed")] - public bool EmailConfirmed { get; set; } - - private void RedirectToSignIn() - { - NavigationManager.NavigateTo("/sign-in"); - } - - private async Task DoResendLink() - { - if (_isLoading) return; - - _isLoading = true; - _emailConfirmationMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SendConfirmationEmail", new() { Email = Email }, AppJsonContext.Default.SendConfirmationEmailRequestDto); - - _emailConfirmationMessageType = BitMessageBarType.Success; - - _emailConfirmationMessage = Localizer[nameof(AppStrings.ResendConfirmationLinkMessage)]; - } - catch (KnownException e) - { - _emailConfirmationMessageType = BitMessageBarType.Error; - - _emailConfirmationMessage = e.Message; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.scss b/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.scss deleted file mode 100644 index c32227d..0000000 --- a/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.scss +++ /dev/null @@ -1,48 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(56px) rem2(16px); - - @include lg { - padding: rem2(48px) rem2(16px); - } - - @include sm { - padding: rem2(40px) rem2(16px); - } -} - -.form-description { - font-weight: 600; - width: rem2(454px); - height: rem2(24px); - font-size: rem2(16px); - line-height: rem2(24px); - - @include lg { - width: rem2(398px); - height: rem2(20px); - } - - @include md { - width: rem2(398px); - height: rem2(20px); - } - - @include sm { - width: rem2(280px); - height: rem2(40px); - } - - @include lt-xl { - font-size: rem2(14px); - line-height: rem2(20px); - } -} \ No newline at end of file diff --git a/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor b/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor deleted file mode 100644 index ba9598f..0000000 --- a/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor +++ /dev/null @@ -1,42 +0,0 @@ -@page "/forgot-password" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.ForgetPasswordTitle)] - -
- - - - @if (string.IsNullOrEmpty(_forgotPasswordMessage) is false) - { - - @_forgotPasswordMessage - - } - -

@Localizer[nameof(AppStrings.ForgetPasswordTitle)]

- -
- @Localizer[nameof(AppStrings.ForgetPasswordMessage)] -
- -
- - -
- - - @Localizer[nameof(AppStrings.Submit)] - -
-
\ No newline at end of file diff --git a/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.cs b/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.cs deleted file mode 100644 index f5ffdf3..0000000 --- a/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Bit.Fluent.Player.Shared.Dtos.Identity; - -namespace Bit.Fluent.Player.Client.Core.Pages.Identity; - -public partial class ForgotPasswordPage -{ - private bool _isLoading; - private string? _forgotPasswordMessage; - private BitMessageBarType _forgotPasswordMessageType; - private SendResetPasswordEmailRequestDto _forgotPasswordModel = new(); - - private async Task DoSubmit() - { - if (_isLoading) return; - - _isLoading = true; - _forgotPasswordMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SendResetPasswordEmail", _forgotPasswordModel, AppJsonContext.Default.SendResetPasswordEmailRequestDto); - - _forgotPasswordMessageType = BitMessageBarType.Success; - - _forgotPasswordMessage = Localizer[nameof(AppStrings.ResetPasswordLinkSentMessage)]; - } - catch (KnownException e) - { - _forgotPasswordMessageType = BitMessageBarType.Error; - - _forgotPasswordMessage = e.Message; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.scss b/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.scss deleted file mode 100644 index 8633cf3..0000000 --- a/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.scss +++ /dev/null @@ -1,25 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - display: flex; - width: 100%; - height: 100%; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(56px) rem2(16px); - - @include lg { - padding: rem2(48px) rem2(16px); - } - - @include sm { - padding: rem2(40px) rem2(16px); - } -} - -.form-description { - display: flex; - padding: rem2(20px); -} \ No newline at end of file diff --git a/src/Client/Core/Pages/Identity/ResetPasswordPage.razor b/src/Client/Core/Pages/Identity/ResetPasswordPage.razor deleted file mode 100644 index 8c52d66..0000000 --- a/src/Client/Core/Pages/Identity/ResetPasswordPage.razor +++ /dev/null @@ -1,47 +0,0 @@ -@page "/reset-password" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.ResetPasswordTitle)] - -
- - - - @if (string.IsNullOrEmpty(_resetPasswordMessage) is false) - { - - @_resetPasswordMessage - - } - -

@Localizer[nameof(AppStrings.ResetPasswordTitle)]

-
- - -
- -
- - -
- - - @Localizer[nameof(AppStrings.ResetPassword)] - -
-
diff --git a/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.cs b/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.cs deleted file mode 100644 index 55c8187..0000000 --- a/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Bit.Fluent.Player.Shared.Dtos.Identity; - -namespace Bit.Fluent.Player.Client.Core.Pages.Identity; - -public partial class ResetPasswordPage -{ - private bool _isLoading; - private string? _resetPasswordMessage; - private BitMessageBarType _resetPasswordMessageType; - private ResetPasswordRequestDto _resetPasswordModel = new(); - - [Parameter] - [SupplyParameterFromQuery] - public string? Email { get; set; } - - [Parameter] - [SupplyParameterFromQuery] - public string? Token { get; set; } - - protected override void OnInitialized() - { - _resetPasswordModel.Email = Email; - _resetPasswordModel.Token = Token; - - base.OnInitialized(); - } - - protected override async Task OnAfterFirstRenderAsync() - { - await base.OnAfterFirstRenderAsync(); - - if (await AuthenticationStateProvider.IsUserAuthenticatedAsync()) - { - NavigationManager.NavigateTo("/"); - } - } - - private async Task DoSubmit() - { - if (_isLoading) return; - - _isLoading = true; - _resetPasswordMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/ResetPassword", _resetPasswordModel, AppJsonContext.Default.ResetPasswordRequestDto); - - _resetPasswordMessageType = BitMessageBarType.Success; - - _resetPasswordMessage = Localizer[nameof(AppStrings.PasswordChangedSuccessfullyMessage)]; - - await AuthenticationService.SignIn(new SignInRequestDto - { - UserName = Email, - Password = _resetPasswordModel.Password - }); - - NavigationManager.NavigateTo("/"); - } - catch (KnownException e) - { - _resetPasswordMessageType = BitMessageBarType.Error; - - _resetPasswordMessage = e.Message; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.scss b/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.scss deleted file mode 100644 index 9c16ab2..0000000 --- a/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.scss +++ /dev/null @@ -1,20 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - display: flex; - width: 100%; - height: 100%; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(56px) rem2(16px); - - @include lg { - padding: rem2(48px) rem2(16px); - } - - @include sm { - padding: rem2(40px) rem2(16px); - } -} \ No newline at end of file diff --git a/src/Client/Core/Pages/Identity/SignInPage.razor b/src/Client/Core/Pages/Identity/SignInPage.razor deleted file mode 100644 index d2402d9..0000000 --- a/src/Client/Core/Pages/Identity/SignInPage.razor +++ /dev/null @@ -1,56 +0,0 @@ -@page "/sign-in" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.SignInTitle)] - -
- - - - @if (string.IsNullOrEmpty(_signInMessage) is false) - { - - @_signInMessage - - } - -

@Localizer[nameof(AppStrings.SignInTitle)]

- -
- - -
- -
- - -
- - - @Localizer[nameof(AppStrings.SignIn)] - - -
- @Localizer[nameof(AppStrings.ForgotPasswordLink)] -
- -
- @Localizer[nameof(AppStrings.DontHaveAccountMessage)] @Localizer[nameof(AppStrings.SignUp)] -
-
-
diff --git a/src/Client/Core/Pages/Identity/SignInPage.razor.cs b/src/Client/Core/Pages/Identity/SignInPage.razor.cs deleted file mode 100644 index fdf663b..0000000 --- a/src/Client/Core/Pages/Identity/SignInPage.razor.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Microsoft.AspNetCore.Components.Forms; -using Bit.Fluent.Player.Shared.Dtos.Identity; - -namespace Bit.Fluent.Player.Client.Core.Pages.Identity; - -public partial class SignInPage -{ - private bool _isLoading; - private string? _signInMessage; - private BitMessageBarType _signInMessageType; - private SignInRequestDto _signInModel = new(); - - [Parameter] - [SupplyParameterFromQuery] - public string? RedirectUrl { get; set; } - - protected async override Task OnAfterFirstRenderAsync() - { - await base.OnAfterFirstRenderAsync(); - - if (await AuthenticationStateProvider.IsUserAuthenticatedAsync()) - { - NavigationManager.NavigateTo("/"); - } - } - - private async Task DoSignIn() - { - if (_isLoading) return; - - _isLoading = true; - _signInMessage = null; - - try - { - await AuthenticationService.SignIn(_signInModel); - - NavigationManager.NavigateTo(RedirectUrl ?? "/"); - } - catch (KnownException e) - { - _signInMessageType = BitMessageBarType.Error; - - _signInMessage = e.Message; - } - finally - { - _isLoading = false; - } - } -} - diff --git a/src/Client/Core/Pages/Identity/SignInPage.razor.scss b/src/Client/Core/Pages/Identity/SignInPage.razor.scss deleted file mode 100644 index 281dce3..0000000 --- a/src/Client/Core/Pages/Identity/SignInPage.razor.scss +++ /dev/null @@ -1,30 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(56px) rem2(16px); - - @include lg { - padding: rem2(48px) rem2(16px); - } - - @include sm { - padding: rem2(40px) rem2(16px); - } -} - -.form-forgot-password { - font-size: rem2(14px); - line-height: rem2(24px); - margin-bottom: rem2(20px); - - @include lt-xl { - margin-bottom: rem2(16px); - } -} diff --git a/src/Client/Core/Pages/Identity/SignUpPage.razor b/src/Client/Core/Pages/Identity/SignUpPage.razor deleted file mode 100644 index 6f20107..0000000 --- a/src/Client/Core/Pages/Identity/SignUpPage.razor +++ /dev/null @@ -1,99 +0,0 @@ -@page "/sign-up" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.SingUpTitle)] - -
- - - - @if (string.IsNullOrEmpty(_signUpMessage) is false) - { - - @_signUpMessage - - } - - @if (_isSignedUp) - { -

- @Localizer[nameof(AppStrings.ConfirmEmailTitle)] -

- -
- @Localizer[nameof(AppStrings.ConfirmEmailMessage)] -
-
-
- @Localizer[nameof(AppStrings.NotReceivedConfirmationEmailMessage)] -
-
- @Localizer[nameof(AppStrings.CheckSpamMailMessage)] -
-
- - @Localizer[nameof(AppStrings.Or)] - -
- - @Localizer[nameof(AppStrings.ResendEmail)] - -
-
- @Localizer[nameof(AppStrings.SignIn)] -
- } - else - { -

- @Localizer[nameof(AppStrings.SignUp)] -

- -
- - -
- -
- - -
- -
- - - @Localizer[nameof(AppStrings.TermsMessage)] @Localizer[nameof(AppStrings.TermsTitle)] - - - -
- - - @Localizer[nameof(AppStrings.SignUp)] - - -
- @Localizer[nameof(AppStrings.AlreadyHaveAccountMessage)] @Localizer[nameof(AppStrings.SignIn)] -
- } - -
-
diff --git a/src/Client/Core/Pages/Identity/SignUpPage.razor.cs b/src/Client/Core/Pages/Identity/SignUpPage.razor.cs deleted file mode 100644 index cc1deca..0000000 --- a/src/Client/Core/Pages/Identity/SignUpPage.razor.cs +++ /dev/null @@ -1,77 +0,0 @@ -using Bit.Fluent.Player.Shared.Dtos.Identity; - -namespace Bit.Fluent.Player.Client.Core.Pages.Identity; - -public partial class SignUpPage -{ - private bool _isLoading; - private bool _isSignedUp; - private string? _signUpMessage; - private BitMessageBarType _signUpMessageType; - private SignUpRequestDto _signUpModel = new(); - - - protected override async Task OnAfterFirstRenderAsync() - { - await base.OnAfterFirstRenderAsync(); - - if (await AuthenticationStateProvider.IsUserAuthenticatedAsync()) - { - NavigationManager.NavigateTo("/"); - } - } - - private async Task DoSignUp() - { - if (_isLoading) return; - - _isLoading = true; - _signUpMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SignUp", _signUpModel, AppJsonContext.Default.SignUpRequestDto); - - _isSignedUp = true; - } - catch (ResourceValidationException e) - { - _signUpMessageType = BitMessageBarType.Error; - _signUpMessage = string.Join(Environment.NewLine, e.Payload.Details.SelectMany(d => d.Errors).Select(e => e.Message)); - } - catch (KnownException e) - { - _signUpMessage = e.Message; - _signUpMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } - - private async Task DoResendLink() - { - if (_isLoading) return; - - _isLoading = true; - _signUpMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SendConfirmationEmail", new() { Email = _signUpModel.Email }, AppJsonContext.Default.SendConfirmationEmailRequestDto); - - _signUpMessageType = BitMessageBarType.Success; - _signUpMessage = Localizer[nameof(AppStrings.ResendConfirmationLinkMessage)]; - } - catch (KnownException e) - { - _signUpMessage = e.Message; - _signUpMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Client/Core/Pages/Identity/SignUpPage.razor.scss b/src/Client/Core/Pages/Identity/SignUpPage.razor.scss deleted file mode 100644 index 65b7a6f..0000000 --- a/src/Client/Core/Pages/Identity/SignUpPage.razor.scss +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(56px) rem2(16px); - - @include lg { - padding: rem2(48px) rem2(16px); - } - - @include sm { - padding: rem2(40px) rem2(16px); - } -} - -.form-description { - font-weight: 600; - line-height: 1.5; - font-size: rem2(14px); - max-width: rem2(432px); -} - -::deep { - .form-checkbox { - width: 100%; - max-width: rem2(340px); - - .label { - text-align: start; - align-items: start; - } - - @include lt-xl { - max-width: rem2(300px); - } - - @include sm { - max-width: 100%; - } - } - - .form-input-container--no-margin { - margin-bottom: 0; - } -} diff --git a/src/Client/Core/Pages/TermsPage.razor b/src/Client/Core/Pages/TermsPage.razor deleted file mode 100644 index 941d1fa..0000000 --- a/src/Client/Core/Pages/TermsPage.razor +++ /dev/null @@ -1,106 +0,0 @@ -@page "/terms" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.TermsTitle)] - -
-
- -
-

Bit.Fluent.Player license

-
- This EULA and Privacy Policy are written for individuals who use the Bit.Fluent.Player Demo Version through the todo.bitplatform.dev website, or the published version of this app on the BitPlatform's Google Play, Apple Store, and Microsoft Store accounts. -
- If you want to build your own project based on this Project Template, please refer to the License and create your own project, publish it with the relevant EULA and Privacy Policy for your business.s -
-
- -
-

End-User License Agreement (EULA) for Bit.Fluent.Player Demo Version

-
- This End-User License Agreement (EULA) is a legal agreement between you (the "user") and BitPlatform, located at Sixmastraat 15, 8932 PA Leeuwarden, Netherlands, with phone number +31684207362, for the use of Bit.Fluent.Player Demo Version (the "Software"). -
- By using the Software, you agree to be bound by the terms and conditions of this agreement. -
-
- -
-

License Grant

-
- BitPlatform hereby grants the user a non-exclusive, non-transferable license to use the Software, solely for the purpose of evaluating and testing the features of the Bit.Fluent.Player Demo Version during the term of this EULA. -
-
- -
-

Ownership

-
- BitPlatform retains all rights, title, and interest in and to the Software, including any and all intellectual property rights. -
-
- -
-

User Data

-
- BitPlatform may collect user data, including name, surname, photo, date of birth, and gender. Providing this information is optional, and BitPlatform will only use it for the purposes of the Bit.Fluent.Player Demo Version. If the user requests, BitPlatform will delete this data within one day, using one of the contact methods provided at the end of this EULA. In addition, the user is required to provide an email address for account verification purposes, but BitPlatform will not use this email for any other purposes. -
-
- -
-

Analytics and Cookies

-
- BitPlatform does not use any Analytics tools for measuring website traffic and only uses strictly necessary cookies. -
-
- -
-

Restrictions

-
- User may not: (a) copy the Software, except as necessary for testing purposes; (b) distribute, rent, loan, lease, sell, sublicense, or otherwise transfer the Software or any portion thereof; (c) reverse engineer, decompile, disassemble, modify, translate, make any attempt to discover the source code of the Software, or create derivative works based on the Software; or (d) remove any proprietary notices or labels on the Software. -
-
- -
-

No Warranty

-
- The Software is provided "AS IS" and without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. BitPlatform does not warrant that the Software will be error-free or that its use will be uninterrupted. -
-
- -
-

Limitation of Liability

-
- BitPlatform shall not be liable for any damages whatsoever arising out of the use of or inability to use the Software, including but not limited to direct, indirect, incidental, special, or consequential damages, even if BitPlatform has been advised of the possibility of such damages. -
-
- -
-

Termination

-
- This EULA shall remain in effect until 2025-12-31. BitPlatform reserves the right to terminate this EULA at any time without notice. Upon termination, the user shall immediately cease all use of the Software and destroy all copies of the Software in its possession. -
-
- -
-

Contact Information

-
- If you have any questions or concerns regarding this EULA or the Privacy Policy, or if you would like to contact BitPlatform for any reason, please email info@bitplatform.dev or call +31684207362, or visit our website at our website or visit us at Sixmastraat 15, 8932 PA Leeuwarden, Netherlands. -
-
- - -
-

Privacy Policy

-
-
    -
  • BitPlatform is committed to protecting the privacy of the user data.
  • -
  • We will only use the data collected from the user for the purposes of the Bit.Fluent.Player Demo Version and will delete this data upon user request, using one of the contact methods provided above.
  • -
  • We do not share the user data with any third parties and do not allow users to share data with anyone in any way.
  • -
  • We do not collect any information on user's usage in the Bit.Fluent.Player Demo Version.
  • -
  • We do not display any Third-Party content, advertisements, or any purchases in the Bit.Fluent.Player Demo Version.
  • -
  • This Privacy Policy is effective until 2025-12-31 and is subject to change without notice.
  • -
-
-
- -
-
diff --git a/src/Client/Core/Pages/TermsPage.razor.cs b/src/Client/Core/Pages/TermsPage.razor.cs deleted file mode 100644 index 440631d..0000000 --- a/src/Client/Core/Pages/TermsPage.razor.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Bit.Fluent.Player.Client.Core.Pages; - -public partial class TermsPage -{ -} diff --git a/src/Client/Core/Pages/TermsPage.razor.scss b/src/Client/Core/Pages/TermsPage.razor.scss deleted file mode 100644 index 07be99b..0000000 --- a/src/Client/Core/Pages/TermsPage.razor.scss +++ /dev/null @@ -1,124 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - display: flex; - align-items: center; - align-self: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - padding: rem2(88px) rem2(32px); - - @include lg { - padding: rem2(72px) rem2(32px); - } - - @include md { - padding: rem2(64px) rem2(32px); - } - - @include sm { - padding: rem2(40px) rem2(32px); - } -} - -.page-content { - width: 100%; - display: flex; - align-items: center; - max-width: rem2(1128px); - flex-flow: column nowrap; - justify-content: flex-start; - - @include lg { - max-width: rem2(1040px); - } - - @include md { - max-width: rem2(770px); - } -} - -.main-section { - width: 100%; - margin-bottom: rem2(24px); -} - -.main-section-title { - width: 100%; - text-align: left; - font-weight: bold; - font-size: rem2(34px); - line-height: rem2(56px); - margin-bottom: rem2(24px); - - @include lg { - font-size: rem2(30px); - line-height: rem2(48px); - margin-bottom: rem2(16px); - } - - @include md { - font-size: rem2(24px); - line-height: rem2(40px); - margin-bottom: rem2(16px); - } - - @include sm { - font-size: rem2(20px); - line-height: rem2(32px); - margin-bottom: rem2(12px); - } -} - -.section-desc { - width: 100%; - font-size: rem2(18px); - line-height: rem2(28px); - - @include lt-xl { - font-size: rem2(16px); - line-height: rem2(24px); - } - - @include sm { - font-size: rem2(14px); - } -} - -.sub-section { - width: 100%; - margin-bottom: rem2(24px); - - &:last-child { - margin-bottom: 0; - } -} - -.sub-section-title { - width: 100%; - text-align: left; - font-weight: 600; - font-size: rem2(24px); - line-height: rem2(36px); - margin-bottom: rem2(16px); - - @include lg { - font-size: rem2(20px); - line-height: rem2(32px); - margin-bottom: rem2(8px); - } - - @include md { - font-size: rem2(18px); - line-height: rem2(28px); - margin-bottom: rem2(8px); - } - - @include sm { - font-size: rem2(16px); - line-height: rem2(24px); - margin-bottom: rem2(8px); - } -} diff --git a/src/Client/Core/Pages/Todo/TodoPage.razor b/src/Client/Core/Pages/Todo/TodoPage.razor deleted file mode 100644 index 2f3e744..0000000 --- a/src/Client/Core/Pages/Todo/TodoPage.razor +++ /dev/null @@ -1,125 +0,0 @@ -@page "/todo" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.TodoTitle)] - -
-
- -
- -
-

@Localizer[nameof(AppStrings.TodoTitle)]

-
- - - @Localizer[nameof(AppStrings.Add)] - -
- -
-
- - - - - -
- - - - - -
-
- -
- @if (_isLoading) - { -
- -
- } - else - { - if (_viewTodoItems?.Any() is false or null) - { -
- - @Localizer[nameof(AppStrings.NoTodos)] -
- } - else - { - - -
- @if (todo.IsInEditMode) - { - -
- - @Localizer[nameof(AppStrings.Save)] - - - @Localizer[nameof(AppStrings.Cancel)] - -
- } - else - { -
- - -
- @todo.Date.ToString("yyyy MMMM dd, HH:mm:ss") -
-
- -
- - - -
- } -
-
-
- } - } -
-
-
-
- - \ No newline at end of file diff --git a/src/Client/Core/Pages/Todo/TodoPage.razor.cs b/src/Client/Core/Pages/Todo/TodoPage.razor.cs deleted file mode 100644 index 2150286..0000000 --- a/src/Client/Core/Pages/Todo/TodoPage.razor.cs +++ /dev/null @@ -1,191 +0,0 @@ -using Bit.Fluent.Player.Shared.Dtos.Todo; - -namespace Bit.Fluent.Player.Client.Core.Pages.Todo; - -[Authorize] -public partial class TodoPage -{ - private bool _isAdding; - private bool _isLoading; - private string? _searchText; - private string? _selectedSort; - private string? _selectedFilter; - private string? _underEditTodoItemTitle; - private string _newTodoTitle = string.Empty; - private ConfirmMessageBox _confirmMessageBox = default!; - private IList _allTodoItems = default!; - private IList _viewTodoItems = default!; - private List> _sortItems = new(); - - protected override async Task OnInitAsync() - { - _selectedFilter = nameof(AppStrings.All); - _selectedSort = nameof(AppStrings.Alphabetical); - - _sortItems = new() - { - new BitDropdownItem { Text = Localizer[nameof(AppStrings.Alphabetical)], Value = nameof(AppStrings.Alphabetical) }, - new BitDropdownItem { Text = Localizer[nameof(AppStrings.Date)], Value = nameof(AppStrings.Date) } - }; - - await LoadTodoItems(); - - await base.OnInitAsync(); - } - - private async Task LoadTodoItems() - { - _isLoading = true; - - try - { - _allTodoItems = await PrerenderStateService.GetValue($"{nameof(TodoPage)}-allTodoItems", - async () => await HttpClient.GetFromJsonAsync("TodoItem/Get", AppJsonContext.Default.ListTodoItemDto)) ?? new(); - - FilterViewTodoItems(); - } - finally - { - _isLoading = false; - } - } - - private void FilterViewTodoItems() - { - _viewTodoItems = _allTodoItems - .Where(t => TodoItemIsVisible(t)) - .OrderByIf(_selectedSort == nameof(AppStrings.Alphabetical), t => t.Title!) - .OrderByIf(_selectedSort == nameof(AppStrings.Date), t => t.Date!) - .ToList(); - } - - private bool TodoItemIsVisible(TodoItemDto todoItem) - { - var condition1 = string.IsNullOrWhiteSpace(_searchText) || todoItem.Title!.Contains(_searchText!, StringComparison.OrdinalIgnoreCase); - - var condition2 = _selectedFilter == nameof(AppStrings.Active) ? todoItem.IsDone is false - : _selectedFilter == nameof(AppStrings.Completed) ? todoItem.IsDone - : true; - - return condition1 && condition2; - } - - private async Task ToggleIsDone(TodoItemDto todoItem) - { - todoItem.IsDone = !todoItem.IsDone; - - await UpdateTodoItem(todoItem); - } - - private void SearchTodoItems(string searchText) - { - _searchText = searchText; - - FilterViewTodoItems(); - } - - private void SortTodoItems(BitDropdownItem sort) - { - _selectedSort = sort.Value; - - FilterViewTodoItems(); - } - - private void FilterTodoItems(string filter) - { - _selectedFilter = filter; - - FilterViewTodoItems(); - } - - private void ToggleEditMode(TodoItemDto todoItem) - { - _underEditTodoItemTitle = todoItem.Title; - todoItem.IsInEditMode = !todoItem.IsInEditMode; - } - - private async Task AddTodoItem() - { - if (_isAdding) return; - - _isAdding = true; - - try - { - var addedTodoItem = await (await HttpClient.PostAsJsonAsync("TodoItem/Create", new() { Title = _newTodoTitle }, AppJsonContext.Default.TodoItemDto)) - .Content.ReadFromJsonAsync(AppJsonContext.Default.TodoItemDto); - - _allTodoItems.Add(addedTodoItem!); - - if (TodoItemIsVisible(addedTodoItem!)) - { - _viewTodoItems.Add(addedTodoItem!); - } - - _newTodoTitle = ""; - } - finally - { - _isAdding = false; - } - } - - private async Task DeleteTodoItem(TodoItemDto todoItem) - { - if (_isLoading) return; - - try - { - var confirmed = await _confirmMessageBox.Show(Localizer.GetString(nameof(AppStrings.AreYouSureWannaDelete), todoItem.Title!), - Localizer[nameof(AppStrings.DeleteTodoItem)]); - - if (confirmed) - { - _isLoading = true; - - StateHasChanged(); - - await HttpClient.DeleteAsync($"TodoItem/Delete/{todoItem.Id}"); - - _allTodoItems.Remove(todoItem); - - _viewTodoItems.Remove(todoItem); - } - } - finally - { - _isLoading = false; - } - } - - private async Task SaveTodoItem(TodoItemDto todoItem) - { - if (_isLoading) return; - - _isLoading = true; - - try - { - todoItem.Title = _underEditTodoItemTitle; - - await UpdateTodoItem(todoItem); - } - finally - { - _isLoading = false; - } - } - - private async Task UpdateTodoItem(TodoItemDto todoItem) - { - (await (await HttpClient.PutAsJsonAsync("TodoItem/Update", todoItem, AppJsonContext.Default.TodoItemDto)) - .Content.ReadFromJsonAsync(AppJsonContext.Default.TodoItemDto))!.Patch(todoItem); - - todoItem.IsInEditMode = false; - - if (TodoItemIsVisible(todoItem) is false) - { - _viewTodoItems.Remove(todoItem); - } - } -} diff --git a/src/Client/Core/Pages/Todo/TodoPage.razor.scss b/src/Client/Core/Pages/Todo/TodoPage.razor.scss deleted file mode 100644 index 0b12a2e..0000000 --- a/src/Client/Core/Pages/Todo/TodoPage.razor.scss +++ /dev/null @@ -1,195 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; -@import '../../Styles/abstracts/_bit-css-variables.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - align-items: center; - max-width: rem2(900px); - justify-content: center; - flex-flow: column nowrap; - padding: rem2(48px) rem2(16px); - - @include lt-lg { - padding-top: 0; - } -} - -.search-box-container { - width: 100%; - display: flex; - padding: rem2(21px); - align-items: center; - justify-content: center; - border-bottom: rem2(1px) solid $bit-color-border-secondary; -} - -.todo-content { - width: 100%; - display: flex; - position: relative; - max-width: rem2(608px); - align-items: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - padding: rem2(24px) rem2(14px) rem2(64px); -} - -.main-title { - margin: 0; - font-weight: 600; - font-size: rem2(28px); - line-height: rem2(36px); - margin-bottom: rem2(20px); -} - -.add-todo-container { - width: 100%; - display: flex; - gap: rem2(16px); - align-items: center; - flex-flow: row nowrap; - margin-bottom: rem2(24px); - justify-content: flex-start; -} - -.todo-list-container { - width: 100%; -} - -.filter-container { - width: 100%; - display: flex; - align-items: center; - flex-flow: row nowrap; - justify-content: space-between; -} - -.sort-drp-container { - @media all and (max-width: #{rem2(430px)}) { - top: rem2(25px); - right: rem2(14px); - position: absolute; - } -} - -.todo-list--empty-state { - height: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-flow: column nowrap; -} - -.todo-list { - width: 100%; - display: flex; - height: rem2(350px); - align-items: center; - margin-top: rem2(4px); - flex-flow: column nowrap; - justify-content: flex-start; - background-color: $bit-color-background-primary; - border: rem2(1px) solid $bit-color-border-secondary; - - @include lt-lg { - height: rem2(300px); - } -} - -.todo-item { - width: 100%; - display: flex; - padding: rem2(16px); - align-items: center; - flex-flow: row nowrap; - min-height: rem2(80px); - min-width: fit-content; - justify-content: space-between; - border-bottom: rem2(1px) solid $bit-color-border-secondary; - - &:last-child { - border-bottom: none; - } - - &.edit-mode { - gap: rem2(16px); - - @media all and (max-width: #{rem2(450px)}) { - flex-flow: column; - - ::deep .todo-input { - width: 100%; - } - } - } -} - -.todo-info { - display: flex; - align-items: flex-start; - justify-content: center; - flex-flow: column nowrap; - - &.done ::deep .bit-chb-txt { - text-decoration: line-through; - } -} - -.todo-item-date { - white-space: nowrap; - font-size: rem2(11px); - margin-top: rem2(4px); - margin-left: rem2(28px); - line-height: rem2(20px); - color: $bit-color-foreground-secondary; -} - -.todo-btn-group { - display: flex; - flex-flow: row nowrap; - justify-content: center; -} - -.todo-list-spinner { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; -} - -::deep { - .add-todo-input { - flex-grow: 1; - } - - .add-todo-button { - line-height: 1; - min-width: rem2(70px); - min-height: rem2(32px); - } - - .sort-todo-drp { - width: rem2(136px); - height: rem2(32px); - - .sort-todo-icn { - color: $bit-color-primary-main; - } - - .bit-drp-iwp .bit-drp-rsp-lbl-ctn { - margin-top: calc(var(--bit-status-bar-height) - rem2(24px)); - - @supports (-webkit-touch-callout: none) { - margin-top: calc(env(safe-area-inset-top) - rem2(24px)); - } - } - } - - .todo-input { - flex-grow: 1; - } -} diff --git a/src/Client/Core/Shared/ConfirmMessageBox.razor b/src/Client/Core/Shared/ConfirmMessageBox.razor deleted file mode 100644 index 613f693..0000000 --- a/src/Client/Core/Shared/ConfirmMessageBox.razor +++ /dev/null @@ -1,25 +0,0 @@ -@inherits AppComponentBase; - - -
-
- @_title - -
-
- @_message -
-
- - @Localizer[nameof(AppStrings.Yes)] - - - - @Localizer[nameof(AppStrings.No)] - -
-
-
diff --git a/src/Client/Core/Shared/ConfirmMessageBox.razor.cs b/src/Client/Core/Shared/ConfirmMessageBox.razor.cs deleted file mode 100644 index c0f766e..0000000 --- a/src/Client/Core/Shared/ConfirmMessageBox.razor.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace Bit.Fluent.Player.Client.Core.Shared; - -public partial class ConfirmMessageBox -{ - private bool _isOpen; - private string? _title; - private string? _message; - - public async Task Show(string message, string title) - { - if (_tsc is not null) - await _tsc.Task; - - _tsc = new TaskCompletionSource(); - - await InvokeAsync(() => - { - _ = JSRuntime.SetBodyOverflow(true); - - _isOpen = true; - _title = title; - _message = message; - - StateHasChanged(); - }); - - return await _tsc.Task; - } - - private TaskCompletionSource? _tsc; - - public async Task Confirm(bool value) - { - _isOpen = false; - await JSRuntime.SetBodyOverflow(false); - _tsc?.SetResult(value); - } -} - diff --git a/src/Client/Core/Shared/ConfirmMessageBox.razor.scss b/src/Client/Core/Shared/ConfirmMessageBox.razor.scss deleted file mode 100644 index fe74a57..0000000 --- a/src/Client/Core/Shared/ConfirmMessageBox.razor.scss +++ /dev/null @@ -1,44 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.main-container { - flex-grow: 1; - display: flex; - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - padding: rem2(16px) rem2(24px); - background-color: $bit-color-background-primary; -} - -.header { - width: 100%; - display: flex; - align-items: center; - flex-flow: row nowrap; - margin-bottom: rem2(20px); - justify-content: space-between; -} - -.title { - font-weight: 600; - font-size: rem2(20px); - line-height: rem2(28px); -} - -.body { - width: 100%; - font-weight: 400; - font-size: rem2(14px); - line-height: rem2(20px); - margin-bottom: rem2(16px); -} - -.btn-group { - width: 100%; - display: flex; - align-items: center; - flex-flow: row nowrap; - justify-content: flex-end; -} diff --git a/src/Client/Core/Shared/SignOutConfirmModal.razor b/src/Client/Core/Shared/SignOutConfirmModal.razor deleted file mode 100644 index 206748c..0000000 --- a/src/Client/Core/Shared/SignOutConfirmModal.razor +++ /dev/null @@ -1,15 +0,0 @@ -@inherits AppComponentBase - - - - \ No newline at end of file diff --git a/src/Client/Core/Shared/SignOutConfirmModal.razor.cs b/src/Client/Core/Shared/SignOutConfirmModal.razor.cs deleted file mode 100644 index a05317b..0000000 --- a/src/Client/Core/Shared/SignOutConfirmModal.razor.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Bit.Fluent.Player.Client.Core.Shared; - -public partial class SignOutConfirmModal -{ - [Parameter] - public bool IsOpen { get; set; } - - [Parameter] public EventCallback IsOpenChanged { get; set; } - - private async Task CloseModal() - { - IsOpen = false; - - await IsOpenChanged.InvokeAsync(false); - } - - private async Task SignOut() - { - await AuthenticationService.SignOut(); - - await CloseModal(); - } -} diff --git a/src/Client/Core/Shared/SignOutConfirmModal.razor.scss b/src/Client/Core/Shared/SignOutConfirmModal.razor.scss deleted file mode 100644 index 6bf92e5..0000000 --- a/src/Client/Core/Shared/SignOutConfirmModal.razor.scss +++ /dev/null @@ -1,34 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; - -.modal-body { - display: flex; - position: relative; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(28px) rem2(110px); - - @include lt-lg{ - padding: rem2(28px) rem2(47px); - } -} - -.modal-close-btn-container { - top: 0; - right: 0; - position: absolute; -} - -.modal-title { - font-weight: 600; - font-size: rem2(24px); - line-height: rem2(40px); - margin-bottom: rem2(12px); -} - -.modal-desc { - font-size: rem2(18px); - line-height: rem2(24px); - margin-bottom: rem2(36px); -}