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(); + } +}