diff --git a/src/app/api/types/extended-user.ts b/src/app/api/types/extended-user.ts index 90aeafc..0110c76 100644 --- a/src/app/api/types/extended-user.ts +++ b/src/app/api/types/extended-user.ts @@ -9,6 +9,8 @@ export interface ExtendedUser extends User { rpcnAuthenticationAllowed: boolean; psnAuthenticationAllowed: boolean; + redirectGriefReportsToPhotos: boolean; + emailAddress: string | undefined; emailAddressVerified: boolean; } diff --git a/src/app/api/types/user-update-request.ts b/src/app/api/types/user-update-request.ts index 13307e5..47b12e2 100644 --- a/src/app/api/types/user-update-request.ts +++ b/src/app/api/types/user-update-request.ts @@ -5,5 +5,7 @@ export interface UserUpdateRequest { psnAuthenticationAllowed: boolean | undefined; rpcnAuthenticationAllowed: boolean | undefined; + redirectGriefReportsToPhotos: boolean | undefined; + emailAddress: string | undefined; } diff --git a/src/app/pages/settings/settings.component.html b/src/app/pages/settings/settings.component.html index 1c138e7..62b9e8a 100644 --- a/src/app/pages/settings/settings.component.html +++ b/src/app/pages/settings/settings.component.html @@ -7,6 +7,7 @@ + diff --git a/src/app/pages/settings/settings.component.ts b/src/app/pages/settings/settings.component.ts index d90b505..6c0f7f8 100644 --- a/src/app/pages/settings/settings.component.ts +++ b/src/app/pages/settings/settings.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit} from '@angular/core'; import {ApiClient} from "../../api/api-client"; import {UserUpdateRequest} from "../../api/types/user-update-request"; -import {faDesktop, faEnvelope, faGamepad, faKey, faTrash, faPencil} from "@fortawesome/free-solid-svg-icons"; +import {faDesktop, faEnvelope, faGamepad, faKey, faTrash, faPencil, faCamera} from "@fortawesome/free-solid-svg-icons"; import {ExtendedUser} from "../../api/types/extended-user"; import {startWith} from "rxjs"; @@ -16,9 +16,7 @@ export class SettingsComponent implements OnInit { allowIpAuth: boolean = false; allowPsnAuth: boolean = false; allowRpcnAuth: boolean = false; - - protected readonly faPencil = faPencil; - protected readonly faKey = faKey; + redirectGriefReportsToPhotos: boolean = false; constructor(private apiClient: ApiClient) { } @@ -36,6 +34,7 @@ export class SettingsComponent implements OnInit { this.allowIpAuth = data?.allowIpAuthentication ?? false; this.allowPsnAuth = data?.psnAuthenticationAllowed ?? false; this.allowRpcnAuth = data?.rpcnAuthenticationAllowed ?? false; + this.redirectGriefReportsToPhotos = data?.redirectGriefReportsToPhotos ?? false; } saveChanges() { @@ -46,13 +45,17 @@ export class SettingsComponent implements OnInit { allowIpAuthentication: this.allowIpAuth, psnAuthenticationAllowed: this.allowPsnAuth, rpcnAuthenticationAllowed: this.allowRpcnAuth, + redirectGriefReportsToPhotos: this.redirectGriefReportsToPhotos, }; this.apiClient.UpdateUser(request); } + protected readonly faPencil = faPencil; + protected readonly faKey = faKey; protected readonly faDesktop = faDesktop; protected readonly faGamepad = faGamepad; protected readonly faEnvelope = faEnvelope; protected readonly faTrash = faTrash; + protected readonly faCamera = faCamera; }