Commit 65ed2eb7 authored by dev0tion's avatar dev0tion

Clean up Electron and API file

parent 8c07dfcb
...@@ -36,12 +36,6 @@ function createWindow () { ...@@ -36,12 +36,6 @@ function createWindow () {
mainWindow.webContents.openDevTools(); mainWindow.webContents.openDevTools();
} }
// mainWindow.loadURL(url.format({
// pathname: path.join(__dirname, 'index.html'),
// protocol: 'file:',
// slashes: true
// }));
// Emitted when the window is closed. // Emitted when the window is closed.
mainWindow.on('closed', function () { mainWindow.on('closed', function () {
// Dereference the window object, usually you would store windows // Dereference the window object, usually you would store windows
...@@ -55,7 +49,6 @@ function createWindow () { ...@@ -55,7 +49,6 @@ function createWindow () {
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs. // Some APIs can only be used after this event occurs.
app.on('ready', function () { app.on('ready', function () {
startServer()
createWindow() createWindow()
createTray() createTray()
}) })
...@@ -77,10 +70,6 @@ app.on('activate', function () { ...@@ -77,10 +70,6 @@ app.on('activate', function () {
} }
}) })
function startServer() {
// var startServer = edge.func('./assets/dll/Wallet.WebApi.dll');
}
function createTray() { function createTray() {
//Put the app in system tray //Put the app in system tray
const Menu = electron.Menu const Menu = electron.Menu
......
...@@ -11,12 +11,12 @@ import { Mnemonic } from '../mnemonic'; ...@@ -11,12 +11,12 @@ import { Mnemonic } from '../mnemonic';
export class ApiService { export class ApiService {
constructor(private http: Http) {}; constructor(private http: Http) {};
private webApiUrl = 'http://localhost:5000/'; private webApiUrl = 'http://localhost:5000/api/v1';
private headers = new Headers({'Content-Type': 'application/json'}); private headers = new Headers({'Content-Type': 'application/json'});
isConnected(): Observable<string> { isConnected(): Observable<string> {
return this.http return this.http
.get(this.webApiUrl + 'api/safe/connected') .get(this.webApiUrl + '/safe/connected')
.map(data => data.json()) .map(data => data.json())
} }
...@@ -28,7 +28,7 @@ export class ApiService { ...@@ -28,7 +28,7 @@ export class ApiService {
} }
private handleError(error: any): Promise<any> { private handleError(error: any): Promise<any> {
console.error('An error occurred', error); // for demo purposes only console.error('An error occurred', error);
return Promise.reject(error.message || error); return Promise.reject(error.message || error);
} }
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>BreezeUI</title> <title>Breeze</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>
......
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