diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/LinkButton.razor b/src/blazor/admin/BootstrapAdmin.Web/Components/LinkButton.razor deleted file mode 100644 index 0899a2ea..00000000 --- a/src/blazor/admin/BootstrapAdmin.Web/Components/LinkButton.razor +++ /dev/null @@ -1,19 +0,0 @@ -@inherits TooltipComponentBase - - - @if (!string.IsNullOrEmpty(Text)) - { - @Text - } - @if (!string.IsNullOrEmpty(Img)) - { - img - } - @ChildContent - @if (!string.IsNullOrEmpty(Title)) - { - - - - } - \ No newline at end of file diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/LinkButton.razor.cs b/src/blazor/admin/BootstrapAdmin.Web/Components/LinkButton.razor.cs deleted file mode 100644 index a96881e5..00000000 --- a/src/blazor/admin/BootstrapAdmin.Web/Components/LinkButton.razor.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Microsoft.AspNetCore.Components.Web; - -namespace BootstrapAdmin.Web.Components -{ - /// - /// - /// - public partial class LinkButton - { - /// - /// - /// - [Parameter] - public string? Text { get; set; } - - /// - /// - /// - [Parameter] - public string Url { get; set; } = "#"; - - /// - /// - /// - [Parameter] - public string? Title { get; set; } - - /// - /// - /// - [Parameter] - public string? Img { get; set; } - - /// - /// - /// - [Parameter] - public Placement TooltipPlacement { get; set; } = Placement.Top; - - /// - /// - /// - [Parameter] - public RenderFragment? ChildContent { get; set; } - - /// - /// - /// - [Parameter] - public EventCallback OnClick { get; set; } - - private bool Prevent => Url.StartsWith('#'); - } -} diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/RedirectToLogin.cs b/src/blazor/admin/BootstrapAdmin.Web/Components/RedirectToLogin.cs deleted file mode 100644 index 964a09dd..00000000 --- a/src/blazor/admin/BootstrapAdmin.Web/Components/RedirectToLogin.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace BootstrapAdmin.Web.Components -{ - /// - /// - /// - public class RedirectToLogin : ComponentBase - { - [Inject] - [NotNull] - private NavigationManager? Navigation { get; set; } - -#if DEBUG - /// - /// - /// - /// - protected override void OnAfterRender(bool firstRender) - { - Navigation.NavigateTo($"/Account/Login", true); - } -#else - protected override void OnInitialized() - { - Navigation.NavigateTo($"/Account/Login", true); - } -#endif - } -} diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/SwitchButton.razor b/src/blazor/admin/BootstrapAdmin.Web/Components/SwitchButton.razor deleted file mode 100644 index 7683b0cb..00000000 --- a/src/blazor/admin/BootstrapAdmin.Web/Components/SwitchButton.razor +++ /dev/null @@ -1,3 +0,0 @@ -@inherits BootstrapComponentBase - -@GetText() \ No newline at end of file diff --git a/src/blazor/admin/BootstrapAdmin.Web/Components/SwitchButton.razor.cs b/src/blazor/admin/BootstrapAdmin.Web/Components/SwitchButton.razor.cs deleted file mode 100644 index 2c7cc2a9..00000000 --- a/src/blazor/admin/BootstrapAdmin.Web/Components/SwitchButton.razor.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.AspNetCore.Components.Web; - -namespace BootstrapAdmin.Web.Components -{ - /// - /// - /// - public partial class SwitchButton - { - /// - /// - /// - [Parameter] - public string? OnText { get; set; } - - /// - /// - /// - [Parameter] - public string? OffText { get; set; } - - /// - /// - /// - [Parameter] - public bool ToggleState { get; set; } - - /// - /// - /// - [Parameter] - public EventCallback ToggleStateChanged { get; set; } - - /// - /// - /// - [Parameter] - public EventCallback OnClick { get; set; } - - private async Task Toggle() - { - ToggleState = !ToggleState; - if (ToggleStateChanged.HasDelegate) - { - await ToggleStateChanged.InvokeAsync(ToggleState); - } - if (OnClick.HasDelegate) - { - await OnClick.InvokeAsync(); - } - } - - private string? GetText() => ToggleState ? OnText : OffText; - } -}