Merge remote-tracking branch 'origin/master' into fix/dark-mode-issues

This commit is contained in:
Nicholas Ciechanowski 2023-10-09 22:12:48 +11:00
commit 01ca39da17
6 changed files with 23 additions and 6 deletions

View File

@ -15,7 +15,7 @@ class HeaderAuth
*/ */
public function handle(Request $request, Closure $next): Response public function handle(Request $request, Closure $next): Response
{ {
if (hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) { if (!hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) {
return response('Unauthorized', 401); return response('Unauthorized', 401);
} }

View File

@ -2,5 +2,5 @@
return [ return [
'webhook' => env('BOT_SLACK_WEBHOOK_URL', ''), 'webhook' => env('BOT_SLACK_WEBHOOK_URL', ''),
'header_auth' => env('BOT_SLACK_WEBHOOK_URL', ''), 'header_auth' => env('BOT_X_BOTAUTH', ''),
]; ];

View File

@ -0,0 +1,9 @@
<x-app-layout>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="p-6 text-nexi-black dark:text-gray-100">
<livewire:pages.admin.send/>
</div>
</div>
</div>
</x-app-layout>

View File

@ -35,7 +35,7 @@
<ul role="list" class="-mx-2 mt-2 space-y-1"> <ul role="list" class="-mx-2 mt-2 space-y-1">
<li> <li>
{{-- TODO: fill with SVG icons to make it pretty --}} {{-- TODO: fill with SVG icons to make it pretty --}}
{{-- <x-sidebar-nav :href="route('a-1')" route="a-1">First Page</x-sidebar-nav>--}} <x-sidebar-nav :href="route('admin.send')" route="send">Send Quote</x-sidebar-nav>
</li> </li>
<li> <li>
{{-- TODO: fill with SVG icons to make it pretty --}} {{-- TODO: fill with SVG icons to make it pretty --}}

View File

@ -1,5 +1,9 @@
<x-app-layout> <x-app-layout>
@if(auth()->user()->is_admin) <div class="py-12">
<livewire:pages.admin.send/> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
@endif <div class="p-6 text-nexi-black dark:text-gray-100">
{{ __("You're logged in!") }}
</div>
</div>
</div>
</x-app-layout> </x-app-layout>

View File

@ -25,6 +25,10 @@ Route::view('profile', 'profile')
->middleware(['auth']) ->middleware(['auth'])
->name('profile'); ->name('profile');
Route::view('send', 'admin.send')
->middleware(['auth'])
->name('admin.send');
Route::middleware('guest')->group(function () { Route::middleware('guest')->group(function () {
Volt::route('login', 'pages.auth.login') Volt::route('login', 'pages.auth.login')
->name('login'); ->name('login');