Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/src/app/common/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VM_ADMIN = "VmAdmin";
export const VM_ADMIN = "VM_ADMIN";
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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')
Expand Down
6 changes: 3 additions & 3 deletions src/src/app/view/login-landing/errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum Errors {
TwitchErrorWithToken,
TwitchAccountHasNoEmail,
InternalError
TWITCH_ERROR_WITH_TOKEN,
TWITCH_ACCOUNT_HAS_NO_EMAIL,
INTERNAL_ERROR
}
12 changes: 6 additions & 6 deletions src/src/app/view/login-landing/login-landing.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down