Add a developmental login button

This commit is contained in:
2025-07-30 17:34:32 -07:00
parent 7f3dbcaac6
commit efb5193b21
3 changed files with 15 additions and 2 deletions
+1
View File
@@ -22,6 +22,7 @@
}, },
"args": [ "args": [
"build", "build",
"--configuration=development",
"--base-href=http://localhost:5000" "--base-href=http://localhost:5000"
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
+8 -2
View File
@@ -3,17 +3,23 @@
<a #homeLink class="nav-button" routerLink="">HOME</a> <a #homeLink class="nav-button" routerLink="">HOME</a>
<a #jobsLink class="nav-button" routerLink="/jobs">JOB BOARD</a> <a #jobsLink class="nav-button" routerLink="/jobs">JOB BOARD</a>
<a #resumesLink class="nav-button" routerLink="/resumes">RESUMES</a> <a #resumesLink class="nav-button" routerLink="/resumes">RESUMES</a>
<a #resumesLink class="nav-button" routerLink="/companys">COMPANIES</a>
</div> </div>
<a class="top-bar-logo" routerLink=""> <a class="top-bar-logo" routerLink="">
<img class="top-bar-logo" style="margin: 0;" src="img/logo-full.png" /> <img class="top-bar-logo" style="margin: 0;" src="img/logo-full.png" />
</a> </a>
<div *ngIf="auth.isLoggedIn" class="top-bar-buttons flex-right"> <div *ngIf="auth.isLoggedIn" class="top-bar-buttons flex-right">
<a class="nav-button nav-button-login" routerLink="/account/settings"><span>{{ auth.loggedInUser.userName.toUpperCase() }}</span></a> <a class="nav-button nav-button-login" href="https://auth.mistox.com/"><span>{{ auth.loggedInUser.userName.toUpperCase() }}</span></a>
<a class="nav-button nav-button-login" href="/api/account/logout"><span>LOGOUT</span></a> <a class="nav-button nav-button-login" href="/api/account/logout"><span>LOGOUT</span></a>
</div> </div>
<div *ngIf="!auth.isLoggedIn" class="top-bar-buttons flex-right"> <div *ngIf="!auth.isLoggedIn" class="top-bar-buttons flex-right">
<!-- Testing Login -->
<a *ngIf="devMode" class="nav-button nav-button-login" href="https://auth.mistox.com/account/login?returnURL=http://localhost:5000/"><span>Testing Login</span></a>
<!-- Testing Login -->
<a class="nav-button nav-button-login" href="https://auth.mistox.com/account/login?returnURL=https://boredcareers.com/"><span>LOGIN</span></a> <a class="nav-button nav-button-login" href="https://auth.mistox.com/account/login?returnURL=https://boredcareers.com/"><span>LOGIN</span></a>
<a class="nav-button nav-button-login" routerLink="/account/register"><span>REGISTER</span></a> <a class="nav-button nav-button-login" href="https://auth.mistox.com/account/register?returnURL=https://boredcareers.com/"><span>REGISTER</span></a>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
+6
View File
@@ -3,6 +3,7 @@ import { Router, RouterModule, RouterOutlet, ActivatedRoute } from '@angular/rou
import { Authentication } from './services/Authentication'; import { Authentication } from './services/Authentication';
import { CommonModule, Location } from '@angular/common'; import { CommonModule, Location } from '@angular/common';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { isDevMode } from '@angular/core';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@@ -16,7 +17,12 @@ export class App {
@ViewChild('jobsLink') jobLink!: ElementRef<HTMLAnchorElement>; @ViewChild('jobsLink') jobLink!: ElementRef<HTMLAnchorElement>;
@ViewChild('resumesLink') resumeLink!: ElementRef<HTMLAnchorElement>; @ViewChild('resumesLink') resumeLink!: ElementRef<HTMLAnchorElement>;
devMode: boolean = false;
constructor( private http: HttpClient, public auth: Authentication, private router: Router, private route: ActivatedRoute, private location: Location){ constructor( private http: HttpClient, public auth: Authentication, private router: Router, private route: ActivatedRoute, private location: Location){
this.devMode = isDevMode();
this.route.queryParams.subscribe(params => { this.route.queryParams.subscribe(params => {
const loginToken = params['LoginToken']; const loginToken = params['LoginToken'];