Commit 00fac826 authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #188 from stratisproject/ui

Get version from package.json
parents d9300cfd 6ad0e552
......@@ -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,26 @@ 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 applicationName = "Breeze Wallet";
let applicationVersion = remote.app.getVersion();
let releaseCycle = "alpha";
let 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