This commit is contained in:
Bozhidar 2024-05-15 14:44:12 +03:00
parent b666366a22
commit 8c579e6890
12 changed files with 156 additions and 149 deletions

View file

@ -9,7 +9,7 @@ use Illuminate\Support\Str;
class Modules extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-puzzle-piece';
protected static ?string $navigationIcon = 'heroicon-o-cube';
protected static string $view = 'filament.pages.modules';

View file

@ -4,7 +4,7 @@ namespace App\Filament\Pages;
use Filament\Pages\Page;
class Updates extends Page
class PhyreUpdates extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-arrow-path';
@ -16,6 +16,8 @@ class Updates extends Page
protected static ?int $navigationSort = 1;
protected static bool $shouldRegisterNavigation = false;
public $logFilePath = '/usr/local/phyre/update/update.log';
public function startUpdate()

View file

@ -27,56 +27,41 @@ class Settings extends Page
'url'=> route('filament.admin.resources.users.index')
],
[
'title'=>'API Tokens',
'title'=>'API Keys',
'icon'=>'heroicon-o-key',
'url'=> route('filament.admin.resources.api-keys.index')
],
]
],
'Assistance and Troubleshooting'=>[
'title'=>'Assistance and Troubleshooting',
'icon'=>'heroicon-o-lifebuoy',
'links' =>[
[
'title'=>'Logs',
'icon'=>'heroicon-o-clipboard-list',
'url'=> ''
],
[
'title'=>'Support',
'icon'=>'heroicon-o-chat-alt',
'url'=>''
],
]
],
// 'Assistance and Troubleshooting'=>[
// 'title'=>'Assistance and Troubleshooting',
// 'icon'=>'heroicon-o-lifebuoy',
// 'links' =>[
// [
// 'title'=>'Logs',
// 'icon'=>'heroicon-o-clipboard-list',
// 'url'=> ''
// ],
// [
// 'title'=>'Support',
// 'icon'=>'heroicon-o-chat-alt',
// 'url'=>''
// ],
// ]
// ],
'Tools & Resources'=>[
'title'=>'Tools & Resources',
'icon'=>'heroicon-o-cog',
'links' =>[
[
'title'=>'File Manager',
'icon'=>'heroicon-o-folder',
'url'=> ''
],
[
'title'=>'Database Manager',
'icon'=>'heroicon-o-database',
'url'=>''
],
[
'title'=>'Task Scheduler',
'icon'=>'heroicon-o-clock',
'url'=>''
'title'=>'Backups',
'icon'=>'heroicon-o-cloud-upload',
'url'=> route('filament.admin.resources.backups.index')
],
[
'title'=>'Cron Jobs',
'icon'=>'heroicon-o-clock',
'url'=>''
],
[
'title'=>'PHP Info',
'icon'=>'heroicon-o-information-circle',
'url'=>''
'url'=> route('filament.admin.resources.cron-jobs.index')
],
]
],
@ -85,68 +70,43 @@ class Settings extends Page
'icon'=>'heroicon-o-cog',
'links' =>[
[
'title'=>'Site Settings',
'title'=>'Server Settings',
'icon'=>'heroicon-o-cog',
'url'=> ''
],
[
'title'=>'Appearance',
'icon'=>'heroicon-o-color-swatch',
'url'=>''
],
[
'title'=>'Email Settings',
'icon'=>'heroicon-o-mail',
'url'=>''
],
[
'title'=>'API Settings',
'icon'=>'heroicon-o-key',
'url'=>''
],
[
'title'=>'Backup Settings',
'icon'=>'heroicon-o-cloud-upload',
'url'=>''
],
[
'title'=>'Update Settings',
'icon'=>'heroicon-o-cloud-upload',
'url'=>''
],
]
],
'Server Management'=>[
'title'=>'Server Management',
'icon'=>'heroicon-o-server',
'links'=> [
[
'title'=>'Server Information',
'icon'=>'heroicon-o-information-circle',
'url'=> ''
],
[
'title'=>'Server Status',
'icon'=>'heroicon-o-check-circle',
'url'=>''
],
[
'title'=>'Server Resources',
'icon'=>'heroicon-o-chart-pie',
'url'=>''
],
[
'title'=>'Server Logs',
'icon'=>'heroicon-o-clipboard-list',
'url'=>''
],
[
'title'=>'Server Updates',
'icon'=>'heroicon-o-cloud-upload',
'url'=>''
'url'=> route('filament.admin.pages.general-settings')
],
]
],
// 'Server Management'=>[
// 'title'=>'Server Management',
// 'icon'=>'heroicon-o-server',
// 'links'=> [
// [
// 'title'=>'Server Information',
// 'icon'=>'heroicon-o-information-circle',
// 'url'=> ''
// ],
// [
// 'title'=>'Server Status',
// 'icon'=>'heroicon-o-check-circle',
// 'url'=>''
// ],
// [
// 'title'=>'Server Resources',
// 'icon'=>'heroicon-o-chart-pie',
// 'url'=>''
// ],
// [
// 'title'=>'Server Logs',
// 'icon'=>'heroicon-o-clipboard-list',
// 'url'=>''
// ],
// [
// 'title'=>'Server Updates',
// 'icon'=>'heroicon-o-cloud-upload',
// 'url'=>''
// ],
// ]
// ],
'Statistics'=> [
'title'=>'Statistics',
'icon'=>'heroicon-o-chart-bar',
@ -154,61 +114,66 @@ class Settings extends Page
[
'title'=>'Server Statistics',
'icon'=>'heroicon-o-chart-bar',
'url'=> ''
'url'=> route('filament.admin.pages.dashboard')
],
[
'title'=>'User Statistics',
'title'=>'Customers Statistics',
'icon'=>'heroicon-o-chart-bar',
'url'=>''
],
]
],
'Mail'=> [
'title'=>'Mail',
'icon'=>'heroicon-o-envelope',
'links'=> [
[
'title'=>'Mail Settings',
'icon'=>'heroicon-o-cog',
'url'=> ''
],
[
'title'=>'Mail Logs',
'icon'=>'heroicon-o-clipboard-list',
'url'=>''
],
]
],
'Applications & Databases'=>[
'title'=>'Applications & Databases',
'icon'=>'heroicon-o-cube',
'links'=> [
[
'title'=>'Applications',
'icon'=>'heroicon-o-cube',
'url'=> ''
],
[
'title'=>'Databases',
'icon'=>'heroicon-o-database',
'url'=>''
'url'=> route('filament.admin.resources.customers.index')
],
]
],
// 'Mail'=> [
// 'title'=>'Mail',
// 'icon'=>'heroicon-o-envelope',
// 'links'=> [
// [
// 'title'=>'Mail Settings',
// 'icon'=>'heroicon-o-cog',
// 'url'=> ''
// ],
// [
// 'title'=>'Mail Logs',
// 'icon'=>'heroicon-o-clipboard-list',
// 'url'=>''
// ],
// ]
// ],
// 'Applications & Databases'=>[
// 'title'=>'Applications & Databases',
// 'icon'=>'heroicon-o-cube',
// 'links'=> [
// [
// 'title'=>'Applications',
// 'icon'=>'heroicon-o-cube',
// 'url'=> ''
// ],
// [
// 'title'=>'Databases',
// 'icon'=>'heroicon-o-database',
// 'url'=>''
// ],
// ]
// ],
'Phyre'=> [
'title'=>'Phyre',
'icon'=>'heroicon-o-fire',
'links'=> [
// [
// 'title'=>'Phyre Settings',
// 'icon'=>'heroicon-o-cog',
// 'url'=> ''
// ],
// [
// 'title'=>'Phyre Logs',
// 'icon'=>'heroicon-o-clipboard-list',
// 'url'=>''
// ],
[
'title'=>'Phyre Settings',
'icon'=>'heroicon-o-cog',
'url'=> ''
],
[
'title'=>'Phyre Logs',
'icon'=>'heroicon-o-clipboard-list',
'url'=>''
],
'title'=>'Phyre Updates',
'icon'=>'heroicon-o-cloud-upload',
'url'=> route('filament.admin.pages.phyre-updates')
]
]
],
'Phyre Apperance'=> [
@ -218,12 +183,12 @@ class Settings extends Page
[
'title'=>'Phyre Theme',
'icon'=>'heroicon-o-color-swatch',
'url'=> ''
'url'=> route('filament.admin.pages.phyre-apperance')
],
[
'title'=>'Phyre Logo',
'icon'=>'heroicon-o-photograph',
'url'=>''
'url'=> route('filament.admin.pages.phyre-apperance')
],
]
]

View file

@ -17,7 +17,7 @@ use Monarobase\CountryList\CountryList;
use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings;
use Symfony\Component\Console\Input\Input;
class General extends BaseSettings
class GeneralSettings extends BaseSettings
{
protected static bool $shouldRegisterNavigation = false;

View file

@ -0,0 +1,32 @@
<?php
namespace App\Filament\Pages\Settings;
use App\Helpers;
use App\MasterDomain;
use Closure;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\ColorPicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Tabs;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Get;
use Illuminate\Support\Facades\Storage;
use Monarobase\CountryList\CountryList;
use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings;
use Symfony\Component\Console\Input\Input;
class PhyreApperance extends BaseSettings
{
protected static bool $shouldRegisterNavigation = false;
public function schema(): array|Closure
{
return [
TextInput::make('general.brand_name'),
TextInput::make('general.brand_logo_url'),
ColorPicker::make('general.brand_primary_color'),
];
}
}

View file

@ -23,6 +23,8 @@ class ApiKeyResource extends Resource
protected static ?int $navigationSort = 5;
protected static bool $shouldRegisterNavigation = false;
public static function form(Form $form): Form
{
return $form

View file

@ -36,6 +36,8 @@ class BackupResource extends Resource
protected static ?int $navigationSort = 97;
protected static bool $shouldRegisterNavigation = false;
public static function form(Form $form): Form
{
return $form

View file

@ -20,6 +20,8 @@ class CronJobResource extends Resource
protected static ?int $navigationSort = 98;
protected static bool $shouldRegisterNavigation = false;
public static function form(Form $form): Form
{
return $form

View file

@ -20,6 +20,8 @@ class UserResource extends Resource
protected static ?int $navigationSort = 3;
protected static bool $shouldRegisterNavigation = false;
public static function form(Form $form): Form
{
return $form

View file

@ -2,7 +2,7 @@
namespace App\Providers\Filament;
use App\Filament\Pages\Settings\General;
use App\Filament\Pages\Settings\GeneralSettings;
use App\Filament\Widgets\CustomersCount;
use App\Filament\Widgets\ServerDiskUsageStatistic;
use App\Filament\Widgets\ServerMemoryStatistic;
@ -72,7 +72,7 @@ class AdminPanelProvider extends PanelProvider
// FilamentAuthenticationLogPlugin::make(),
FilamentApexChartsPlugin::make(),
FilamentSettingsPlugin::make()->pages([
General::class,
GeneralSettings::class,
]),
])
// ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')

View file

@ -1,6 +1,6 @@
<x-filament-panels::page>
<div class="grid grid-cols-3 gap-4 gap-y-6">
<div class="grid grid-cols-3 gap-4 gap-y-8 bg-white/5 p-8 shadow rounded-xl">
@foreach($linkGroups as $group)
<div>
@ -11,10 +11,10 @@
</div>
</div>
<div class="pl-[2.1rem] mt-2">
<ul class="">
<ul class="flex flex-col gap-y-1">
@foreach($group['links'] as $link)
<li>
<a class="" href="#">
<a class="cursor-pointer font-medium hover:text-primary-500 transition" href="{{$link['url']}}">
{{$link['title']}}
</a>
</li>