From 578bfc67105048de35416555954a5c2391d56521 Mon Sep 17 00:00:00 2001 From: Argo-Tianyi Date: Sat, 25 Dec 2021 12:35:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20AdminAlert=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/AdminAlert.razor | 3 +++ .../Components/AdminAlert.razor.cs | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor create mode 100644 src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor.cs diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor b/src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor new file mode 100644 index 00000000..fcd94edc --- /dev/null +++ b/src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor @@ -0,0 +1,3 @@ + + @Text + diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor.cs b/src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor.cs new file mode 100644 index 00000000..5f47fd2a --- /dev/null +++ b/src/blazor/admin/BootstrapAdmin.Web/Components/AdminAlert.razor.cs @@ -0,0 +1,25 @@ +using BootstrapAdmin.Web.Core; + +namespace BootstrapAdmin.Web.Components; + +public partial class AdminAlert +{ + [Parameter] + public string? Text { get; set; } + + private bool IsDemo { get; set; } + + [Inject] + [NotNull] + private IDict? DictService { get; set; } + + /// + /// + /// + protected override void OnInitialized() + { + base.OnInitialized(); + + IsDemo = DictService.IsDemo(); + } +}