Dont show dowload buttons if using electron already

This commit is contained in:
2018-07-10 18:34:35 -04:00
parent f11ca9c27a
commit 6f22e9aa58
5 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="jumbotron mt-3">
<div *ngIf="!electron.isElectronApp" class="jumbotron mt-3">
<h1 class="display-4">Standalone</h1>
<p class="lead">Download Formula Manager 2.0</p>
<hr class="my-4">

View File

@ -1,6 +1,7 @@
import {Component, ElementRef, ViewChildren, HostListener} from '@angular/core';
import {AngularFirestore} from 'angularfire2/firestore';
import {ConvertFromGPipe, ConvertToGPipe} from './units.pipe';
import {ElectronService} from 'ngx-electron';
@Component({
selector: 'formula-manager',
@ -23,7 +24,7 @@ export class FormulaManagerComponent {
this._newTotal = new ConvertToGPipe().transform(total, this.unit);
}
constructor(private db: AngularFirestore) {
constructor(private db: AngularFirestore, public electron: ElectronService) {
this.db.firestore.enablePersistence();
this.formulas = this.db.collection('formulas').valueChanges();
}