Commit 00395574 authored by dev0tion's avatar dev0tion

Get version from package.json

parent 31f67d7f
......@@ -36,7 +36,8 @@ function createWindow() {
frame: true,
minWidth: 1200,
minHeight: 700,
icon: __dirname + "/assets/images/breeze-logo.png"
icon: __dirname + "/assets/images/breeze-logo.png",
title: "Breeze Wallet"
});
// and load the index.html of the app.
......
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Title } from '@angular/platform-browser';
import { ApiService } from './shared/services/api.service';
import { remote } from 'electron';
import 'rxjs/add/operator/retryWhen';
import 'rxjs/add/operator/delay';
......@@ -13,17 +16,27 @@ import 'rxjs/add/operator/delay';
})
export class AppComponent implements OnInit {
constructor(private router: Router, private apiService: ApiService) {}
constructor(private router: Router, private apiService: ApiService, private titleService: Title) {}
private errorMessage: any;
private responseMessage: any;
private loading: boolean = true;
ngOnInit() {
this.setTitle();
this.apiService.getWalletFiles().retryWhen(errors => errors.delay(2000)).subscribe(() => this.startApp());
}
startApp() {
private startApp() {
this.loading = false;
this.router.navigate(['/login']);
}
private setTitle() {
let newTitle;
let applicationName = "Breeze Wallet";
let applicationVersion = remote.app.getVersion();
let releaseCycle = "alpha";
newTitle = applicationName + " v" + applicationVersion + " " + releaseCycle;
this.titleService.setTitle(newTitle);
}
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserModule, Title } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { HttpModule } from '@angular/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
......@@ -51,7 +51,7 @@ import { LogoutConfirmationComponent } from './wallet/logout-confirmation/logout
TransactionDetailsComponent,
LogoutConfirmationComponent
],
providers: [ ApiService, GlobalService ],
providers: [ ApiService, GlobalService, Title ],
bootstrap: [ AppComponent ]
})
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>Breeze Wallet v0.1.0 alpha</title>
<title>Breeze Wallet</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment