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 $navigationIcon = 'heroicon-o-circle-stack';
protected static ?string $navigationIcon = 'tabler-database';
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 $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()

View File

@ -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
{

View File

@ -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()

View File

@ -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')

View File

@ -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';

View File

@ -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')

View File

@ -20,7 +20,7 @@ class NodeSystemInformation extends Component
return <<<'HTML'
<div>
<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'])
@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",
"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",

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",
"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",

View File

@ -2,14 +2,14 @@
@switch($node->systemInformation()['version'] ?? 'false')
@case('false')
<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'])
@style([\Filament\Support\get_color_css_variables('danger', shades: [400, 500], alias: 'tables::columns.icon-column.item') => true])
/>
@break
@default
<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])
@style([\Filament\Support\get_color_css_variables('success', shades: [400, 500], alias: 'tables::columns.icon-column.item') => true])
/>