Adds the whole disclaimer feature

This commit is contained in:
2026-03-16 15:22:17 +01:00
parent 29a94899da
commit 7f380303ab
12 changed files with 499 additions and 27 deletions

View File

@@ -4,16 +4,29 @@
namespace App\Http\Controllers;
use App\Services\Config as ConfigService;
use Inertia\Inertia;
use Inertia\Response;
final class LandingController extends Controller
{
/**
* Display the landing page.
* Display the landing page with a flag indicating whether a disclaimer is configured.
*/
public function index(): Response
public function index(ConfigService $config): Response
{
return Inertia::render('Landing');
return Inertia::render('Landing', [
'hasDisclaimer' => $config->contentDisclaimer !== '',
]);
}
/**
* Display the disclaimer page with the configured markdown content.
*/
public function disclaimer(ConfigService $config): Response
{
return Inertia::render('Disclaimer', [
'content' => $config->contentDisclaimer,
]);
}
}