diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index 1f3040c..f989d96 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -2,7 +2,12 @@
- @@ -43,7 +48,11 @@ Short link - @@ -52,7 +61,11 @@ Actions - diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 4864573..000f514 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -15,7 +15,13 @@ import { LogoutService } from '../service/logout.service'; @Component({ selector: 'app-dashboard', - imports: [NavbarComponent, MatTableModule, MatCardModule, MatButtonModule, OptionsMenuComponent], + imports: [ + NavbarComponent, + MatTableModule, + MatCardModule, + MatButtonModule, + OptionsMenuComponent, + ], templateUrl: './dashboard.component.html', styleUrl: './dashboard.component.css', }) diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 77cf73e..fbccfe1 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -38,7 +38,7 @@ export class LoginComponent { constructor( private router: Router, private snackBar: MatSnackBar, - ) {} + ) { } private validationErrorMessages: Record = { required: 'This field is required', @@ -80,7 +80,7 @@ export class LoginComponent { loginWithAuthentik() { this.pb .collection('users') - .authWithOAuth2({ provider: 'oidc' }) + .authWithOAuth2({ provider: 'oidc', scopes: ['openid', 'email', 'profile', 'avatar'] }) .then(() => { this.router.navigate(['dashboard']); }) diff --git a/src/app/options-menu/options-menu.component.html b/src/app/options-menu/options-menu.component.html index 310c5cb..ca0b865 100644 --- a/src/app/options-menu/options-menu.component.html +++ b/src/app/options-menu/options-menu.component.html @@ -1,4 +1,8 @@ - diff --git a/src/app/options-menu/options-menu.component.spec.ts b/src/app/options-menu/options-menu.component.spec.ts index 1023094..615eec6 100644 --- a/src/app/options-menu/options-menu.component.spec.ts +++ b/src/app/options-menu/options-menu.component.spec.ts @@ -8,9 +8,8 @@ describe('OptionsMenuComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [OptionsMenuComponent] - }) - .compileComponents(); + imports: [OptionsMenuComponent], + }).compileComponents(); fixture = TestBed.createComponent(OptionsMenuComponent); component = fixture.componentInstance; diff --git a/src/app/options-menu/options-menu.component.ts b/src/app/options-menu/options-menu.component.ts index a7d1fbf..554bb57 100644 --- a/src/app/options-menu/options-menu.component.ts +++ b/src/app/options-menu/options-menu.component.ts @@ -1,14 +1,14 @@ import { Component } from '@angular/core'; -import {MatIconModule} from '@angular/material/icon'; -import {MatMenuModule} from '@angular/material/menu'; -import {MatButtonModule} from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatButtonModule } from '@angular/material/button'; import { LogoutService } from '../service/logout.service'; @Component({ selector: 'app-options-menu', imports: [MatIconModule, MatMenuModule, MatButtonModule], templateUrl: './options-menu.component.html', - styleUrl: './options-menu.component.css' + styleUrl: './options-menu.component.css', }) export class OptionsMenuComponent { constructor(private logoutService: LogoutService) {} diff --git a/src/app/service/logout.service.ts b/src/app/service/logout.service.ts index 018b187..6c76d09 100644 --- a/src/app/service/logout.service.ts +++ b/src/app/service/logout.service.ts @@ -1,7 +1,7 @@ -import { Injectable } from "@angular/core"; +import { Injectable } from '@angular/core'; import PocketBase from 'pocketbase'; -import { environment } from "../../environments/environment"; -import { Router } from "@angular/router"; +import { environment } from '../../environments/environment'; +import { Router } from '@angular/router'; @Injectable({ providedIn: 'root', @@ -9,7 +9,7 @@ import { Router } from "@angular/router"; export class LogoutService { private pb = new PocketBase(environment.POCKETBASE); - constructor(private router: Router) { } + constructor(private router: Router) {} logout() { this.pb.authStore.clear();