mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-28 08:04:45 +02:00
Merge pull request #232 from Poseidon281/Navigation-Sidebar
Update: Navigation sidebar
This commit is contained in:
commit
b1d056a301
@ -13,6 +13,10 @@ class ApiKeyResource extends Resource
|
||||
protected static ?string $model = ApiKey::class;
|
||||
protected static ?string $label = 'API Key';
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
protected static ?string $navigationIcon = 'tabler-key';
|
||||
|
||||
public static function canEdit($record): bool
|
||||
|
@ -10,6 +10,11 @@ class DatabaseHostResource extends Resource
|
||||
{
|
||||
protected static ?string $model = DatabaseHost::class;
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
|
||||
protected static ?string $label = 'Databases';
|
||||
|
||||
protected static ?string $navigationIcon = 'tabler-database';
|
||||
|
@ -10,6 +10,11 @@ class DatabaseResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Database::class;
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
|
||||
protected static ?string $navigationIcon = 'tabler-database';
|
||||
|
||||
protected static bool $shouldRegisterNavigation = false;
|
||||
|
@ -10,6 +10,10 @@ class EggResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Egg::class;
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
protected static ?string $navigationIcon = 'tabler-eggs';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
@ -10,6 +10,11 @@ class MountResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Mount::class;
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
|
||||
protected static ?string $navigationIcon = 'tabler-layers-linked';
|
||||
|
||||
public static function getRelations(): array
|
||||
|
@ -11,6 +11,11 @@ class NodeResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Node::class;
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
|
||||
protected static ?string $navigationIcon = 'tabler-server-2';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
@ -10,6 +10,11 @@ class ServerResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Server::class;
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
|
||||
protected static ?string $navigationIcon = 'tabler-brand-docker';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
@ -11,6 +11,10 @@ class UserResource extends Resource
|
||||
{
|
||||
protected static ?string $model = User::class;
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return static::getModel()::count();
|
||||
}
|
||||
protected static ?string $navigationIcon = 'tabler-users';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'username';
|
||||
|
@ -36,6 +36,7 @@ class AdminPanelProvider extends PanelProvider
|
||||
->default()
|
||||
->id('admin')
|
||||
->path('admin')
|
||||
->topNavigation(true)
|
||||
->login()
|
||||
->homeUrl('/')
|
||||
->favicon('/pelican.ico')
|
||||
|
685
composer.lock
generated
685
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user