diff --git a/src/src/app/common/constants.ts b/src/src/app/common/constants.ts index cc9f647..a4d826c 100644 --- a/src/src/app/common/constants.ts +++ b/src/src/app/common/constants.ts @@ -1 +1 @@ -export const VM_ADMIN = "VmAdmin"; +export const VM_ADMIN = "VM_ADMIN"; diff --git a/src/src/app/view/login-landing-desktop/login-landing-desktop.component.ts b/src/src/app/view/login-landing-desktop/login-landing-desktop.component.ts index a60bd2d..2942af4 100644 --- a/src/src/app/view/login-landing-desktop/login-landing-desktop.component.ts +++ b/src/src/app/view/login-landing-desktop/login-landing-desktop.component.ts @@ -20,9 +20,9 @@ import {CdkCopyToClipboard} from "@angular/cdk/clipboard"; templateUrl: './login-landing-desktop.component.html', styleUrl: './login-landing-desktop.component.scss' }) -export class LoginLandingDesktopComponent implements OnInit { - private api = inject(NullinsideService); - private route = inject(ActivatedRoute); +export class LoginLandingDesktopComponent implements OnInit { + private api = inject(NullinsideService); + private route = inject(ActivatedRoute); error: string = ''; oAuth: OAuth | null = null; @@ -34,9 +34,9 @@ export class LoginLandingDesktopComponent implements OnInit { const error = params.get('error'); if (null !== error) { const errorNum = +error; - if (Errors.TwitchAccountHasNoEmail === errorNum) { + if (Errors.TWITCH_ACCOUNT_HAS_NO_EMAIL === errorNum) { this.onLoginFailed('Your Twitch account must have a valid e-mail address, please add one and try again') - } else if (Errors.TwitchErrorWithToken === errorNum) { + } else if (Errors.TWITCH_ERROR_WITH_TOKEN === errorNum) { this.onLoginFailed('Twitch failed to give us a valid token, please try again') } else { this.onLoginFailed('Sorry we did something wrong trying to log you in, please try again') diff --git a/src/src/app/view/login-landing/errors.ts b/src/src/app/view/login-landing/errors.ts index c1c20e7..0e09d3c 100644 --- a/src/src/app/view/login-landing/errors.ts +++ b/src/src/app/view/login-landing/errors.ts @@ -1,5 +1,5 @@ export enum Errors { - TwitchErrorWithToken, - TwitchAccountHasNoEmail, - InternalError + TWITCH_ERROR_WITH_TOKEN, + TWITCH_ACCOUNT_HAS_NO_EMAIL, + INTERNAL_ERROR } diff --git a/src/src/app/view/login-landing/login-landing.component.ts b/src/src/app/view/login-landing/login-landing.component.ts index 21f0d92..c2d7416 100644 --- a/src/src/app/view/login-landing/login-landing.component.ts +++ b/src/src/app/view/login-landing/login-landing.component.ts @@ -16,10 +16,10 @@ import {Errors} from "./errors"; templateUrl: './login-landing.component.html', styleUrl: './login-landing.component.scss' }) -export class LoginLandingComponent implements OnInit, OnDestroy { - private api = inject(NullinsideService); - private route = inject(ActivatedRoute); - private router = inject(Router); +export class LoginLandingComponent implements OnInit, OnDestroy { + private api = inject(NullinsideService); + private route = inject(ActivatedRoute); + private router = inject(Router); timerId: number = -1; error: string = ''; @@ -36,9 +36,9 @@ export class LoginLandingComponent implements OnInit, OnDestroy { const error = params.get('error'); if (null !== error) { const errorNum = +error; - if (Errors.TwitchAccountHasNoEmail === errorNum) { + if (Errors.TWITCH_ACCOUNT_HAS_NO_EMAIL === errorNum) { this.onLoginFailed('Your Twitch account must have a valid e-mail address, please add one and try again', false) - } else if (Errors.TwitchErrorWithToken === errorNum) { + } else if (Errors.TWITCH_ERROR_WITH_TOKEN === errorNum) { this.onLoginFailed('Twitch failed to give us a valid token, please try again', false) } else { this.onLoginFailed('Sorry we did something wrong trying to log you in, please try again', false) diff --git a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts index 70d0915..9bce961 100644 --- a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts +++ b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts @@ -29,13 +29,13 @@ import {Location} from "@angular/common"; templateUrl: './twitch-bot-config.component.html', styleUrl: './twitch-bot-config.component.scss' }) -export class TwitchBotConfigComponent implements OnInit, OnDestroy { - private twitchBotApi = inject(NullinsideTwitchBotService); - private api = inject(NullinsideService); - private snackBar = inject(MatSnackBar); - private location = inject(Location); - private router = inject(Router); - private route = inject(ActivatedRoute); +export class TwitchBotConfigComponent implements OnInit, OnDestroy { + private twitchBotApi = inject(NullinsideTwitchBotService); + private api = inject(NullinsideService); + private snackBar = inject(MatSnackBar); + private location = inject(Location); + private router = inject(Router); + private route = inject(ActivatedRoute); public botIsMod: boolean | null = null; public timerId: number = -1; @@ -60,9 +60,9 @@ export class TwitchBotConfigComponent implements OnInit, OnDestroy { const error = params.get('error'); if (null !== error) { const errorNum = +error; - if (Errors.TwitchAccountHasNoEmail === errorNum) { + if (Errors.TWITCH_ACCOUNT_HAS_NO_EMAIL === errorNum) { this.onLoginFailed('Your Twitch account must have a valid e-mail address, please add one and try again', false) - } else if (Errors.TwitchErrorWithToken === errorNum) { + } else if (Errors.TWITCH_ERROR_WITH_TOKEN === errorNum) { this.onLoginFailed('Twitch failed to log you in successfully, please try again', false) } else { this.onLoginFailed('Sorry we did something wrong trying to log you in, please try again', false)