mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-04-14 09:15:47 -05:00
- launcher version (updating launcher) - game version - content version (for catalog) - catalog version Also added checks that when the wrong content version you dont get a catalog until you update tha game. And added another check when queuing when using the wrong game version you dont get queued. (so that hunters on the wrong version cannot block the matchmaking)
71 lines
1.6 KiB
PHP
71 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Web\Admin\Tools;
|
|
|
|
use App\Enums\Auth\Permissions;
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\View;
|
|
|
|
abstract class AdminToolController extends Controller
|
|
{
|
|
protected static string $name;
|
|
|
|
protected static string $description;
|
|
|
|
protected static string $iconComponent;
|
|
|
|
protected static Permissions $neededPermission;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->overrideTitle(static::$name);
|
|
}
|
|
|
|
/**
|
|
* @return AdminToolController[]|string[]
|
|
*/
|
|
final public static function getAllTools(): array
|
|
{
|
|
return [
|
|
GameNewsController::class,
|
|
FileManagerController::class,
|
|
VersioningController::class,
|
|
LauncherMessageController::class,
|
|
LogViewerController::class,
|
|
UsersController::class,
|
|
ChatMessageController::class,
|
|
InboxMailerController::class,
|
|
PlayerReportsController::class,
|
|
];
|
|
}
|
|
|
|
public static function getNotificationText(): ?string {
|
|
return null;
|
|
}
|
|
|
|
final public static function getName(): string
|
|
{
|
|
return static::$name;
|
|
}
|
|
|
|
final public static function getDescription(): string
|
|
{
|
|
return static::$description;
|
|
}
|
|
|
|
final public static function getIconComponent(): string
|
|
{
|
|
return static::$iconComponent;
|
|
}
|
|
|
|
final public static function getNeededPermission(): string
|
|
{
|
|
return static::$neededPermission->value;
|
|
}
|
|
|
|
final protected function overrideTitle(string $title): void {
|
|
View::share('title', $title);
|
|
}
|
|
}
|