main #13
4 changed files with 17 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
||||||
<h2 mat-dialog-title>{{ data.title }}</h2>
|
<h2 mat-dialog-title>{{ data.title }}</h2>
|
||||||
<mat-dialog-content>{{ data.description }}</mat-dialog-content>
|
<mat-dialog-content>{{ data.description }}</mat-dialog-content>
|
||||||
<mat-dialog-actions>
|
<mat-dialog-actions>
|
||||||
<button mat-flat-button color="warn" (click)="close()">No</button>
|
<button mat-flat-button (click)="close()">No</button>
|
||||||
<button mat-flat-button (click)="accept()">Yes</button>
|
<button mat-flat-button color="warn" (click)="accept()">Yes</button>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|
|
@ -24,9 +24,16 @@
|
||||||
placeholder="Aurelius14"
|
placeholder="Aurelius14"
|
||||||
/>
|
/>
|
||||||
</mat-form-field>
|
</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>
|
<mat-divider></mat-divider>
|
||||||
<button mat-flat-button [style.backgroundColor]="'#FD4B2D'" class="mt-3 mat-authentik" (click)="loginWithAuthentik()">
|
<button
|
||||||
|
mat-flat-button
|
||||||
|
[style.backgroundColor]="'#FD4B2D'"
|
||||||
|
class="mt-3 mat-authentik"
|
||||||
|
(click)="loginWithAuthentik()"
|
||||||
|
>
|
||||||
Log in with Authentik
|
Log in with Authentik
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -78,7 +78,9 @@ export class LoginComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
loginWithAuthentik() {
|
loginWithAuthentik() {
|
||||||
this.pb.collection('users').authWithOAuth2({ provider: 'oidc' })
|
this.pb
|
||||||
|
.collection('users')
|
||||||
|
.authWithOAuth2({ provider: 'oidc' })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.router.navigate(['dashboard']);
|
this.router.navigate(['dashboard']);
|
||||||
})
|
})
|
||||||
|
|
|
@ -15,8 +15,6 @@ html {
|
||||||
@apply underline text-blue-500 cursor-pointer;
|
@apply underline text-blue-500 cursor-pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
Loading…
Add table
Reference in a new issue