Compare commits
No commits in common. "f90efdfa0e980e37f7a7634ab91c0b5f8c8db75e" and "d49c43f20983ac164eacaf1180f2940874252ff8" have entirely different histories.
f90efdfa0e
...
d49c43f209
@ -54,7 +54,6 @@ class Kernel extends HttpKernel
|
|||||||
*/
|
*/
|
||||||
protected $middlewareAliases = [
|
protected $middlewareAliases = [
|
||||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
'auth.admin' => \App\Http\Middleware\AuthenticateAdmin::class,
|
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class AuthenticateAdmin extends Middleware
|
|
||||||
{
|
|
||||||
protected function redirectTo(Request $request): ?string
|
|
||||||
{
|
|
||||||
return auth()->user()->is_admin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 0 B |
@ -1,4 +0,0 @@
|
|||||||
{{-- https://heroicons.com/ --}}
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
|
|
||||||
</svg>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{{-- https://heroicons.com/ --}}
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
|
|
||||||
</svg>
|
|
||||||
@ -4,10 +4,5 @@
|
|||||||
{{ Route::is($route)
|
{{ Route::is($route)
|
||||||
? 'text-nexi-red bg-gray-50 dark:text-nexi-purple dark:bg-zinc-800 transition-colors duration-300'
|
? 'text-nexi-red bg-gray-50 dark:text-nexi-purple dark:bg-zinc-800 transition-colors duration-300'
|
||||||
: 'text-nexi-black dark:text-nexi-grey hover:text-nexi-red dark:hover:text-nexi-red hover:bg-gray-100 dark:hover:bg-zinc-500 transition-colors duration-300' }}
|
: 'text-nexi-black dark:text-nexi-grey hover:text-nexi-red dark:hover:text-nexi-red hover:bg-gray-100 dark:hover:bg-zinc-500 transition-colors duration-300' }}
|
||||||
group flex gap-x-3 leading-6 items-center p-2 text-base font-medium rounded-md"
|
group flex items-center px-2 py-2 text-base font-medium rounded-md"
|
||||||
wire:navigate>
|
>{{ $slot }}</a>
|
||||||
{{ $svg ?? '' }}
|
|
||||||
<span>
|
|
||||||
{{ $slot }}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
|
|||||||
@ -1,37 +1,50 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex h-16 shrink-0 items-center border-b border-gray-200">
|
<div class="flex h-16 shrink-0 items-center border-b border-gray-200">
|
||||||
<a href="{{ route('home') }}" wire:navigate>
|
<a href="{{ route('home') }}" wire:navigate>
|
||||||
<img class="h-12 w-auto rounded" src="{{ asset('images/PriceyBot.webp') }}" alt="all hail pricey bot">
|
<img class="h-12 w-auto" src="https://benjamyn.love/PriceyBot.png" alt="">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="flex flex-1 flex-col">
|
<nav class="flex flex-1 flex-col">
|
||||||
<ul role="list" class="flex flex-1 flex-col gap-y-7">
|
<ul role="list" class="flex flex-1 flex-col gap-y-7">
|
||||||
<li class="border-b border-gray-200 pb-1">
|
<li class="border-b border-gray-200">
|
||||||
<div class="text-xs font-semibold leading-6 text-gray-400">User Menu</div>
|
<div class="text-xs font-semibold leading-6 text-gray-400">User Menu</div>
|
||||||
<ul role="list" class="-mx-2 mt-2 space-y-1">
|
<ul role="list" class="-mx-2 mt-2 space-y-1">
|
||||||
<ul role="list" class="-mx-2 space-y-1">
|
<ul role="list" class="-mx-2 space-y-1">
|
||||||
<li >
|
<li>
|
||||||
<x-sidebar-nav :href="route('dashboard')" route="dashboard">
|
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||||
<x-slot:svg><x-icons.home/></x-slot:svg>
|
{{-- <svg class="h-6 w-6 shrink-0 text-indigo-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">--}}
|
||||||
First Page
|
{{-- <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />--}}
|
||||||
</x-sidebar-nav>
|
{{-- </svg>--}}
|
||||||
|
<x-sidebar-nav :href="route('dashboard')" route="dashboard">First Page</x-sidebar-nav>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||||
|
{{-- <x-sidebar-nav :href="route('u-2')" route="u-2">Second Page</x-sidebar-nav>--}}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||||
|
{{-- <x-sidebar-nav :href="route('u-3')" route="u-3">Third Page</x-sidebar-nav>--}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@if(auth()->user()->is_admin)
|
@if(auth()->user()->is_admin)
|
||||||
<li class="border-b border-gray-200 pb-1">
|
<li>
|
||||||
<div class="text-xs font-semibold leading-6 text-gray-400">Admin Menu</div>
|
<div class="text-xs font-semibold leading-6 text-gray-400">Admin Menu</div>
|
||||||
<ul role="list" class="-mx-2 mt-2 space-y-1">
|
<ul role="list" class="-mx-2 mt-2 space-y-1">
|
||||||
<ul role="list" class="-mx-2 space-y-1">
|
<li>
|
||||||
<li>
|
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||||
<x-sidebar-nav :href="route('admin.send')" route="admin.send">
|
<x-sidebar-nav :href="route('admin.send')" route="send">Send Quote</x-sidebar-nav>
|
||||||
<x-slot:svg><x-icons.chat-bubble/></x-slot:svg>
|
</li>
|
||||||
Send Quote
|
<li>
|
||||||
</x-sidebar-nav>
|
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||||
</li>
|
{{-- <x-sidebar-nav :href="route('a-2')" route="a-2">Second Page</x-sidebar-nav>--}}
|
||||||
</ul>
|
</li>
|
||||||
|
<li>
|
||||||
|
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||||
|
{{-- <x-sidebar-nav :href="route('a-3')" route="a-3">Third Page</x-sidebar-nav>--}}
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<x-guest-layout>
|
<x-guest-layout>
|
||||||
<div class="flex flex-col mt-8 mb-8">
|
<div class="flex flex-col mt-8">
|
||||||
<livewire:pages.quote.request/>
|
<livewire:pages.quote.request/>
|
||||||
|
|
||||||
<livewire:pages.quote.requested/>
|
<livewire:pages.quote.requested/>
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
<body class="antialiased bg-nexi-primary dark:bg-nexi-primary-dark font-sans text-nexi-black transition-colors duration-300 h-full">
|
<body class="antialiased bg-nexi-primary dark:bg-nexi-primary-dark font-sans text-nexi-black transition-colors duration-300 h-full">
|
||||||
<div x-data="{ sidebarOpen: false }">
|
<div x-data="{ sidebarOpen: false }">
|
||||||
<div class="relative z-50 lg:hidden" role="dialog" aria-modal="true">
|
<div class="relative z-50 lg:hidden" role="dialog" aria-modal="true">
|
||||||
|
{{-- TODO: Look into why the fuck does this not work? mobile views seem to not work with livewire clicks??? --}}
|
||||||
<div x-show="sidebarOpen"
|
<div x-show="sidebarOpen"
|
||||||
x-transition:enter="transition-opacity ease-linear duration-300"
|
x-transition:enter="transition-opacity ease-linear duration-300"
|
||||||
x-transition:enter-start="opacity-0"
|
x-transition:enter-start="opacity-0"
|
||||||
|
|||||||
@ -19,9 +19,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body class="antialiased bg-nexi-primary dark:bg-nexi-primary-dark font-sans text-nexi-black transition-colors duration-300">
|
<body class="antialiased bg-nexi-primary dark:bg-nexi-primary-dark font-sans text-nexi-black transition-colors duration-300">
|
||||||
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 ">
|
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 ">
|
||||||
<a href="{{ route('home') }}" class="mt-24" wire:navigate>
|
{{-- TODO: REPLACE WITH OUR LOGO --}}
|
||||||
<img class="h-24 w-auto rounded" src="{{ asset('images/PriceyBot.webp') }}" alt="all hail pricey bot">
|
<div class="mt-24">
|
||||||
</a>
|
<img class="h-24 w-auto rounded" src="https://benjamyn.love/PriceyBot.png" alt="">
|
||||||
|
</div>
|
||||||
|
|
||||||
@if (Route::has('login'))
|
@if (Route::has('login'))
|
||||||
<livewire:guest.navigation />
|
<livewire:guest.navigation />
|
||||||
|
|||||||
@ -43,6 +43,7 @@ new class extends Component
|
|||||||
id="user-menu-button"
|
id="user-menu-button"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="true">
|
aria-haspopup="true">
|
||||||
|
{{-- TODO: Add User Image URL here --}}
|
||||||
<img class="h-8 w-8 rounded-full bg-gray-50" src="{{ auth()->user()->profile }}" alt="">
|
<img class="h-8 w-8 rounded-full bg-gray-50" src="{{ auth()->user()->profile }}" alt="">
|
||||||
<span class="hidden lg:flex lg:items-center">
|
<span class="hidden lg:flex lg:items-center">
|
||||||
<span class="ml-4 text-base font-semibold leading-6 text-nexi-black dark:text-nexi-grey" aria-hidden="true"
|
<span class="ml-4 text-base font-semibold leading-6 text-nexi-black dark:text-nexi-grey" aria-hidden="true"
|
||||||
@ -72,7 +73,7 @@ new class extends Component
|
|||||||
x-transition:leave-end="transform opacity-0 scale-95"
|
x-transition:leave-end="transform opacity-0 scale-95"
|
||||||
>
|
>
|
||||||
<div class="mt-3 space-y-1 text-sm">
|
<div class="mt-3 space-y-1 text-sm">
|
||||||
<x-responsive-nav-link :href="route('profile')" wire:navigate>
|
<x-responsive-nav-link u :href="route('profile')" wire:navigate>
|
||||||
{{ __('Profile') }}
|
{{ __('Profile') }}
|
||||||
</x-responsive-nav-link>
|
</x-responsive-nav-link>
|
||||||
|
|
||||||
|
|||||||
@ -17,18 +17,17 @@ use Livewire\Volt\Volt;
|
|||||||
Route::view('/', 'home')
|
Route::view('/', 'home')
|
||||||
->name('home');
|
->name('home');
|
||||||
|
|
||||||
Route::middleware(['auth'])->group(function() {
|
Route::view('dashboard', 'dashboard')
|
||||||
Route::view('dashboard', 'dashboard')
|
->middleware(['auth'])
|
||||||
->name('dashboard');
|
->name('dashboard');
|
||||||
|
|
||||||
Route::view('profile', 'profile')
|
Route::view('profile', 'profile')
|
||||||
->name('profile');
|
->middleware(['auth'])
|
||||||
|
->name('profile');
|
||||||
|
|
||||||
Route::middleware('auth.admin')->prefix('admin')->group(function () {
|
Route::view('send', 'admin.send')
|
||||||
Route::view('send', 'admin.send')
|
->middleware(['auth'])
|
||||||
->name('admin.send');
|
->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')
|
||||||
|
|||||||
Reference in New Issue
Block a user