Fix login form

This commit is contained in:
Daniel 2024-11-06 20:51:21 -05:00
parent 558a57e797
commit 2ec7924e86
2 changed files with 25 additions and 1 deletions

View file

@ -194,6 +194,21 @@
</nav> </nav>
</header> </header>
} }
@else {
<div class="relative flex flex-col h-full max-h-full">
<div class="px-6 pt-4">
<!-- Logo -->
<a
class="stillboxLogo flex-none rounded-xl text-xl inline-block font-semibold focus:outline-none focus:opacity-80"
href="#"
aria-label="Stillbox"
>
Stillbox
</a>
<!-- End Logo -->
</div>
</div>
}
<!-- ========== END HEADER ========== --> <!-- ========== END HEADER ========== -->
<!-- Sidebar --> <!-- Sidebar -->
@ -285,8 +300,17 @@
<!-- End Sidebar --> <!-- End Sidebar -->
<!-- Content --> <!-- Content -->
@if (auth.loggedIn) {
<div class="w-full lg:ps-64"> <div class="w-full lg:ps-64">
<div class="p-4 sm:p-6 space-y-4 sm:space-y-6"> <div class="p-4 sm:p-6 space-y-4 sm:space-y-6">
<router-outlet /> <router-outlet />
</div> </div>
</div> </div>
}
@else {
<div class="w-full">
<div class="p-4 sm:p-6 space-y-4 sm:space-y-6">
<router-outlet />
</div>
</div>
}

View file

@ -27,7 +27,7 @@ export class AuthService {
login(username: string, password: string): Observable<HttpResponse<Jwt>> { login(username: string, password: string): Observable<HttpResponse<Jwt>> {
return this.http return this.http
.post<Jwt>( .post<Jwt>(
'/login', '/api/login',
{ username: username, password: password }, { username: username, password: password },
{ observe: 'response' }, { observe: 'response' },
) )