Switch icon set

This commit is contained in:
Lance Pioch 2024-03-30 02:15:56 -04:00
parent a93ebfd7bf
commit a2b03895d7
11 changed files with 88 additions and 25 deletions

View File

@ -17,7 +17,7 @@ class DatabaseResource extends Resource
{ {
protected static ?string $model = Database::class; protected static ?string $model = Database::class;
protected static ?string $navigationIcon = 'heroicon-o-circle-stack'; protected static ?string $navigationIcon = 'tabler-database';
public static function form(Form $form): Form public static function form(Form $form): Form
{ {

View File

@ -14,7 +14,7 @@ class EggResource extends Resource
{ {
protected static ?string $model = Egg::class; protected static ?string $model = Egg::class;
protected static ?string $navigationIcon = 'heroicon-o-ellipsis-horizontal-circle'; protected static ?string $navigationIcon = 'tabler-eggs';
protected static ?string $recordTitleAttribute = 'name'; protected static ?string $recordTitleAttribute = 'name';
@ -146,7 +146,7 @@ class EggResource extends Resource
->wrap(), ->wrap(),
Tables\Columns\TextColumn::make('servers_count') Tables\Columns\TextColumn::make('servers_count')
->counts('servers') ->counts('servers')
->icon('heroicon-m-server-stack') ->icon('tabler-server')
->label('Servers'), ->label('Servers'),
Tables\Columns\TextColumn::make('script_container') Tables\Columns\TextColumn::make('script_container')
->searchable() ->searchable()

View File

@ -17,7 +17,7 @@ class MountResource extends Resource
{ {
protected static ?string $model = Mount::class; protected static ?string $model = Mount::class;
protected static ?string $navigationIcon = 'heroicon-o-link'; protected static ?string $navigationIcon = 'tabler-layers-linked';
public static function form(Form $form): Form public static function form(Form $form): Form
{ {

View File

@ -14,7 +14,7 @@ class NodeResource extends Resource
{ {
protected static ?string $model = Node::class; protected static ?string $model = Node::class;
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; protected static ?string $navigationIcon = 'tabler-server-2';
protected static ?string $recordTitleAttribute = 'name'; protected static ?string $recordTitleAttribute = 'name';
@ -72,8 +72,8 @@ class NodeResource extends Resource
false => 'danger', false => 'danger',
]) ])
->icons([ ->icons([
true => 'heroicon-m-eye', true => 'tabler-eye-check',
false => 'heroicon-m-lock-closed', false => 'tabler-eye-cancel',
]), ]),
]); ]);
} }
@ -103,17 +103,17 @@ class NodeResource extends Resource
->sortable(), ->sortable(),
Tables\Columns\IconColumn::make('scheme') Tables\Columns\IconColumn::make('scheme')
->label('SSL') ->label('SSL')
->trueIcon('heroicon-m-lock-closed') ->trueIcon('tabler-lock')
->falseIcon('heroicon-m-lock-open') ->falseIcon('tabler-lock-open-off')
->state(fn (Node $node) => $node->scheme === 'https'), ->state(fn (Node $node) => $node->scheme === 'https'),
Tables\Columns\IconColumn::make('public') Tables\Columns\IconColumn::make('public')
->trueIcon('heroicon-m-eye') ->trueIcon('tabler-eye-check')
->falseIcon('heroicon-m-eye-slash') ->falseIcon('tabler-eye-cancel')
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('servers_count') Tables\Columns\TextColumn::make('servers_count')
->counts('servers') ->counts('servers')
->label('Servers') ->label('Servers')
->icon('heroicon-m-server-stack'), ->icon('tabler-server'),
Tables\Columns\TextColumn::make('created_at') Tables\Columns\TextColumn::make('created_at')
->dateTime() ->dateTime()
->sortable() ->sortable()

View File

@ -59,7 +59,7 @@ class CreateNode extends CreateRecord
->inline() ->inline()
->helperText(function (Forms\Get $get) { ->helperText(function (Forms\Get $get) {
if (request()->isSecure()) { if (request()->isSecure()) {
return 'Your Panel is using a secure (https) connection, therefore your Daemon has to as well.'; return 'Your Panel is using a secure (SSL/TLS) connection, therefore your Daemon has to as well.';
} }
if (is_ip($get('fqdn'))) { if (is_ip($get('fqdn'))) {
@ -79,15 +79,15 @@ class CreateNode extends CreateRecord
}) })
->options([ ->options([
'http' => 'HTTP', 'http' => 'HTTP',
'https' => 'SSL (HTTPS)', 'https' => 'HTTPS (SSL)',
]) ])
->colors([ ->colors([
'http' => 'warning', 'http' => 'warning',
'https' => 'success', 'https' => 'success',
]) ])
->icons([ ->icons([
'http' => 'heroicon-m-lock-open', 'http' => 'tabler-lock-open-off',
'https' => 'heroicon-m-lock-closed', 'https' => 'tabler-lock',
]) ])
->default('http'), ->default('http'),
Forms\Components\TextInput::make('name') Forms\Components\TextInput::make('name')

View File

@ -18,7 +18,7 @@ class ServerResource extends Resource
{ {
protected static ?string $model = Server::class; protected static ?string $model = Server::class;
protected static ?string $navigationIcon = 'heroicon-o-server-stack'; protected static ?string $navigationIcon = 'tabler-server';
protected static ?string $recordTitleAttribute = 'name'; protected static ?string $recordTitleAttribute = 'name';

View File

@ -17,7 +17,7 @@ class UserResource extends Resource
{ {
protected static ?string $model = User::class; protected static ?string $model = User::class;
protected static ?string $navigationIcon = 'heroicon-o-user-group'; protected static ?string $navigationIcon = 'tabler-users';
protected static ?string $recordTitleAttribute = 'username'; protected static ?string $recordTitleAttribute = 'username';
@ -57,15 +57,15 @@ class UserResource extends Resource
->searchable(), ->searchable(),
Tables\Columns\IconColumn::make('root_admin')->label('Admin')->boolean()->sortable(), Tables\Columns\IconColumn::make('root_admin')->label('Admin')->boolean()->sortable(),
Tables\Columns\IconColumn::make('use_totp')->label('2FA') Tables\Columns\IconColumn::make('use_totp')->label('2FA')
->icon(fn (User $user) => $user->use_totp ? 'heroicon-o-lock-closed' : 'heroicon-o-lock-open') ->icon(fn (User $user) => $user->use_totp ? 'tabler-lock' : 'tabler-lock-open-off')
->boolean()->sortable(), ->boolean()->sortable(),
Tables\Columns\TextColumn::make('servers_count') Tables\Columns\TextColumn::make('servers_count')
->counts('servers') ->counts('servers')
->icon('heroicon-m-server-stack') ->icon('tabler-server')
->label('Servers Owned'), ->label('Servers Owned'),
Tables\Columns\TextColumn::make('subusers_count') Tables\Columns\TextColumn::make('subusers_count')
->counts('subusers') ->counts('subusers')
->icon('heroicon-m-users') ->icon('tabler-users')
// ->formatStateUsing(fn (string $state, $record): string => (string) ($record->servers_count + $record->subusers_count)) // ->formatStateUsing(fn (string $state, $record): string => (string) ($record->servers_count + $record->subusers_count))
->label('Subusers'), ->label('Subusers'),
Tables\Columns\TextColumn::make('created_at') Tables\Columns\TextColumn::make('created_at')

View File

@ -20,7 +20,7 @@ class NodeSystemInformation extends Component
return <<<'HTML' return <<<'HTML'
<div> <div>
<x-filament::icon <x-filament::icon
:icon="'heroicon-o-clock'" :icon="'tabler-heart-question'"
@class(['fi-ta-icon-item', $sizeClasses, 'fi-color-custom text-custom-500 dark:text-custom-400', 'fi-color-warning']) @class(['fi-ta-icon-item', $sizeClasses, 'fi-color-custom text-custom-500 dark:text-custom-400', 'fi-color-warning'])
@style([\Filament\Support\get_color_css_variables('warning', shades: [400, 500], alias: 'tables::columns.icon-column.item')]) @style([\Filament\Support\get_color_css_variables('warning', shades: [400, 500], alias: 'tables::columns.icon-column.item')])
/> />

View File

@ -28,6 +28,7 @@
"pragmarx/google2fa": "~8.0.0", "pragmarx/google2fa": "~8.0.0",
"predis/predis": "~2.1.1", "predis/predis": "~2.1.1",
"prologue/alerts": "^1.2", "prologue/alerts": "^1.2",
"ryangjchandler/blade-tabler-icons": "^2.3",
"s1lentium/iptools": "~1.2.0", "s1lentium/iptools": "~1.2.0",
"spatie/laravel-fractal": "^6.1", "spatie/laravel-fractal": "^6.1",
"spatie/laravel-query-builder": "^5.8", "spatie/laravel-query-builder": "^5.8",

64
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "e4573f890e580181b7d14bdb086f7c15", "content-hash": "27aa42f361104f415f248548d4667e43",
"packages": [ "packages": [
{ {
"name": "anourvalar/eloquent-serialize", "name": "anourvalar/eloquent-serialize",
@ -6175,6 +6175,68 @@
], ],
"time": "2024-02-26T18:08:49+00:00" "time": "2024-02-26T18:08:49+00:00"
}, },
{
"name": "ryangjchandler/blade-tabler-icons",
"version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/ryangjchandler/blade-tabler-icons.git",
"reference": "cd359f5d3b406a982dae1aaaf121d84067576a2e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ryangjchandler/blade-tabler-icons/zipball/cd359f5d3b406a982dae1aaaf121d84067576a2e",
"reference": "cd359f5d3b406a982dae1aaaf121d84067576a2e",
"shasum": ""
},
"require": {
"blade-ui-kit/blade-icons": "^1.5",
"illuminate/support": "^10.0 || ^11.0",
"php": "^8.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.14",
"orchestra/testbench": "^8.0 || ^9.0",
"phpunit/phpunit": "^9.5.10 || ^10.5"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"RyanChandler\\TablerIcons\\BladeTablerIconsServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"RyanChandler\\TablerIcons\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ryan Chandler",
"email": "support@ryangjchandler.co.uk",
"homepage": "https://ryangjchandler.co.uk",
"role": "Developer"
}
],
"description": "A package to easily make use of Tabler icons in your Laravel Blade views.",
"homepage": "https://github.com/ryangjchandler/blade-tabler-icons",
"keywords": [
"blade",
"laravel",
"tabler"
],
"support": {
"issues": "https://github.com/ryangjchandler/blade-tabler-icons/issues",
"source": "https://github.com/ryangjchandler/blade-tabler-icons/tree/v2.3.0"
},
"time": "2024-03-12T23:54:24+00:00"
},
{ {
"name": "s1lentium/iptools", "name": "s1lentium/iptools",
"version": "v1.2.0", "version": "v1.2.0",

View File

@ -2,14 +2,14 @@
@switch($node->systemInformation()['version'] ?? 'false') @switch($node->systemInformation()['version'] ?? 'false')
@case('false') @case('false')
<x-filament::icon <x-filament::icon
:icon="'heroicon-o-x-circle'" :icon="'tabler-heart-off'"
@class(['fi-ta-icon-item', $sizeClasses, 'fi-color-custom text-custom-500 dark:text-custom-400', 'fi-color-danger']) @class(['fi-ta-icon-item', $sizeClasses, 'fi-color-custom text-custom-500 dark:text-custom-400', 'fi-color-danger'])
@style([\Filament\Support\get_color_css_variables('danger', shades: [400, 500], alias: 'tables::columns.icon-column.item') => true]) @style([\Filament\Support\get_color_css_variables('danger', shades: [400, 500], alias: 'tables::columns.icon-column.item') => true])
/> />
@break @break
@default @default
<x-filament::icon <x-filament::icon
:icon="'heroicon-o-heart'" :icon="'tabler-heartbeat'"
@class(['fi-ta-icon-item', $sizeClasses, 'fi-color-custom text-custom-500 dark:text-custom-400', 'fi-color-success' => true]) @class(['fi-ta-icon-item', $sizeClasses, 'fi-color-custom text-custom-500 dark:text-custom-400', 'fi-color-success' => true])
@style([\Filament\Support\get_color_css_variables('success', shades: [400, 500], alias: 'tables::columns.icon-column.item') => true]) @style([\Filament\Support\get_color_css_variables('success', shades: [400, 500], alias: 'tables::columns.icon-column.item') => true])
/> />