Skip to content

Commit 62ba604

Browse files
committed
feat - visually differentiate between dev and prod
1 parent 99d4cef commit 62ba604

File tree

6 files changed

+220
-15
lines changed

6 files changed

+220
-15
lines changed

frontend/src/app/app.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { map } from 'rxjs/operators';
1919
import { Bookmark } from './core/model/bookmark';
2020
import { Router } from '@angular/router';
2121
import { AddToHistoryService } from './core/user/add-to-history.service';
22+
import { environment } from '../environments/environment';
2223

2324
@Component({
2425
selector: 'app-root',
@@ -41,6 +42,9 @@ export class AppComponent implements OnInit {
4142
private hoveringLastSearches: boolean[] = [];
4243
private hoveringLastVisited: boolean[] = [false, false, false, false, false, false, false, false, false, false];
4344

45+
favIcon: HTMLLinkElement = document.querySelector('#favicon');
46+
readonly environment = environment;
47+
4448
constructor(private keycloakService: KeycloakService,
4549
private userInfoStore: UserInfoStore,
4650
private userDataStore: UserDataStore,
@@ -56,6 +60,9 @@ export class AppComponent implements OnInit {
5660
}
5761

5862
ngOnInit(): void {
63+
if (environment.production === false) {
64+
this.favIcon.href = 'assets/logo/logo-green.svg';
65+
}
5966
const acknowledgedCodeverMigration = this.cookieService.readCookie('acknowledge-codever-migration');
6067
if (acknowledgedCodeverMigration !== 'true') {
6168
this.showAcknowledgeMigrationHeader = true;

frontend/src/app/shared/navigation/navigation.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top shadow">
1+
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top shadow"
2+
[ngClass]="{'navbar-dev' : environment.production === false}" >
23
<div>
34
<a class="navbar-brand" [routerLink]="['']" routerLinkActive="active">
45
<div class="app-brand ml-2" (click)="onLogoClick()">

frontend/src/app/shared/navigation/navigation.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@
4242
}
4343
}
4444

45+
.navbar-dev {
46+
background-color: darkgreen !important;
47+
}
48+
4549

0 commit comments

Comments
 (0)