Require auth for the web UI, keep the JSON API open
Sites/Social Accounts/Posts pages now require login; add a Login Livewire component, guest layout, and logout action. routes/api.php is untouched, per AI_API.md's documented no-auth-by-design contract. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,10 +8,17 @@
|
||||
@livewireStyles
|
||||
</head>
|
||||
<body class="bg-gray-50 text-gray-900">
|
||||
<nav class="bg-white border-b border-gray-200 px-6 py-4 flex gap-6">
|
||||
<nav class="bg-white border-b border-gray-200 px-6 py-4 flex gap-6 items-center">
|
||||
<a href="{{ route('sites.index') }}" class="font-medium hover:text-blue-600">Sites</a>
|
||||
<a href="{{ route('social-accounts.index') }}" class="font-medium hover:text-blue-600">Social Accounts</a>
|
||||
<a href="{{ route('posts.index') }}" class="font-medium hover:text-blue-600">Posts</a>
|
||||
|
||||
@auth
|
||||
<form method="POST" action="{{ route('logout') }}" class="ml-auto">
|
||||
@csrf
|
||||
<button type="submit" class="text-sm text-gray-500 hover:text-gray-900">Log out</button>
|
||||
</form>
|
||||
@endauth
|
||||
</nav>
|
||||
|
||||
<main class="p-6">
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ $title ?? 'Muninn' }}</title>
|
||||
@vite('resources/css/app.css')
|
||||
@livewireStyles
|
||||
</head>
|
||||
<body class="bg-gray-50 text-gray-900 flex items-center justify-center min-h-screen">
|
||||
<main class="w-full max-w-sm px-4">
|
||||
{{ $slot }}
|
||||
</main>
|
||||
|
||||
@livewireScripts
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user