Skip to content

Commit db5a593

Browse files
committed
Login for support
1 parent 14d709e commit db5a593

3 files changed

Lines changed: 103 additions & 1 deletion

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<x-layout>
2+
<div class="flex items-center justify-center pt-12 pb-4 px-4 sm:px-6 lg:px-8">
3+
<div class="max-w-md w-full space-y-4 relative z-0 overflow-hidden bg-gray-200/40 dark:bg-mirage/50 p-6 rounded-2xl transition duration-300 group hover:bg-violet-100 dark:hover:bg-violet-500/10">
4+
<!-- Blur decoration -->
5+
<div class="absolute -left-10 -top-10 -z-50 h-3/4 w-40 rounded-full bg-violet-50 opacity-0 blur-3xl transition duration-300 group-hover:opacity-100 dark:bg-white/15"></div>
6+
<div>
7+
<h2 class="text-center text-3xl font-semibold leading-relaxed text-gray-900 dark:text-white">
8+
Sign in to your account
9+
</h2>
10+
<p class="mt-0.5 text-center text-sm text-gray-600 dark:text-gray-300">
11+
Or
12+
<a href="#" class="font-medium text-violet-600 hover:text-violet-500 dark:text-violet-400 dark:hover:text-violet-300 transition duration-300">
13+
create a new account
14+
</a>
15+
</p>
16+
</div>
17+
<form class="mt-4 space-y-3" action="#" method="POST">
18+
@csrf
19+
20+
<div class="rounded-md shadow-sm -space-y-px">
21+
<div>
22+
<label for="email" class="sr-only">Email address</label>
23+
<input id="email" name="email" type="email" autocomplete="email" required
24+
class="appearance-none rounded-none relative block w-full px-4 py-2.5 border border-gray-300
25+
dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900
26+
dark:text-white bg-white/80 dark:bg-gray-800/50 rounded-t-md focus:outline-none focus:ring-violet-500
27+
dark:focus:ring-violet-400 focus:border-violet-500 dark:focus:border-violet-400 focus:z-10 sm:text-sm transition duration-200"
28+
placeholder="Email address" value="{{ old('email') }}">
29+
@error('email')
30+
<p class="text-red-500 dark:text-red-400 text-xs mt-1">{{ $message }}</p>
31+
@enderror
32+
</div>
33+
<div>
34+
<label for="password" class="sr-only">Password</label>
35+
<input id="password" name="password" type="password" autocomplete="current-password" required
36+
class="appearance-none rounded-none relative block w-full px-4 py-2.5 border border-gray-300
37+
dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900
38+
dark:text-white bg-white/80 dark:bg-gray-800/50 rounded-b-md focus:outline-none focus:ring-violet-500
39+
dark:focus:ring-violet-400 focus:border-violet-500 dark:focus:border-violet-400 focus:z-10 sm:text-sm transition duration-200"
40+
placeholder="Password">
41+
@error('password')
42+
<p class="text-red-500 dark:text-red-400 text-xs mt-1">{{ $message }}</p>
43+
@enderror
44+
</div>
45+
</div>
46+
47+
<div class="flex items-center justify-between mt-3">
48+
<div class="flex items-center">
49+
<input id="remember_me" name="remember" type="checkbox"
50+
class="h-4 w-4 text-violet-600 dark:text-violet-500 focus:ring-violet-500 dark:focus:ring-violet-400
51+
border-gray-300 dark:border-gray-700 rounded dark:bg-gray-800/50 transition duration-200">
52+
<label for="remember_me" class="ml-2 block text-sm text-gray-900 dark:text-gray-200">
53+
Remember me
54+
</label>
55+
</div>
56+
57+
<div class="text-sm">
58+
<a href="#" class="font-medium text-violet-600 hover:text-violet-500 dark:text-violet-400 dark:hover:text-violet-300 transition duration-300">
59+
Forgot your password?
60+
</a>
61+
</div>
62+
</div>
63+
64+
<div class="mt-4">
65+
<button type="submit"
66+
class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium
67+
rounded-xl text-white bg-violet-600 hover:bg-violet-700 dark:bg-violet-700 dark:hover:bg-violet-800
68+
focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-violet-500 dark:focus:ring-violet-400
69+
dark:focus:ring-offset-gray-800 transition duration-300">
70+
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
71+
<svg class="h-5 w-5 text-violet-500 group-hover:text-violet-400 dark:text-violet-300 dark:group-hover:text-violet-200" xmlns="http://www.w3.org/2000/svg"
72+
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
73+
<path fill-rule="evenodd"
74+
d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
75+
clip-rule="evenodd" />
76+
</svg>
77+
</span>
78+
Sign in
79+
</button>
80+
</div>
81+
</form>
82+
</div>
83+
</div>
84+
</x-layout>

resources/views/support/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class="group flex w-full flex-col items-center rounded-xl bg-gray-100/80 p-8 tex
5050
</a>
5151

5252
{{-- Support Tickets Box --}}
53-
<a href="https://support.nativephp.com"
53+
<a href="{{ route('support.tickets') }}"
5454
target="_blank"
5555
rel="noopener"
5656
class="group flex w-full flex-col items-center rounded-xl bg-gray-100/80 p-8 text-center transition duration-300 hover:-translate-y-1 hover:bg-gray-200/80 hover:shadow-lg dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:hover:shadow-gray-900/30"

routes/web.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use App\Http\Controllers\ShowDocumentationController;
4+
use Illuminate\Support\Facades\Auth;
45
use Illuminate\Support\Facades\Route;
56
use Illuminate\Support\Str;
67

@@ -59,4 +60,21 @@
5960
Route::get('/', function () {
6061
return view('support.index');
6162
})->name('support.index');
63+
64+
Route::prefix('/tickets')->group(function () {
65+
Route::get('/', function () {
66+
if (!Auth::check()) {
67+
return redirect()->route('support.auth.login');
68+
}
69+
70+
return view('support.tickets.index');
71+
})->name('support.tickets');
72+
73+
Route::get('/login', function () {
74+
if (Auth::check()) {
75+
return redirect()->route('support.tickets');
76+
}
77+
return view('support.auth.login');
78+
})->name('support.auth.login');
79+
});
6280
});

0 commit comments

Comments
 (0)