main #13
4 changed files with 17 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
<h2 mat-dialog-title>{{ data.title }}</h2>
|
||||
<mat-dialog-content>{{ data.description }}</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<button mat-flat-button color="warn" (click)="close()">No</button>
|
||||
<button mat-flat-button (click)="accept()">Yes</button>
|
||||
<button mat-flat-button (click)="close()">No</button>
|
||||
<button mat-flat-button color="warn" (click)="accept()">Yes</button>
|
||||
</mat-dialog-actions>
|
||||
|
|
|
@ -24,10 +24,17 @@
|
|||
placeholder="Aurelius14"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<button class="mb-3" mat-flat-button type="submit" (click)="submit()">Login</button>
|
||||
<button class="mb-3" mat-flat-button type="submit" (click)="submit()">
|
||||
Login
|
||||
</button>
|
||||
<mat-divider></mat-divider>
|
||||
<button mat-flat-button [style.backgroundColor]="'#FD4B2D'" class="mt-3 mat-authentik" (click)="loginWithAuthentik()">
|
||||
Log in with Authentik
|
||||
<button
|
||||
mat-flat-button
|
||||
[style.backgroundColor]="'#FD4B2D'"
|
||||
class="mt-3 mat-authentik"
|
||||
(click)="loginWithAuthentik()"
|
||||
>
|
||||
Log in with Authentik
|
||||
</button>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
|
|
@ -13,7 +13,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|||
import { MatInputModule, MatLabel } from '@angular/material/input';
|
||||
import { MatButton, MatButtonModule } from '@angular/material/button';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import {MatDividerModule} from '@angular/material/divider';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
|
@ -38,7 +38,7 @@ export class LoginComponent {
|
|||
constructor(
|
||||
private router: Router,
|
||||
private snackBar: MatSnackBar,
|
||||
) { }
|
||||
) {}
|
||||
|
||||
private validationErrorMessages: Record<string, string> = {
|
||||
required: 'This field is required',
|
||||
|
@ -78,7 +78,9 @@ export class LoginComponent {
|
|||
}
|
||||
|
||||
loginWithAuthentik() {
|
||||
this.pb.collection('users').authWithOAuth2({ provider: 'oidc' })
|
||||
this.pb
|
||||
.collection('users')
|
||||
.authWithOAuth2({ provider: 'oidc' })
|
||||
.then(() => {
|
||||
this.router.navigate(['dashboard']);
|
||||
})
|
||||
|
|
|
@ -15,8 +15,6 @@ html {
|
|||
@apply underline text-blue-500 cursor-pointer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
|
|
Loading…
Add table
Reference in a new issue