Dont show dowload buttons if using electron already
This commit is contained in:
parent
f11ca9c27a
commit
6f22e9aa58
@ -32,6 +32,7 @@
|
|||||||
"firebase": "^5.1.0",
|
"firebase": "^5.1.0",
|
||||||
"firebase-tools": "^3.19.0",
|
"firebase-tools": "^3.19.0",
|
||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
|
"ngx-electron": "^1.0.4",
|
||||||
"rxjs": "^6.0.0",
|
"rxjs": "^6.0.0",
|
||||||
"zone.js": "^0.8.26"
|
"zone.js": "^0.8.26"
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@ import {AngularMaterialModule} from './material.module';
|
|||||||
import {HomeComponent} from './home/home.component';
|
import {HomeComponent} from './home/home.component';
|
||||||
import {ServiceWorkerModule} from '@angular/service-worker';
|
import {ServiceWorkerModule} from '@angular/service-worker';
|
||||||
import {FormulaManagerComponent} from './formulaManager/formulaManager.component';
|
import {FormulaManagerComponent} from './formulaManager/formulaManager.component';
|
||||||
|
import {NgxElectronModule} from 'ngx-electron';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent, ConvertFromGPipe, ConvertToGPipe, FormulaManagerComponent, HomeComponent, ScalePipe],
|
declarations: [AppComponent, ConvertFromGPipe, ConvertToGPipe, FormulaManagerComponent, HomeComponent, ScalePipe],
|
||||||
@ -23,6 +24,7 @@ import {FormulaManagerComponent} from './formulaManager/formulaManager.component
|
|||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
NgxElectronModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
RouterModule.forRoot([
|
RouterModule.forRoot([
|
||||||
{path: 'formulaManager', component: FormulaManagerComponent},
|
{path: 'formulaManager', component: FormulaManagerComponent},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="jumbotron mt-3">
|
<div *ngIf="!electron.isElectronApp" class="jumbotron mt-3">
|
||||||
<h1 class="display-4">Standalone</h1>
|
<h1 class="display-4">Standalone</h1>
|
||||||
<p class="lead">Download Formula Manager 2.0</p>
|
<p class="lead">Download Formula Manager 2.0</p>
|
||||||
<hr class="my-4">
|
<hr class="my-4">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import {Component, ElementRef, ViewChildren, HostListener} from '@angular/core';
|
import {Component, ElementRef, ViewChildren, HostListener} from '@angular/core';
|
||||||
import {AngularFirestore} from 'angularfire2/firestore';
|
import {AngularFirestore} from 'angularfire2/firestore';
|
||||||
import {ConvertFromGPipe, ConvertToGPipe} from './units.pipe';
|
import {ConvertFromGPipe, ConvertToGPipe} from './units.pipe';
|
||||||
|
import {ElectronService} from 'ngx-electron';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'formula-manager',
|
selector: 'formula-manager',
|
||||||
@ -23,7 +24,7 @@ export class FormulaManagerComponent {
|
|||||||
this._newTotal = new ConvertToGPipe().transform(total, this.unit);
|
this._newTotal = new ConvertToGPipe().transform(total, this.unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private db: AngularFirestore) {
|
constructor(private db: AngularFirestore, public electron: ElectronService) {
|
||||||
this.db.firestore.enablePersistence();
|
this.db.firestore.enablePersistence();
|
||||||
this.formulas = this.db.collection('formulas').valueChanges();
|
this.formulas = this.db.collection('formulas').valueChanges();
|
||||||
}
|
}
|
||||||
|
@ -5454,6 +5454,10 @@ next-tick@1:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
|
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
|
||||||
|
|
||||||
|
ngx-electron@^1.0.4:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/ngx-electron/-/ngx-electron-1.0.4.tgz#2d80b25d74ae4d6226ad8b3bc4ecfa611e48fdca"
|
||||||
|
|
||||||
nice-try@^1.0.4:
|
nice-try@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
|
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
|
||||||
|
Loading…
Reference in New Issue
Block a user