Made sidebar item collection extendable via interface. Refactored settings to system
This commit is contained in:
49
Moonlight.Frontend/Implementations/SidebarProvider.cs
Normal file
49
Moonlight.Frontend/Implementations/SidebarProvider.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using LucideBlazor;
|
||||
using Moonlight.Frontend.Interfaces;
|
||||
using Moonlight.Frontend.Models;
|
||||
|
||||
namespace Moonlight.Frontend.Implementations;
|
||||
|
||||
public sealed class SidebarProvider : ISidebarProvider
|
||||
{
|
||||
public Task<SidebarItem[]> GetItemsAsync()
|
||||
{
|
||||
return Task.FromResult<SidebarItem[]>([
|
||||
new()
|
||||
{
|
||||
Name = "Overview",
|
||||
IconType = typeof(LayoutDashboardIcon),
|
||||
Path = "/",
|
||||
IsExactPath = true,
|
||||
Order = 0
|
||||
},
|
||||
new()
|
||||
{
|
||||
Name = "Overview",
|
||||
IconType = typeof(LayoutDashboardIcon),
|
||||
Path = "/admin",
|
||||
IsExactPath = true,
|
||||
Group = "Admin",
|
||||
Order = 0
|
||||
},
|
||||
new()
|
||||
{
|
||||
Name = "Users",
|
||||
IconType = typeof(UsersRoundIcon),
|
||||
Path = "/users",
|
||||
IsExactPath = false,
|
||||
Group = "Admin",
|
||||
Order = 10
|
||||
},
|
||||
new()
|
||||
{
|
||||
Name = "System",
|
||||
IconType = typeof(SettingsIcon),
|
||||
Path = "/admin/system",
|
||||
IsExactPath = false,
|
||||
Group = "Admin",
|
||||
Order = 20
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user