Hide UpdateAvailableComponent in AppComponent (#355)

Fixes #350
This commit is contained in:
József Farkas
2017-07-15 17:57:22 +02:00
committed by GitHub
parent a0aac1639a
commit c1f96ae820
4 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,4 @@
<app-update-available
[showUpdateAvailable]="showUpdateAvailable$ | async"
<app-update-available *ngIf="showUpdateAvailable$ | async"
(updateApp)="updateApp()"
(doNotUpdateApp)="doNotUpdateApp()">
</app-update-available>

View File

@@ -1,4 +1,4 @@
<div *ngIf="showUpdateAvailable">
<div class="app-update-available-wrapper">
New version available.
<button type="button" (click)="updateApp.emit()" class="btn btn-primary">Update</button>
<button type="button" (click)="doNotUpdateApp.emit()" class="btn btn-default">Close</button>

View File

@@ -1,4 +1,4 @@
:host {
.app-update-available-wrapper {
display: flex;
justify-content: center;
margin: 0.5rem;

View File

@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angular/core';
@Component({
selector: 'app-update-available',
@@ -7,7 +7,6 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from
changeDetection: ChangeDetectionStrategy.OnPush
})
export class UpdateAvailableComponent {
@Input() showUpdateAvailable: boolean = false;
@Output() updateApp = new EventEmitter<null>();
@Output() doNotUpdateApp = new EventEmitter<null>();
}