From c3a0833410d8b203af298b3eb5ad75a5eb71e1fd Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 14:56:10 +0100 Subject: [PATCH 01/12] Improved error view of smart form --- Moonlight/Shared/Components/Forms/SmartForm.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moonlight/Shared/Components/Forms/SmartForm.razor b/Moonlight/Shared/Components/Forms/SmartForm.razor index e71c4030..f78d4fa5 100644 --- a/Moonlight/Shared/Components/Forms/SmartForm.razor +++ b/Moonlight/Shared/Components/Forms/SmartForm.razor @@ -15,7 +15,7 @@ { if (ErrorMessages.Any()) { -
+
@foreach (var msg in ErrorMessages) { @(msg) From becc67c46b1d4369130dd2deae6e2407992471e6 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 14:59:44 +0100 Subject: [PATCH 02/12] Improved error message view of soft error handler --- Moonlight/Shared/Components/Partials/SoftErrorHandler.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor b/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor index 4668a9ea..a43ace70 100644 --- a/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor +++ b/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor @@ -33,7 +33,7 @@ else { foreach (var errorMessage in ErrorMessages) { -
+
@errorMessage
} From e9d3ab5307d593e1392ad8758898382d7da93bad Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 15:02:15 +0100 Subject: [PATCH 03/12] Added error reporting in soft error handler --- Moonlight/Shared/Components/Partials/SoftErrorHandler.razor | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor b/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor index a43ace70..e4504dc9 100644 --- a/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor +++ b/Moonlight/Shared/Components/Partials/SoftErrorHandler.razor @@ -65,6 +65,10 @@ else { Exception = exception; Crashed = true; + + var username = IdentityService.IsSignedIn ? IdentityService.CurrentUser.Username : "Guest"; + Logger.Warn($"A crash occured in the view of the user '{username}'"); + Logger.Warn(exception); } Recover(); From 2552b92e5de1da572a650f7eeda828a11d19f9dd Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 15:38:28 +0100 Subject: [PATCH 04/12] Improved user dashboard --- Moonlight/Shared/Views/Index.razor | 52 ++++++++++++++++-------- Moonlight/wwwroot/svg/manageServices.svg | 1 + Moonlight/wwwroot/svg/news.svg | 1 + Moonlight/wwwroot/svg/userSettings.svg | 1 + 4 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 Moonlight/wwwroot/svg/manageServices.svg create mode 100644 Moonlight/wwwroot/svg/news.svg create mode 100644 Moonlight/wwwroot/svg/userSettings.svg diff --git a/Moonlight/Shared/Views/Index.razor b/Moonlight/Shared/Views/Index.razor index 11f04b92..4444fe71 100644 --- a/Moonlight/Shared/Views/Index.razor +++ b/Moonlight/Shared/Views/Index.razor @@ -11,28 +11,44 @@
-
-
-
- Do you want to order new services? Are you searching for our service specifications and prices? + +
-
-
-
- Do you want to order new services? Are you searching for our service specifications and prices? + +
-
- \ No newline at end of file diff --git a/Moonlight/wwwroot/svg/manageServices.svg b/Moonlight/wwwroot/svg/manageServices.svg new file mode 100644 index 00000000..4ad89937 --- /dev/null +++ b/Moonlight/wwwroot/svg/manageServices.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Moonlight/wwwroot/svg/news.svg b/Moonlight/wwwroot/svg/news.svg new file mode 100644 index 00000000..cf7c2ebf --- /dev/null +++ b/Moonlight/wwwroot/svg/news.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Moonlight/wwwroot/svg/userSettings.svg b/Moonlight/wwwroot/svg/userSettings.svg new file mode 100644 index 00000000..e7477c79 --- /dev/null +++ b/Moonlight/wwwroot/svg/userSettings.svg @@ -0,0 +1 @@ + \ No newline at end of file From 518ec7055aa974007a3657c93fafd1165c517ee1 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 15:57:39 +0100 Subject: [PATCH 05/12] Removed inconsistent border in settings/configuration page --- Moonlight/Shared/Views/Admin/Sys/Settings.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moonlight/Shared/Views/Admin/Sys/Settings.razor b/Moonlight/Shared/Views/Admin/Sys/Settings.razor index 40c0f0c0..9f4cfe1e 100644 --- a/Moonlight/Shared/Views/Admin/Sys/Settings.razor +++ b/Moonlight/Shared/Views/Admin/Sys/Settings.razor @@ -18,7 +18,7 @@ else {
-
+
@{ string title; From cd4feec58f3ed88126ac79d33740d17eece36b14 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 16:02:01 +0100 Subject: [PATCH 06/12] Made space for more diagnose components --- .../Shared/Views/Admin/Sys/Diagnose.razor | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Moonlight/Shared/Views/Admin/Sys/Diagnose.razor b/Moonlight/Shared/Views/Admin/Sys/Diagnose.razor index ff5969a9..22f0403b 100644 --- a/Moonlight/Shared/Views/Admin/Sys/Diagnose.razor +++ b/Moonlight/Shared/Views/Admin/Sys/Diagnose.razor @@ -10,14 +10,18 @@ - - Dont share this file with random people. - We do our best to clear this file from sensitive information but it can still contain some. - Its safe to share with official moonlight panel developers - - -
- +
+
+ + Dont share this file with random people. + We do our best to clear this file from sensitive information but it can still contain some. + Its safe to share with official moonlight panel developers + + +
+ +
+
@code From a11569a7376e945f91da787e59507e1b0b97ccb8 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 16:03:52 +0100 Subject: [PATCH 07/12] Fixed inconsistent spacing. Reduced page size for transactions --- Moonlight/Shared/Views/Account/Payments.razor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Moonlight/Shared/Views/Account/Payments.razor b/Moonlight/Shared/Views/Account/Payments.razor index 72a0d5a1..9bf4dd2a 100644 --- a/Moonlight/Shared/Views/Account/Payments.razor +++ b/Moonlight/Shared/Views/Account/Payments.razor @@ -16,7 +16,7 @@
-
+

Redeem gift code

@@ -29,7 +29,7 @@
-
+
@@ -61,7 +61,7 @@ From c1216ea70893a85be4948780c40e30f1d3999a66 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 16:12:36 +0100 Subject: [PATCH 08/12] Improved 2fa and password ui --- Moonlight/Shared/Views/Account/Security.razor | 79 +++++++++++-------- 1 file changed, 46 insertions(+), 33 deletions(-) diff --git a/Moonlight/Shared/Views/Account/Security.razor b/Moonlight/Shared/Views/Account/Security.razor index 98b6cc76..1f4f2936 100644 --- a/Moonlight/Shared/Views/Account/Security.razor +++ b/Moonlight/Shared/Views/Account/Security.razor @@ -1,6 +1,5 @@ @page "/account/security" -@using Moonlight.App.Models.Forms @using Moonlight.App.Services @using Moonlight.App.Services.Users @using OtpNet @@ -17,6 +16,9 @@
+
+ Change password +
@@ -45,44 +47,49 @@
@if (IdentityService.Flags[UserFlag.TotpEnabled]) { -
- Your account is secured with 2fa -
- +
+
+ Your account is secured with 2fa +
+
+
} else if (!IdentityService.Flags[UserFlag.TotpEnabled] && IdentityService.CurrentUser.TotpKey != null) { -
-
-

- Scan the qr code and enter the code generated by the app you have scanned it in -

+
+
+ Scan the qr code and enter the code generated by the app you have scanned it in +
+
@{ QRCodeGenerator qrGenerator = new QRCodeGenerator(); var qrCodeData = qrGenerator.CreateQrCode - ( - $"otpauth://totp/{Uri.EscapeDataString(IdentityService.CurrentUser.Email)}?secret={IdentityService.CurrentUser.TotpKey}&issuer={Uri.EscapeDataString("Moonlight")}", - QRCodeGenerator.ECCLevel.Q - ); + ( + $"otpauth://totp/{Uri.EscapeDataString(IdentityService.CurrentUser.Email)}?secret={IdentityService.CurrentUser.TotpKey}&issuer={Uri.EscapeDataString("Moonlight")}", + QRCodeGenerator.ECCLevel.Q + ); PngByteQRCode qrCode = new PngByteQRCode(qrCodeData); byte[] qrCodeAsPngByteArr = qrCode.GetGraphic(5); var base64 = Convert.ToBase64String(qrCodeAsPngByteArr); }
- QR Code + QR Code
-
- @(IdentityService.CurrentUser.TotpKey) +
+ @(IdentityService.CurrentUser.TotpKey)
From 67c846ddc8614bbc07c27434d273823c82f17189 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 16:18:38 +0100 Subject: [PATCH 10/12] Renamed announcements to news in community navigation --- .../Shared/Components/Navigations/CommunityNavigation.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moonlight/Shared/Components/Navigations/CommunityNavigation.razor b/Moonlight/Shared/Components/Navigations/CommunityNavigation.razor index 4000e033..8a428389 100644 --- a/Moonlight/Shared/Components/Navigations/CommunityNavigation.razor +++ b/Moonlight/Shared/Components/Navigations/CommunityNavigation.razor @@ -10,7 +10,7 @@
From 4816befa71e4172609d1b50f1622c69a4235063a Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 16:25:34 +0100 Subject: [PATCH 11/12] Improved ticket popup button. Added better separation between tickets in the user view --- .../Shared/Components/TicketPopup/TicketPopupMain.razor | 2 +- .../Shared/Components/TicketPopup/TicketPopupOverview.razor | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Moonlight/Shared/Components/TicketPopup/TicketPopupMain.razor b/Moonlight/Shared/Components/TicketPopup/TicketPopupMain.razor index f4411697..1227dcb8 100644 --- a/Moonlight/Shared/Components/TicketPopup/TicketPopupMain.razor +++ b/Moonlight/Shared/Components/TicketPopup/TicketPopupMain.razor @@ -3,7 +3,7 @@ @if (ViewIndex == 0) { - } diff --git a/Moonlight/Shared/Components/TicketPopup/TicketPopupOverview.razor b/Moonlight/Shared/Components/TicketPopup/TicketPopupOverview.razor index 735345f8..0441a218 100644 --- a/Moonlight/Shared/Components/TicketPopup/TicketPopupOverview.razor +++ b/Moonlight/Shared/Components/TicketPopup/TicketPopupOverview.razor @@ -51,6 +51,11 @@ @(Formatter.FormatAgoFromDateTime(ticket.CreatedAt))
+ + if (ticket.Id != Tickets.Last().Id) + { + + } } } else From 9179d6825cd5a284e63d15217281ac859978ad14 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 16 Jan 2024 16:30:44 +0100 Subject: [PATCH 12/12] Improved order duration border effect --- Moonlight/Shared/Views/Store/Order.razor | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Moonlight/Shared/Views/Store/Order.razor b/Moonlight/Shared/Views/Store/Order.razor index 3a1f6474..dc08e4c0 100644 --- a/Moonlight/Shared/Views/Store/Order.razor +++ b/Moonlight/Shared/Views/Store/Order.razor @@ -4,7 +4,6 @@ @using Moonlight.App.Services @using Moonlight.App.Database.Entities.Store @using Moonlight.App.Repositories -@using Moonlight.App.Services.ServiceManage @inject ConfigService ConfigService @inject StoreService StoreService @@ -33,17 +32,17 @@