Add owner image

This commit is contained in:
Matteo Gheza 2023-02-23 23:02:41 +01:00
parent 97247b66c7
commit a0372def79
6 changed files with 44 additions and 1 deletions

View File

@ -9,6 +9,9 @@ SANCTUM_STATEFUL_DOMAINS=localhost:4200,allertavvf.test
CRON_EXTERNAL_ENABLE=false
CRON_EXEC_CODE=REPLACE_THIS_IF_USING_EXTERNAL_CRON_SERVICE
OWNER=
OWNER_IMAGE=owner.png
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

View File

@ -0,0 +1,30 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Owner name
|--------------------------------------------------------------------------
|
| This options is used in reports generation.
|
*/
'owner' => env('OWNER', null),
/*
|--------------------------------------------------------------------------
| Custom owner image
|--------------------------------------------------------------------------
|
| This options can be used for replacing the default logo displayed on the
| list page and reports.
| Set this to the filename (with extension) of a file saved in
| "resources/images".
| Name it custom_SOMETHING.EXTENSION or SOMETHING.custom.EXTENSION because
| this is added to the .gitignore file
|
*/
'owner_image' => env('OWNER_IMAGE', 'owner.png'),
];

2
backend/resources/images/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
custom_*
*.custom.*

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -31,6 +31,14 @@ Route::middleware('auth:sanctum')->group( function () {
Route::post('/availability', [AvailabilityController::class, 'updateAvailability']);
Route::post('/manual_mode', [AvailabilityController::class, 'updateAvailabilityManualMode']);
Route::get('/owner_image', function() {
return response()
->file(
resource_path('images') . DIRECTORY_SEPARATOR . config("features.owner_image"),
['Cache-control' => 'max-age=2678400']
);
});
Route::post('/logout', [AuthController::class, 'logout']);
});

View File

@ -1 +1 @@
<!-- <img class="owner_image" alt="VVF" src="./api/owner_image"> -->
<img class="owner_image" alt="VVF" src="./api/owner_image">