Refactor little
MODIFY
HiddenWallet/HiddenWallet.GUI/HiddenWallet.GUI.njsproj
HiddenWallet/HiddenWallet.GUI/HiddenWallet.GUI.njsproj
<Content Include="app\html\wallet-content.html" />
<Content Include="app\html\wallet-menu.html" />
<Content Include="app\html\wallet-phase-tabs.html" />
+ <Content Include="build\icon.ico" />
<Content Include="index.html" />
<Content Include="package.json" />
</ItemGroup>
<Folder Include="app\js\" />
<Folder Include="app\html\" />
<Folder Include="app\assets\" />
+ <Folder Include="build\" />
</ItemGroup>
<!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />

MODIFY
HiddenWallet/HiddenWallet.GUI/app/js/default.js
HiddenWallet/HiddenWallet.GUI/app/js/default.js
@@ -10,7 +10,7 @@ document.getElementById("title").innerHTML = document.title;
document.getElementById("close-btn").addEventListener("click", function (e) {
const window = remote.getCurrentWindow();
const BrowserWindow = remote.BrowserWindow;
- var shutDownWindow = new BrowserWindow({ width: 300, height: 60, frame: true, resizable: false, title: "HiddenWallet" });
+ var shutDownWindow = new BrowserWindow({ width: 300, height: 60, frame: true, resizable: false, title: "HiddenWallet", icon: __dirname + '/app/assets/TumbleBit.png' });
shutDownWindow.show();
shutDownWindow.focus();
shutDownWindow.loadURL('file://' + __dirname + '/app/html/shutdown.html');

MODIFY
HiddenWallet/HiddenWallet.GUI/app/js/wallet-phase.js
HiddenWallet/HiddenWallet.GUI/app/js/wallet-phase.js
@@ -206,7 +206,7 @@ function buildTransaction() {
const remote = require('electron').remote;
const window = remote.getCurrentWindow();
const BrowserWindow = remote.BrowserWindow;
- let broadcastWindow = new BrowserWindow({ width: 600, height: 400, frame: false, resizable: false, alwaysOnTop: true, parent: window });
+ let broadcastWindow = new BrowserWindow({ width: 600, height: 400, frame: false, resizable: false, alwaysOnTop: true, parent: window, icon: __dirname + '/app/assets/TumbleBit.png' });
broadcastWindow.show();
broadcastWindow.focus();
broadcastWindow.loadURL('file://' + __dirname + '/app/html/broadcast-transaction-window.html');

MODIFY
HiddenWallet/HiddenWallet.GUI/main.js
HiddenWallet/HiddenWallet.GUI/main.js
@@ -13,7 +13,8 @@ let mainWindow;
function createWindow() {
// Create the browser window.
- mainWindow = new BrowserWindow({ width: 800, height: 600, resizable: false, frame: false, icon: __dirname + '/app/assets/TumbleBit.png' });
+ mainWindow = new BrowserWindow({
+ width: 800, height: 600, resizable: false, frame: false, icon: __dirname + '/app/assets/TumbleBit.png' });
// and load the index.html of the app.
mainWindow.loadURL(url.format({

MODIFY
HiddenWallet/HiddenWallet.GUI/package.json
HiddenWallet/HiddenWallet.GUI/package.json
},
"scripts": {
"start": "electron .",
+ "pack": "build --dir",
"dist": "build"
},
"build": {

Refactor little