From a2b03895d706d8162ad680212857f1f4b3918705 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sat, 30 Mar 2024 02:15:56 -0400 Subject: [PATCH] Switch icon set --- app/Filament/Resources/DatabaseResource.php | 2 +- app/Filament/Resources/EggResource.php | 4 +- app/Filament/Resources/MountResource.php | 2 +- app/Filament/Resources/NodeResource.php | 16 ++--- .../NodeResource/Pages/CreateNode.php | 8 +-- app/Filament/Resources/ServerResource.php | 2 +- app/Filament/Resources/UserResource.php | 8 +-- app/Livewire/NodeSystemInformation.php | 2 +- composer.json | 1 + composer.lock | 64 ++++++++++++++++++- .../node-system-information.blade.php | 4 +- 11 files changed, 88 insertions(+), 25 deletions(-) diff --git a/app/Filament/Resources/DatabaseResource.php b/app/Filament/Resources/DatabaseResource.php index 55b8d60ba..d140fb98a 100644 --- a/app/Filament/Resources/DatabaseResource.php +++ b/app/Filament/Resources/DatabaseResource.php @@ -17,7 +17,7 @@ class DatabaseResource extends Resource { 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 { diff --git a/app/Filament/Resources/EggResource.php b/app/Filament/Resources/EggResource.php index 3d8d0d43f..93778453a 100644 --- a/app/Filament/Resources/EggResource.php +++ b/app/Filament/Resources/EggResource.php @@ -14,7 +14,7 @@ class EggResource extends Resource { 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'; @@ -146,7 +146,7 @@ class EggResource extends Resource ->wrap(), Tables\Columns\TextColumn::make('servers_count') ->counts('servers') - ->icon('heroicon-m-server-stack') + ->icon('tabler-server') ->label('Servers'), Tables\Columns\TextColumn::make('script_container') ->searchable() diff --git a/app/Filament/Resources/MountResource.php b/app/Filament/Resources/MountResource.php index db40a2f52..4f64f41ac 100644 --- a/app/Filament/Resources/MountResource.php +++ b/app/Filament/Resources/MountResource.php @@ -17,7 +17,7 @@ class MountResource extends Resource { 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 { diff --git a/app/Filament/Resources/NodeResource.php b/app/Filament/Resources/NodeResource.php index 0bbf9b40d..4f10d5c03 100644 --- a/app/Filament/Resources/NodeResource.php +++ b/app/Filament/Resources/NodeResource.php @@ -14,7 +14,7 @@ class NodeResource extends Resource { 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'; @@ -72,8 +72,8 @@ class NodeResource extends Resource false => 'danger', ]) ->icons([ - true => 'heroicon-m-eye', - false => 'heroicon-m-lock-closed', + true => 'tabler-eye-check', + false => 'tabler-eye-cancel', ]), ]); } @@ -103,17 +103,17 @@ class NodeResource extends Resource ->sortable(), Tables\Columns\IconColumn::make('scheme') ->label('SSL') - ->trueIcon('heroicon-m-lock-closed') - ->falseIcon('heroicon-m-lock-open') + ->trueIcon('tabler-lock') + ->falseIcon('tabler-lock-open-off') ->state(fn (Node $node) => $node->scheme === 'https'), Tables\Columns\IconColumn::make('public') - ->trueIcon('heroicon-m-eye') - ->falseIcon('heroicon-m-eye-slash') + ->trueIcon('tabler-eye-check') + ->falseIcon('tabler-eye-cancel') ->sortable(), Tables\Columns\TextColumn::make('servers_count') ->counts('servers') ->label('Servers') - ->icon('heroicon-m-server-stack'), + ->icon('tabler-server'), Tables\Columns\TextColumn::make('created_at') ->dateTime() ->sortable() diff --git a/app/Filament/Resources/NodeResource/Pages/CreateNode.php b/app/Filament/Resources/NodeResource/Pages/CreateNode.php index 603385792..f2edbb6f9 100644 --- a/app/Filament/Resources/NodeResource/Pages/CreateNode.php +++ b/app/Filament/Resources/NodeResource/Pages/CreateNode.php @@ -59,7 +59,7 @@ class CreateNode extends CreateRecord ->inline() ->helperText(function (Forms\Get $get) { 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'))) { @@ -79,15 +79,15 @@ class CreateNode extends CreateRecord }) ->options([ 'http' => 'HTTP', - 'https' => 'SSL (HTTPS)', + 'https' => 'HTTPS (SSL)', ]) ->colors([ 'http' => 'warning', 'https' => 'success', ]) ->icons([ - 'http' => 'heroicon-m-lock-open', - 'https' => 'heroicon-m-lock-closed', + 'http' => 'tabler-lock-open-off', + 'https' => 'tabler-lock', ]) ->default('http'), Forms\Components\TextInput::make('name') diff --git a/app/Filament/Resources/ServerResource.php b/app/Filament/Resources/ServerResource.php index 62bd7d93f..d367d07f1 100644 --- a/app/Filament/Resources/ServerResource.php +++ b/app/Filament/Resources/ServerResource.php @@ -18,7 +18,7 @@ class ServerResource extends Resource { 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'; diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index c1418ef32..8f407adcc 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -17,7 +17,7 @@ class UserResource extends Resource { 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'; @@ -57,15 +57,15 @@ class UserResource extends Resource ->searchable(), Tables\Columns\IconColumn::make('root_admin')->label('Admin')->boolean()->sortable(), 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(), Tables\Columns\TextColumn::make('servers_count') ->counts('servers') - ->icon('heroicon-m-server-stack') + ->icon('tabler-server') ->label('Servers Owned'), Tables\Columns\TextColumn::make('subusers_count') ->counts('subusers') - ->icon('heroicon-m-users') + ->icon('tabler-users') // ->formatStateUsing(fn (string $state, $record): string => (string) ($record->servers_count + $record->subusers_count)) ->label('Subusers'), Tables\Columns\TextColumn::make('created_at') diff --git a/app/Livewire/NodeSystemInformation.php b/app/Livewire/NodeSystemInformation.php index cefda7f72..b29190251 100644 --- a/app/Livewire/NodeSystemInformation.php +++ b/app/Livewire/NodeSystemInformation.php @@ -20,7 +20,7 @@ class NodeSystemInformation extends Component return <<<'HTML'
diff --git a/composer.json b/composer.json index 2feb15b32..4fbc39fd6 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "pragmarx/google2fa": "~8.0.0", "predis/predis": "~2.1.1", "prologue/alerts": "^1.2", + "ryangjchandler/blade-tabler-icons": "^2.3", "s1lentium/iptools": "~1.2.0", "spatie/laravel-fractal": "^6.1", "spatie/laravel-query-builder": "^5.8", diff --git a/composer.lock b/composer.lock index 6a2602309..9adbea1aa 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e4573f890e580181b7d14bdb086f7c15", + "content-hash": "27aa42f361104f415f248548d4667e43", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -6175,6 +6175,68 @@ ], "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", "version": "v1.2.0", diff --git a/resources/views/livewire/node-system-information.blade.php b/resources/views/livewire/node-system-information.blade.php index 6c1523356..77436db06 100644 --- a/resources/views/livewire/node-system-information.blade.php +++ b/resources/views/livewire/node-system-information.blade.php @@ -2,14 +2,14 @@ @switch($node->systemInformation()['version'] ?? 'false') @case('false') true]) /> @break @default true]) @style([\Filament\Support\get_color_css_variables('success', shades: [400, 500], alias: 'tables::columns.icon-column.item') => true]) />