Added current tab as query parameter to system page
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@page "/admin/system"
|
||||
|
||||
@using LucideBlazor
|
||||
@using ShadcnBlazor.Buttons
|
||||
@using ShadcnBlazor.Cards
|
||||
@@ -6,7 +7,9 @@
|
||||
@using ShadcnBlazor.Tab
|
||||
@using ShadcnBlazor.Labels
|
||||
|
||||
<Tabs DefaultValue="customization">
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
<Tabs DefaultValue="@(Tab ?? "customization")" OnValueChanged="OnTabChanged">
|
||||
<TabsList ClassName="inline-flex w-full lg:w-fit justify-start overflow-x-auto overflow-y-hidden">
|
||||
<TabsTrigger Value="customization">
|
||||
<PaintRollerIcon />
|
||||
@@ -43,3 +46,15 @@
|
||||
<Diagnose />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
|
||||
@code
|
||||
{
|
||||
[SupplyParameterFromQuery(Name = "tab")]
|
||||
[Parameter]
|
||||
public string? Tab { get; set; }
|
||||
|
||||
private void OnTabChanged(string name)
|
||||
{
|
||||
Navigation.NavigateTo($"/admin/system?tab={name}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user