mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-12-05 08:44:59 -06:00
Replace the manually set launcher version with releases uploaded from the
CI zip (exes, launcher-manifest.json and launcher-manifest.json.sig).
- New "Launcher" admin tool (renamed from Launcher Message): upload a
release, switch the current one, delete old ones, set the launcher message
- Uploads are validated: manifest rules, size + SHA-256 of every exe, and
the ECDSA manifest signature when LAUNCHER_UPDATE_PUBLIC_KEYS is set
- The same zip, manifest or version cannot be published twice; only the
newest 5 releases are kept and the current one is never removed
- Serve the current release to the launcher at /launcher/{file},
byte-for-byte and uncached, with range support for resumed downloads
- /download-launcher serves the newest framework build; the legacy
/api/v1/launcher-version returns the current release version
- Remove the launcher version from the Versioning tool
- Fix the file input button highlighting when hovering the whole input
73 lines
1.7 KiB
PHP
73 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Web\Admin\Tools;
|
|
|
|
use App\Enums\Auth\Permissions;
|
|
use App\Http\Controllers\Controller;
|
|
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,
|
|
LauncherController::class,
|
|
LogViewerController::class,
|
|
MatchConfigurationController::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);
|
|
}
|
|
}
|