Refactored project to module structure
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
using LucideBlazor;
|
||||
using Moonlight.Frontend.Infrastructure.Hooks;
|
||||
using Moonlight.Frontend.Infrastructure.Models;
|
||||
using Moonlight.Shared;
|
||||
|
||||
namespace Moonlight.Frontend.Infrastructure.Implementations;
|
||||
|
||||
public sealed class SidebarProvider : ISidebarProvider
|
||||
{
|
||||
public Task<SidebarItem[]> GetItemsAsync()
|
||||
{
|
||||
return Task.FromResult<SidebarItem[]>([
|
||||
new SidebarItem
|
||||
{
|
||||
Name = "Overview",
|
||||
IconType = typeof(LayoutDashboardIcon),
|
||||
Path = "/",
|
||||
IsExactPath = true,
|
||||
Order = 0
|
||||
},
|
||||
new SidebarItem
|
||||
{
|
||||
Name = "Overview",
|
||||
IconType = typeof(LayoutDashboardIcon),
|
||||
Path = "/admin",
|
||||
IsExactPath = true,
|
||||
Group = "Admin",
|
||||
Order = 0,
|
||||
Policy = Permissions.System.Info
|
||||
},
|
||||
new SidebarItem
|
||||
{
|
||||
Name = "Users",
|
||||
IconType = typeof(UsersRoundIcon),
|
||||
Path = "/admin/users",
|
||||
IsExactPath = false,
|
||||
Group = "Admin",
|
||||
Order = 10,
|
||||
Policy = Permissions.Users.View
|
||||
},
|
||||
new SidebarItem
|
||||
{
|
||||
Name = "System",
|
||||
IconType = typeof(SettingsIcon),
|
||||
Path = "/admin/system",
|
||||
IsExactPath = false,
|
||||
Group = "Admin",
|
||||
Order = 20,
|
||||
Policy = Permissions.System.Info
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user