feat: add one-click update feature to admin panel

This commit is contained in:
xboard
2025-02-09 13:43:09 +08:00
parent 1b728fffc7
commit 39456923d3
15 changed files with 660 additions and 100 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
<?php
use App\Services\ThemeService;
use App\Services\UpdateService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Log;
@@ -57,7 +58,7 @@ Route::get('/', function (Request $request) {
$renderParams = [
'title' => admin_setting('app_name', 'Xboard'),
'theme' => $theme,
'version' => config('app.version'),
'version' => app(UpdateService::class)->getCurrentVersion(),
'description' => admin_setting('app_description', 'Xboard is best'),
'logo' => admin_setting('logo'),
'theme_config' => $themeService->getConfig($theme)
@@ -80,7 +81,7 @@ Route::get('/' . admin_setting('secure_path', admin_setting('frontend_admin_path
'theme_header' => admin_setting('frontend_theme_header', 'dark'),
'theme_color' => admin_setting('frontend_theme_color', 'default'),
'background_url' => admin_setting('frontend_background_url'),
'version' => config('app.version'),
'version' => app(UpdateService::class)->getCurrentVersion(),
'logo' => admin_setting('logo'),
'secure_path' => admin_setting('secure_path', admin_setting('frontend_admin_path', hash('crc32b', config('app.key'))))
]);