diff --git a/backend/.env.example b/backend/.env.example index c22b74b..4613415 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -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 diff --git a/backend/config/features.php b/backend/config/features.php new file mode 100644 index 0000000..2ec02e9 --- /dev/null +++ b/backend/config/features.php @@ -0,0 +1,30 @@ + 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'), +]; \ No newline at end of file diff --git a/backend/resources/images/.gitignore b/backend/resources/images/.gitignore new file mode 100644 index 0000000..3902e09 --- /dev/null +++ b/backend/resources/images/.gitignore @@ -0,0 +1,2 @@ +custom_* +*.custom.* \ No newline at end of file diff --git a/backend/resources/images/owner.png b/backend/resources/images/owner.png new file mode 100644 index 0000000..81522cb Binary files /dev/null and b/backend/resources/images/owner.png differ diff --git a/backend/routes/api.php b/backend/routes/api.php index 87fbbf0..a07f5ef 100644 --- a/backend/routes/api.php +++ b/backend/routes/api.php @@ -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']); }); diff --git a/frontend/src/app/_components/owner-image/owner-image.component.html b/frontend/src/app/_components/owner-image/owner-image.component.html index 4e027c8..82cabde 100644 --- a/frontend/src/app/_components/owner-image/owner-image.component.html +++ b/frontend/src/app/_components/owner-image/owner-image.component.html @@ -1 +1 @@ - \ No newline at end of file +VVF \ No newline at end of file