Commit 25a84858 authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #327 from stratisproject/ui

Various fixes
parents f57f8005 2a53a909
......@@ -4,6 +4,7 @@
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
const nativeImage = require('electron').nativeImage
const path = require('path');
const url = require('url');
......@@ -28,6 +29,12 @@ require('electron-context-menu')({
let mainWindow = null;
function createWindow() {
let applicationIcon
if (serve) {
applicationIcon = nativeImage.createFromPath("./src/assets/images/breeze-logo.png")
} else {
applicationIcon = nativeImage.createFromPath(path.join(__dirname + '/assets/images/breeze-logo.png'))
}
// Create the browser window.
mainWindow = new BrowserWindow({
......@@ -36,10 +43,13 @@ function createWindow() {
frame: true,
minWidth: 1200,
minHeight: 650,
icon: __dirname + "/assets/images/breeze-logo.png",
title: "Breeze Wallet"
});
if (os.platform() === "win32"){
mainWindow.setIcon(applicationIcon);
}
// and load the index.html of the app.
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, '/index.html'),
......@@ -82,7 +92,7 @@ app.on('ready', function () {
}
});
app.on('will-quit', function () {
app.on('before-quit', function () {
closeBitcoinApi(),
closeStratisApi();
});
......@@ -181,36 +191,42 @@ function createTray() {
const Menu = electron.Menu;
const Tray = electron.Tray;
let appIcon = null;
var iconPath
if (os.platform() === 'win32') {
let trayIcon;
if (serve) {
iconPath = '.\\src\\assets\\images\\breeze-logo-tray.ico';
trayIcon = nativeImage.createFromPath('./src/assets/images/breeze-logo-tray.png');
} else {
iconPath = path.join(__dirname + '\\assets\\images\\breeze-logo-tray.png');
trayIcon = nativeImage.createFromPath(path.join(__dirname + '/assets/images/breeze-logo-tray.png'));
}
} else {
if (serve) {
iconPath = './src/assets/images/breeze-logo-tray.png';
} else {
iconPath = path.join(__dirname + '//assets//images//breeze-logo-tray.png');
}
}
let systemTray = new Tray(trayIcon);
const contextMenu = Menu.buildFromTemplate([
{
label: 'Hide/Show',
click: function() {
mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show();
}
},
{
label: 'Exit',
click: function() {
app.quit();
}
}
]);
systemTray.setToolTip('Breeze Wallet');
systemTray.setContextMenu(contextMenu);
systemTray.on('click', function() {
if (!mainWindow.isVisible()) {
mainWindow.show();
}
appIcon = new Tray(iconPath);
const contextMenu = Menu.buildFromTemplate([{
label: 'Hide/Show',
click: function () {
mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show();
if (!mainWindow.isFocused()) {
mainWindow.focus();
}
}]);
appIcon.setToolTip('Breeze Wallet');
appIcon.setContextMenu(contextMenu);
});
app.on('window-all-closed', function () {
if (appIcon) appIcon.destroy();
if (systemTray) systemTray.destroy();
});
};
......
......@@ -14,7 +14,7 @@ const path = argv.path || 'app-builds';
const DEFAULT_OPTS = {
dir: './dist',
name: appName,
name: "Breeze",
asar: shouldUseAsar,
buildVersion: buildVersion
};
......@@ -30,7 +30,7 @@ pack(platform, arch, path, function done(err, appPath) {
});
function pack(plat, arch, path, cb) {
// there is no darwin ia32 electron
if (plat === 'darwin' && arch === 'ia32') return;
......
......@@ -3,8 +3,8 @@
"description": "Graphical User Interface for Breeze Wallet.",
"version": "0.2.0",
"author": {
"name": "Pieterjan Vanhoof",
"email": "pieterjan.vanhoof@stratisplatform.com"
"name": "Stratis Group",
"email": "info@stratisplatform.com"
},
"license": "MIT",
"homepage": "https://github.com/stratisproject/breeze",
......
......@@ -174,7 +174,7 @@ export class CreateComponent implements OnInit {
.subscribe(
response => {
if (response.status >= 200 && response.status < 400){
let walletBody = "Your wallet has been created.<br><br>Please write down your 12 word passphrase: <br>" + this.mnemonic + "<br><br>You can recover your wallet on any computer with:<br>- your passphrase AND<br>- your password AND<br>- the wallet creation time<br><br>Unlike most other wallets if an attacker acquires your passphrase, it will not be able to hack your wallet without knowing your password. On the contrary, unlike other wallets, you will not be able to recover your wallet only with your passphrase if you lose your password.";
let walletBody = "Your wallet has been created.<br><br>Please write down your 12 word passphrase: <br>" + this.mnemonic + "<br><br>You can recover your wallet on any computer with:<br>- your passphrase<br>- your password<br>- In addition, knowing the approximate date at which you created your wallet will speed up recovery.<br><br>Unlike most other wallets if an attacker acquires your passphrase, he will not be able to hack your wallet without knowing your password. On the contrary, unlike other wallets, you will not be able to recover your wallet only with your passphrase if you lose your password.";
this.genericModalService.openModal("Wallet Info", walletBody);
this.router.navigate(['']);
}
......
......@@ -4,12 +4,13 @@
<div class="modal-body">
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52"><circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/></svg>
<p class="lead text-success text-center">
<strong>Your transaction has been sent with success !</strong>
<strong>Your transaction has completed successfully!</strong>
</p>
<small class="text-center d-block">
<!-- <small class="text-center d-block">
<a class="btn btn-link" (click)="toggleDetails()">Show details</a>
</small>
<div *ngIf="showDetails" id="collapseExample">
</small>
<div *ngIf="showDetails" id="collapseExample"> -->
<div>
<div class="card card-block">
<ul class="list-inline row">
<li class="list-inline-item col blockLabel">Type</li>
......
......@@ -40,6 +40,7 @@ export class SendComponent implements OnInit {
this.sendForm = this.fb.group({
"address": ["", Validators.required],
"amount": ["", Validators.compose([Validators.required, Validators.pattern(/^[0-9]+(\.[0-9]{0,8})?$/)])],
//"amount": ["", Validators.compose([Validators.required, Validators.pattern(/^([0-9]+)?(\.[0-9]{0,8})?$/)])],
"fee": ["medium", Validators.required],
"password": ["", Validators.required]
});
......@@ -206,5 +207,6 @@ export class SendComponent implements OnInit {
private openConfirmationModal() {
const modalRef = this.modalService.open(SendConfirmationComponent);
modalRef.componentInstance.transaction = this.transaction;
modalRef.componentInstance.transactionFee = this.estimatedFee;
}
}
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