2023-04-05 15:29:58 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Controllers\Admin;
|
|
|
|
|
|
|
|
use Illuminate\View\View;
|
|
|
|
use Illuminate\View\Factory as ViewFactory;
|
|
|
|
use Pterodactyl\Http\Controllers\Controller;
|
|
|
|
use Pterodactyl\Services\Helpers\SoftwareVersionService;
|
|
|
|
use Pterodactyl\Services\Helpers\BlueprintVariableService;
|
|
|
|
|
|
|
|
class ExtensionsController extends Controller
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* ExtensionsController constructor.
|
|
|
|
*/
|
|
|
|
public function __construct(private SoftwareVersionService $version, private ViewFactory $view, private BlueprintVariableService $bp)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the admin index view.
|
|
|
|
*/
|
|
|
|
public function index(): View
|
|
|
|
{
|
2023-04-23 11:34:21 -04:00
|
|
|
// Onboarding check.
|
2023-06-27 15:40:35 -04:00
|
|
|
if(shell_exec("cd /var/www/pterodactyl;cat .blueprint/data/internal/db/onboarding") == "*blueprint*") {
|
2023-04-23 11:34:21 -04:00
|
|
|
$onboarding = true;
|
2023-04-23 12:37:28 -04:00
|
|
|
} else {
|
|
|
|
$onboarding = false;
|
2023-04-23 11:34:21 -04:00
|
|
|
}
|
|
|
|
return $this->view->make('admin.extensions', [
|
|
|
|
'version' => $this->version,
|
|
|
|
'bp' => $this->bp,
|
|
|
|
'root' => "/admin/extensions",
|
|
|
|
|
|
|
|
'onboarding' => $onboarding
|
|
|
|
]);
|
2023-04-05 15:29:58 -04:00
|
|
|
}
|
|
|
|
}
|