Skip to content

Commit a5f8f46

Browse files
Merge pull request #99 from nullinside-development-group/fix/vm-admin
fix: showing vm admin's the vm admin view
2 parents 7dbf40d + 0f43f74 commit a5f8f46

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

src/src/app/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VM_ADMIN = "VmAdmin";
1+
export const VM_ADMIN = "VM_ADMIN";

src/src/app/view/login-landing-desktop/login-landing-desktop.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import {CdkCopyToClipboard} from "@angular/cdk/clipboard";
2020
templateUrl: './login-landing-desktop.component.html',
2121
styleUrl: './login-landing-desktop.component.scss'
2222
})
23-
export class LoginLandingDesktopComponent implements OnInit {
24-
private api = inject(NullinsideService);
25-
private route = inject(ActivatedRoute);
23+
export class LoginLandingDesktopComponent implements OnInit {
24+
private api = inject(NullinsideService);
25+
private route = inject(ActivatedRoute);
2626

2727
error: string = '';
2828
oAuth: OAuth | null = null;
@@ -34,9 +34,9 @@ export class LoginLandingDesktopComponent implements OnInit {
3434
const error = params.get('error');
3535
if (null !== error) {
3636
const errorNum = +error;
37-
if (Errors.TwitchAccountHasNoEmail === errorNum) {
37+
if (Errors.TWITCH_ACCOUNT_HAS_NO_EMAIL === errorNum) {
3838
this.onLoginFailed('Your Twitch account must have a valid e-mail address, please add one and try again')
39-
} else if (Errors.TwitchErrorWithToken === errorNum) {
39+
} else if (Errors.TWITCH_ERROR_WITH_TOKEN === errorNum) {
4040
this.onLoginFailed('Twitch failed to give us a valid token, please try again')
4141
} else {
4242
this.onLoginFailed('Sorry we did something wrong trying to log you in, please try again')
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export enum Errors {
2-
TwitchErrorWithToken,
3-
TwitchAccountHasNoEmail,
4-
InternalError
2+
TWITCH_ERROR_WITH_TOKEN,
3+
TWITCH_ACCOUNT_HAS_NO_EMAIL,
4+
INTERNAL_ERROR
55
}

src/src/app/view/login-landing/login-landing.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import {Errors} from "./errors";
1616
templateUrl: './login-landing.component.html',
1717
styleUrl: './login-landing.component.scss'
1818
})
19-
export class LoginLandingComponent implements OnInit, OnDestroy {
20-
private api = inject(NullinsideService);
21-
private route = inject(ActivatedRoute);
22-
private router = inject(Router);
19+
export class LoginLandingComponent implements OnInit, OnDestroy {
20+
private api = inject(NullinsideService);
21+
private route = inject(ActivatedRoute);
22+
private router = inject(Router);
2323

2424
timerId: number = -1;
2525
error: string = '';
@@ -36,9 +36,9 @@ export class LoginLandingComponent implements OnInit, OnDestroy {
3636
const error = params.get('error');
3737
if (null !== error) {
3838
const errorNum = +error;
39-
if (Errors.TwitchAccountHasNoEmail === errorNum) {
39+
if (Errors.TWITCH_ACCOUNT_HAS_NO_EMAIL === errorNum) {
4040
this.onLoginFailed('Your Twitch account must have a valid e-mail address, please add one and try again', false)
41-
} else if (Errors.TwitchErrorWithToken === errorNum) {
41+
} else if (Errors.TWITCH_ERROR_WITH_TOKEN === errorNum) {
4242
this.onLoginFailed('Twitch failed to give us a valid token, please try again', false)
4343
} else {
4444
this.onLoginFailed('Sorry we did something wrong trying to log you in, please try again', false)

src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ import {Location} from "@angular/common";
2929
templateUrl: './twitch-bot-config.component.html',
3030
styleUrl: './twitch-bot-config.component.scss'
3131
})
32-
export class TwitchBotConfigComponent implements OnInit, OnDestroy {
33-
private twitchBotApi = inject(NullinsideTwitchBotService);
34-
private api = inject(NullinsideService);
35-
private snackBar = inject(MatSnackBar);
36-
private location = inject(Location);
37-
private router = inject(Router);
38-
private route = inject(ActivatedRoute);
32+
export class TwitchBotConfigComponent implements OnInit, OnDestroy {
33+
private twitchBotApi = inject(NullinsideTwitchBotService);
34+
private api = inject(NullinsideService);
35+
private snackBar = inject(MatSnackBar);
36+
private location = inject(Location);
37+
private router = inject(Router);
38+
private route = inject(ActivatedRoute);
3939

4040
public botIsMod: boolean | null = null;
4141
public timerId: number = -1;
@@ -60,9 +60,9 @@ export class TwitchBotConfigComponent implements OnInit, OnDestroy {
6060
const error = params.get('error');
6161
if (null !== error) {
6262
const errorNum = +error;
63-
if (Errors.TwitchAccountHasNoEmail === errorNum) {
63+
if (Errors.TWITCH_ACCOUNT_HAS_NO_EMAIL === errorNum) {
6464
this.onLoginFailed('Your Twitch account must have a valid e-mail address, please add one and try again', false)
65-
} else if (Errors.TwitchErrorWithToken === errorNum) {
65+
} else if (Errors.TWITCH_ERROR_WITH_TOKEN === errorNum) {
6666
this.onLoginFailed('Twitch failed to log you in successfully, please try again', false)
6767
} else {
6868
this.onLoginFailed('Sorry we did something wrong trying to log you in, please try again', false)

0 commit comments

Comments
 (0)