-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update authentication elements
- Loading branch information
1 parent
fbd79ac
commit 8ce6896
Showing
15 changed files
with
91 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 45 additions & 16 deletions
61
client/src/app/pages/authentication/feature/authentication/authentication.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,48 @@ | ||
<div class="prose dark:prose-invert prose-2xl"> | ||
<p>USER NOT AUTHENTICATED!</p> | ||
<app-header></app-header> | ||
|
||
<button routerLink="/dashboard"> Back</button> | ||
<form [formGroup]="loginForm" (ngSubmit)="onLogIn()"> | ||
<div class="mb-3"> | ||
<label for="identifier">Identifier</label> | ||
<input type="identifier" class="form-control" id="identifier" placeholder="you@example.com" formControlName="identifier" /> | ||
<div class="min-h-full flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"> | ||
<div class="max-w-md w-full space-y-8"> | ||
<div> | ||
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">Sign in to your account</h2> | ||
<p class="mt-2 text-center text-sm text-gray-600"> | ||
Or | ||
<a href="/dashboard" class="font-medium text-gray-600 hover:text-gray-500 underline underline-offset-4 decoration-2"> create a new one. </a> | ||
</p> | ||
</div> | ||
<form [formGroup]="loginForm" (ngSubmit)="onLogIn()" class="mt-8 space-y-6" method="POST"> | ||
<input type="hidden" name="remember" value="true"> | ||
<div class="rounded-md shadow-sm -space-y-px"> | ||
<div> | ||
<label for="identifier" class="sr-only">Identifier</label> | ||
<input id="identifier" name="identifier" type="identifier" formControlName="identifier" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-gray-500 focus:border-gray-500 focus:z-10 sm:text-sm" placeholder="Identifier"> | ||
</div> | ||
<div> | ||
<label for="password" class="sr-only">Password</label> | ||
<input id="password" name="password" type="password" formControlName="password" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-gray-500 focus:border-gray-500 focus:z-10 sm:text-sm" placeholder="Password"> | ||
</div> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="password">Password</label> | ||
<input type="password" class="form-control" id="password" formControlName="password" /> | ||
|
||
<div class="flex items-center justify-between"> | ||
<div class="flex items-center"> | ||
<input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-gray-600 focus:ring-gray-500 border-gray-300 rounded"> | ||
<label for="remember-me" class="ml-2 block text-sm text-gray-900"> Remember me </label> | ||
</div> | ||
|
||
<div class="text-sm"> | ||
<a href="#" class="font-medium text-gray-600 hover:text-gray-500"> Forgot your password? </a> | ||
</div> | ||
</div> | ||
|
||
<button class="btn btn-primary btn-lg btn-block" type="submit"> | ||
Log in | ||
</button> | ||
</form> | ||
</div> | ||
|
||
<div> | ||
<button type="submit" class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-gray-600 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"> | ||
<span class="absolute left-0 inset-y-0 flex items-center pl-3"> | ||
<svg class="h-5 w-5 text-gray-500 group-hover:text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" 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" clip-rule="evenodd" /> | ||
</svg> | ||
</span> | ||
Sign in | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
client/src/app/pages/dashboard/feature/favourites/favourites.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
<p>favourites works!</p> | ||
<h1>Welcome to dashboard</h1> | ||
<app-header></app-header> | ||
|
||
<h1 class="mt-6 text-center text-3xl font-extrabold text-gray-900">Dashboard View Authorized.</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { environment } from "src/environments/environment"; | ||
|
||
export class Constants { | ||
public static API_URL: string = 'http://localhost:4200' + '/api'; | ||
public static API_URL: string = environment.apiUrl + '/api'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export const environment = { | ||
production: true, | ||
apiUrl: 'http://localhost:28002/' | ||
strapiUrl: 'http://localhost:28002', | ||
apiUrl: 'http://localhost:4200' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters