diff --git a/app/Classes/Settings/System.php b/app/Classes/Settings/System.php index 792e2cb3..e278bac4 100644 --- a/app/Classes/Settings/System.php +++ b/app/Classes/Settings/System.php @@ -59,6 +59,8 @@ class System 'motd-enabled' => 'string', 'usefullinks-enabled' => 'string', 'motd-message' => 'string|nullable', + 'seo-title' => 'string|nullable', + 'seo-description' => 'string|nullable', ]); $validator->after(function ($validator) use ($request) { @@ -111,6 +113,8 @@ class System "SETTINGS::SYSTEM:MOTD_ENABLED" => "motd-enabled", "SETTINGS::SYSTEM:MOTD_MESSAGE" => "motd-message", "SETTINGS::SYSTEM:USEFULLINKS_ENABLED" => "usefullinks-enabled", + "SETTINGS::SYSTEM:SEO_TITLE" => "seo-title", + "SETTINGS::SYSTEM:SEO_DESCRIPTION" => "seo-description", ]; foreach ($values as $key => $value) { diff --git a/app/Console/Commands/GetGithubVersion.php b/app/Console/Commands/GetGithubVersion.php new file mode 100644 index 00000000..31e93625 --- /dev/null +++ b/app/Console/Commands/GetGithubVersion.php @@ -0,0 +1,43 @@ +json()[0]['name']; + Storage::disk('local')->put('latestVersion', $latestVersion); + } catch (Exception $e) { + Storage::disk('local')->put('latestVersion', "unknown"); + Log::error($e); + } + return Command::SUCCESS; + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 2121d32f..5f081211 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -17,6 +17,7 @@ class Kernel extends ConsoleKernel protected function schedule(Schedule $schedule) { $schedule->command('credits:charge')->hourly(); + $schedule->command('cp:versioncheck:get')->daily(); //log cronjob activity $schedule->call(function () { diff --git a/database/seeders/Seeds/SettingsSeeder.php b/database/seeders/Seeds/SettingsSeeder.php index f695483e..a9e5146b 100644 --- a/database/seeders/Seeds/SettingsSeeder.php +++ b/database/seeders/Seeds/SettingsSeeder.php @@ -630,5 +630,20 @@ class SettingsSeeder extends Seeder 'type' => 'text', 'description' => 'MOTD Message', ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:SEO_TITLE', + ], [ + 'value' => 'Controlpanel.gg', + 'type' => 'text', + 'description' => 'The SEO Title', + ]); + + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:SEO_DESCRIPTION', + ], [ + 'value' => 'Billing software for Pterodactyl Dashboard!', + 'type' => 'text', + 'description' => 'SEO Description', + ]); } } diff --git a/themes/default/views/admin/overview/index.blade.php b/themes/default/views/admin/overview/index.blade.php index 7bf2664a..20fef894 100644 --- a/themes/default/views/admin/overview/index.blade.php +++ b/themes/default/views/admin/overview/index.blade.php @@ -8,6 +8,7 @@