From 513e70d7e56764b70cce8934ab8c8170a614e641 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 3 Dec 2026 21:38:36 +0800 Subject: [PATCH 1/8] =?UTF-8?q?chore:=20=E8=A7=A3=E5=86=B3=E9=A6=96?= =?UTF-8?q?=E5=B1=8F=E4=B8=BB=E9=A2=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Components/App.razor | 9 +++++++++ .../Components/Layout/BaseLayout.razor.cs | 13 ------------- .../Components/Layout/BaseLayout.razor.js | 6 ------ 3 files changed, 9 insertions(+), 19 deletions(-) delete mode 100644 src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.js diff --git a/src/BootstrapBlazor.Server/Components/App.razor b/src/BootstrapBlazor.Server/Components/App.razor index 3ac0591918d..4215b39dee7 100644 --- a/src/BootstrapBlazor.Server/Components/App.razor +++ b/src/BootstrapBlazor.Server/Components/App.razor @@ -5,6 +5,15 @@ + diff --git a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs b/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs index 7ddddcb492a..d74e48749e6 100644 --- a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using Microsoft.Extensions.Options; -using Microsoft.JSInterop; - namespace BootstrapBlazor.Server.Components.Layout; /// @@ -13,10 +10,6 @@ namespace BootstrapBlazor.Server.Components.Layout; /// public partial class BaseLayout : IAsyncDisposable { - [Inject] - [NotNull] - private IJSRuntime? JSRuntime { get; set; } - [Inject] [NotNull] private IStringLocalizer? Localizer { get; set; } @@ -33,10 +26,6 @@ public partial class BaseLayout : IAsyncDisposable [NotNull] private IDispatchService? RebootDispatchService { get; set; } - [Inject] - [NotNull] - private IOptions? WebsiteOption { get; set; } - [NotNull] private string? FlowText { get; set; } @@ -75,8 +64,6 @@ protected override async Task OnInitializedAsync() await CommitDispatchService.SubscribeAsync(NotifyCommit); await RebootDispatchService.SubscribeAsync(NotifyReboot); - var module = await JSRuntime.LoadModule($"{WebsiteOption.Value.JSModuleRootPath}Layout/BaseLayout.razor.js"); - await module.InvokeVoidAsync("initTheme"); _init = true; } diff --git a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.js b/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.js deleted file mode 100644 index b143375ae13..00000000000 --- a/src/BootstrapBlazor.Server/Components/Layout/BaseLayout.razor.js +++ /dev/null @@ -1,6 +0,0 @@ -import { getTheme, setTheme } from "../../_content/BootstrapBlazor/modules/utility.js" - -export function initTheme() { - const currentTheme = getTheme(); - setTheme(currentTheme, false); -} From 0426369a07e426995cb1ade845f195a8040614a3 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 3 Dec 2026 21:41:02 +0800 Subject: [PATCH 2/8] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20Error=20?= =?UTF-8?q?=E6=AF=8D=E7=89=88=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor | 3 --- src/BootstrapBlazor.Server/Components/Pages/Error.razor | 1 - 2 files changed, 4 deletions(-) delete mode 100644 src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor diff --git a/src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor b/src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor deleted file mode 100644 index 4f3f76da517..00000000000 --- a/src/BootstrapBlazor.Server/Components/Layout/ErrorLayout.razor +++ /dev/null @@ -1,3 +0,0 @@ -@inherits LayoutComponentBase - -@Body diff --git a/src/BootstrapBlazor.Server/Components/Pages/Error.razor b/src/BootstrapBlazor.Server/Components/Pages/Error.razor index 65c30e76bdd..4b1e178ebc4 100644 --- a/src/BootstrapBlazor.Server/Components/Pages/Error.razor +++ b/src/BootstrapBlazor.Server/Components/Pages/Error.razor @@ -1,5 +1,4 @@ @page "/error" -@layout ErrorLayout

Error.

An error occurred while processing your request.

From a57feb428f08bd6143178627ab93575cee06ea6c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 3 Dec 2026 21:48:44 +0800 Subject: [PATCH 3/8] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Program.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/BootstrapBlazor.Server/Program.cs b/src/BootstrapBlazor.Server/Program.cs index 2e88ae7c047..05d1c120203 100644 --- a/src/BootstrapBlazor.Server/Program.cs +++ b/src/BootstrapBlazor.Server/Program.cs @@ -35,6 +35,25 @@ app.UseExceptionHandler("/Error", createScopeForErrors: true); } +app.Use(async (context, next) => +{ + try + { + await next(); + } + catch (Exception exception) + { + app.Logger.LogError(exception, + "Unhandled request exception {Method} {Path}; TraceId={TraceId}; Range={Range}; ResponseStarted={ResponseStarted}", + context.Request.Method, + context.Request.Path, + context.TraceIdentifier, + context.Request.Headers.Range.ToString(), + context.Response.HasStarted); + throw; + } +}); + // 增加上传目录静态资源文件 app.UseUploaderStaticFiles(); From 8d4d7c56df9f6dcda15bd25d2fb6838466db00fe Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 4 Dec 2026 09:00:50 +0800 Subject: [PATCH 4/8] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=8C=96=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- localization/pt-BR.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/localization/pt-BR.json b/localization/pt-BR.json index d2042385f93..c2e4947e17a 100644 --- a/localization/pt-BR.json +++ b/localization/pt-BR.json @@ -39,7 +39,7 @@ "TimePlaceHolder": "Selecione a hora", "DateTimePlaceHolderText": "Selecione ...", "DatePlaceHolderText": "Selecione ...", - "TimeFormat": "HH\\:mm\\:ss", + "TimeFormat": "hh\\:mm\\:ss", "DateFormat": "dd/MM/yyyy", "DateTimeFormat": "dd/MM/yyyy HH\\:mm\\:ss", "AiraPrevYearLabel": "Ano anterior", @@ -66,7 +66,8 @@ "TodayButtonText": "Hoje", "ConfirmButtonText": "Ok", "DateTimeFormat": "dd/MM/yyyy HH\\:mm\\:ss", - "DateFormat": "dd/MM/yyyy" + "DateFormat": "dd/MM/yyyy", + "TimeFormat": "HH\\:mm\\:ss" }, "BootstrapBlazor.Components.BootstrapInputNumber": { "ParsingErrorMessage": "O campo {0} deve ser um número." From b2d40f30b79cc950dc050858e822eda85301b2a0 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 4 Dec 2026 10:08:06 +0800 Subject: [PATCH 5/8] =?UTF-8?q?chore:=20=E9=87=8D=E6=9E=84=20EmptyLayout?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Layout/{PrintLayout.razor => EmptyLayout.razor} | 0 src/BootstrapBlazor.Server/Components/Samples/PrintView.razor | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/BootstrapBlazor.Server/Components/Layout/{PrintLayout.razor => EmptyLayout.razor} (100%) diff --git a/src/BootstrapBlazor.Server/Components/Layout/PrintLayout.razor b/src/BootstrapBlazor.Server/Components/Layout/EmptyLayout.razor similarity index 100% rename from src/BootstrapBlazor.Server/Components/Layout/PrintLayout.razor rename to src/BootstrapBlazor.Server/Components/Layout/EmptyLayout.razor diff --git a/src/BootstrapBlazor.Server/Components/Samples/PrintView.razor b/src/BootstrapBlazor.Server/Components/Samples/PrintView.razor index 94382fde440..8a342d9a481 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/PrintView.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/PrintView.razor @@ -1,5 +1,5 @@ @page "/print-view" -@layout PrintLayout +@layout EmptyLayout