mirror of
https://github.com/sartography/cr-connect-bpmn.git
synced 2025-02-25 22:55:32 +00:00
Checks whether user is logged in
This commit is contained in:
parent
68b3f6b9c9
commit
2b9e99a3db
@ -1,5 +1,5 @@
|
|||||||
<div class="mat-typography">
|
<div class="mat-typography">
|
||||||
<app-navbar *ngIf="isSignedIn()" class="mat-elevation-z6" id="globalHeader"></app-navbar>
|
<app-navbar *ngIf="isSignedIn" class="mat-elevation-z6" id="globalHeader"></app-navbar>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
<app-footer></app-footer>
|
<app-footer></app-footer>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
import {HttpClient} from '@angular/common/http';
|
||||||
|
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import {RouterTestingModule} from '@angular/router/testing';
|
import {RouterTestingModule} from '@angular/router/testing';
|
||||||
import {MockEnvironment} from 'sartography-workflow-lib';
|
import {ApiService, MockEnvironment} from 'sartography-workflow-lib';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
|
|
||||||
|
|
||||||
@ -32,10 +34,13 @@ describe('AppComponent', () => {
|
|||||||
MockFooterComponent
|
MockFooterComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
|
HttpClientTestingModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
RouterTestingModule,
|
RouterTestingModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
HttpClient,
|
||||||
|
ApiService,
|
||||||
{provide: 'APP_ENVIRONMENT', useClass: MockEnvironment},
|
{provide: 'APP_ENVIRONMENT', useClass: MockEnvironment},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {isSignedIn} from 'sartography-workflow-lib';
|
import {ApiService} from 'sartography-workflow-lib';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -8,5 +8,11 @@ import {isSignedIn} from 'sartography-workflow-lib';
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'CR Connect Configuration';
|
title = 'CR Connect Configuration';
|
||||||
isSignedIn = isSignedIn;
|
|
||||||
|
constructor(private apiService: ApiService) {
|
||||||
|
}
|
||||||
|
|
||||||
|
get isSignedIn() {
|
||||||
|
return this.apiService.isSignedIn();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user