1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

PWA Manifest: Tweaks during review of PR #4430

- Updated to go through HomeController with the builder as a helper
  class.
- Extracted some reapeated items into variables in manifest.
- Updated background color to match those used by BookStack.
- Removed reference of icon.ico since its not intended to be used.
- Added tests to cover functionality.

Review of #4430
This commit is contained in:
Dan Brown
2023-10-02 15:54:39 +01:00
parent 287ed4ff3b
commit 1d91b4d8a6
5 changed files with 98 additions and 32 deletions

View File

@ -5,7 +5,6 @@ use BookStack\Activity\Controllers as ActivityControllers;
use BookStack\Api\ApiDocsController;
use BookStack\Api\UserApiTokenController;
use BookStack\App\HomeController;
use BookStack\App\PwaManifestBuilder;
use BookStack\Entities\Controllers as EntityControllers;
use BookStack\Http\Middleware\VerifyCsrfToken;
use BookStack\Permissions\PermissionsController;
@ -21,7 +20,7 @@ use Illuminate\View\Middleware\ShareErrorsFromSession;
Route::get('/status', [SettingControllers\StatusController::class, 'show']);
Route::get('/robots.txt', [HomeController::class, 'robots']);
Route::get('/favicon.ico', [HomeController::class, 'favicon']);
Route::get('/manifest.json', [PwaManifestBuilder::class, 'manifest']);
Route::get('/manifest.json', [HomeController::class, 'pwaManifest']);
// Authenticated routes...
Route::middleware('auth')->group(function () {