Skip to content

Commit

Permalink
Merge pull request #263 from GetScatter/10.1.0
Browse files Browse the repository at this point in the history
Merging 10.1.0 into master
  • Loading branch information
nsjames authored Jan 15, 2019
2 parents 0b373c0 + a9c12df commit 39d24e9
Show file tree
Hide file tree
Showing 168 changed files with 6,298 additions and 3,644 deletions.
40 changes: 29 additions & 11 deletions electron.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const electron = require('electron');
const {app, BrowserWindow, Tray, Menu, MenuItem} = electron;
const {app, BrowserWindow, Tray, Menu, MenuItem, ipcMain} = electron;
const path = require("path");
const url = require("url");


const isDev = process.mainModule.filename.indexOf('app.asar') === -1;

let icon = isDev
Expand All @@ -20,19 +21,17 @@ let mainUrl = isPopup => isDev ? `http://localhost:8080/${isPopup ? '/#/popout'
hash:isPopup ? '/popout' : null
});

let splashScreen = url.format({
pathname: path.join(__dirname, "dist", "splash.html"),
protocol: "file:",
slashes: true,
});


const quit = () => {
if(global && global.appShared && global.appShared.savingData){
setTimeout(() => {
quit();
}, 100);
} else app.quit();
} else {
if(global && global.appShared && global.appShared.QuitWatcher !== null)
global.appShared.QuitWatcher();
app.quit();
}
}

let tray, mainWindow;
Expand Down Expand Up @@ -96,8 +95,8 @@ const createScatterInstance = () => {
radii: [5,5,5,5],
icon,
resizable: true,
minWidth: 620,
minHeight:580,
minWidth: 800,
minHeight:720,
titleBarStyle:'hiddenInset',
backgroundColor,
show,
Expand Down Expand Up @@ -241,5 +240,24 @@ class NotificationService {
}

const Transport = require('@ledgerhq/hw-transport-node-hid');
global.appShared = { Transport, ApiWatcher:null, LowLevelWindowService, NotificationService, savingData:false };

const NodeMachineId = require('node-machine-id');

global.appShared = { Transport, QuitWatcher:null, ApiWatcher:null, LowLevelWindowService, NotificationService, NodeMachineId, savingData:false };



const ecc = require("eosjs-ecc");
let seed, key;
ipcMain.on('key', (event, arg) => {
if(event.sender.history[0].indexOf('popout') > -1) return;
if(key) return;
key = arg;
});
ipcMain.on('seeding', (event, arg) => seed = arg);
ipcMain.on('seed', (event, arg) => {
const {data, sig} = arg;
if(!isDev && ecc.recover(sig, 'seed') !== key) return event.sender.send('seed', null);
event.sender.send('seed', seed);
});

1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" href="./static/fonts/scatter-icons/css/animation.css">
<link rel="stylesheet" href="./static/fonts/scatter-icons/css/scatter.css">
<link rel="stylesheet" href="./static/fonts/token-icons/style.css">
<link rel="stylesheet" href="./static/fonts/google-fonts/google-fonts.css">
<title>Scatter</title>
</head>
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,18 @@
"babel-core": "^6.26.0",
"bip32-path": "^0.4.2",
"bip39": "^2.5.0",
"chartist": "^0.11.0",
"electron-store": "^2.0.0",
"eos-rc-parser": "^1.0.4",
"eosjs-ecc": "^4.0.4",
"es6-promise": "^4.2.5",
"ethereumjs-abi": "^0.6.5",
"ethereumjs-tx": "^1.3.7",
"ethereumjs-util": "^5.2.0",
"isomorphic-fetch": "^2.2.1",
"json-formatter-js": "^2.2.1",
"murmurhash": "^0.0.2",
"node-machine-id": "^1.1.10",
"node-notifier": "^5.3.0",
"scrypt-async": "^2.0.1",
"socket.io": "^2.1.1",
Expand Down Expand Up @@ -87,7 +91,6 @@
"electron-builder": "^20.29.0",
"electron-rebuild": "^1.8.2",
"eosjs": "^16.0.9",
"eosjs-ecc": "^4.0.4",
"eosjs2": "npm:[email protected]",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
Expand Down
20 changes: 0 additions & 20 deletions src/_variables.scss

This file was deleted.

Binary file added src/assets/scrooge_mcpig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/sounds/ding.mp3
Binary file not shown.
25 changes: 7 additions & 18 deletions src/components/MenuBar.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<section class="menu-bar">
<transition name="slide-up" mode="out-in">
<router-link v-if="loaded && $route.name !== RouteNames.LOGIN" :to="{name:RouteNames.HOME}" class="logo">Scatter</router-link>
</transition>

<section class="actions" v-if="!isMacOS">

Expand Down Expand Up @@ -34,6 +31,7 @@
<script>
import {remote} from '../util/ElectronHelpers';
import SocketService from "../services/SocketService";
export default {
data(){return {
Expand All @@ -46,6 +44,7 @@
},
methods:{
quit(){
SocketService.broadcastEvent('dced', {});
setTimeout(() => remote.app.quit(), 1);
},
minimize(){
Expand All @@ -65,35 +64,25 @@
</script>

<style scoped lang="scss" rel="stylesheet/scss">
@import '../_variables.scss';
@import '../styles/variables';
.menu-bar {
-webkit-app-region: drag;
-webkit-app-region: drag !important;
background:$secondary;
background-image: $blue-grad;
color:#fff;
height:80px;
line-height: 80px;
width:100%;
text-align:center;
z-index: 10;
z-index: 9999999999;
position:absolute;
top:0;
left:0;
right:0;
.logo {
font-family: 'Grand Hotel', sans-serif;
font-size: 45px;
display:inline-block;
height:80px;
line-height: 80px;
padding-top:3px;
cursor: default;
-webkit-app-region: drag;
}
.actions {
-webkit-app-region: drag;
position:absolute;
right:0;
top:0;
Expand All @@ -103,11 +92,11 @@
justify-content: center;
align-items: center;
padding:0 35px;
-webkit-app-region: no-drag;
$action:15px;
.action {
-webkit-app-region: no-drag;
float:right;
padding:10px;
cursor: pointer;
Expand Down
30 changes: 24 additions & 6 deletions src/components/Popups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
<RemoveLocation :popin="popIn" v-if="popIn.data.type === popupTypes.REMOVE_LOCATION" />
<DestroyScatter :popin="popIn" v-if="popIn.data.type === popupTypes.DESTROY_SCATTER" />
<EnableWhitelist :popin="popIn" v-if="popIn.data.type === popupTypes.ENABLE_WHITELIST" />
<AccountSelector :popin="popIn" v-if="popIn.data.type === popupTypes.SELECT_ACCOUNT" />
<ConfirmExchange :popin="popIn" v-if="popIn.data.type === popupTypes.CONFIRM_EXCHANGE" />
<ConfirmTransfer :popin="popIn" v-if="popIn.data.type === popupTypes.CONFIRM_TRANSFER" />
<Exchange :popin="popIn" v-if="popIn.data.type === popupTypes.EXCHANGE" />
<Stabilize :popin="popIn" v-if="popIn.data.type === popupTypes.STABILIZE" />
<History :popin="popIn" v-if="popIn.data.type === popupTypes.HISTORY" />
<DisplayToken :popin="popIn" v-if="popIn.data.type === popupTypes.DISPLAY_TOKEN" />
</section>
<section class="overlay" :class="{'wide':isWide(popIn)}" v-else>
<figure class="bg" @click="clickedFader"></figure>
Expand Down Expand Up @@ -61,7 +68,6 @@
import Snackbar from './popins/overlay/Snackbar.vue'
import TransactionSuccess from './popins/overlay/TransactionSuccess.vue'
import Prompt from './popins/overlay/Prompt.vue'
import PopInHead from './popins/overlay/fragments/PopInHead.vue'
import EosProxyVotes from './popins/fullscreen/EosProxyVotes'
import EosChangePermissions from './popins/fullscreen/EosChangePermissions'
Expand All @@ -77,6 +83,13 @@
import RemoveLocation from "./popins/fullscreen/RemoveLocation";
import DestroyScatter from "./popins/fullscreen/DestroyScatter";
import EnableWhitelist from "./popins/fullscreen/EnableWhitelist";
import AccountSelector from "./popins/fullscreen/AccountSelector";
import ConfirmExchange from "./popins/fullscreen/ConfirmExchange";
import ConfirmTransfer from "./popins/fullscreen/ConfirmTransfer";
import DisplayToken from "./popins/fullscreen/DisplayToken";
import Exchange from "./popins/fullscreen/Exchange";
import Stabilize from "./popins/fullscreen/Stabilize";
import History from "./popins/fullscreen/History";
import RemoveApp from "./popins/overlay/RemoveApp";
import Selector from "./popins/overlay/Selector";
import UpdateAvailable from "./popins/overlay/UpdateAvailable";
Expand All @@ -90,7 +103,6 @@
Snackbar,
TransactionSuccess,
Prompt,
PopInHead,
// FULLSCREEN
DestroyScatter,
Expand All @@ -107,6 +119,13 @@
RemoveKeypair,
CheckHardware,
EnableWhitelist,
AccountSelector,
ConfirmExchange,
ConfirmTransfer,
DisplayToken,
Exchange,
Stabilize,
History,
},
data(){ return {
popupTypes:PopupTypes,
Expand All @@ -129,8 +148,8 @@
isFullscreen,
clickedFader(){
if(this.nextPopIn) {
if(this.nextPopIn.hasOwnProperty('data') && typeof this.nextPopIn.data.callback === 'function') this.nextPopIn.data.callback(null);
this[Actions.RELEASE_POPUP](this.popIns[this.popIns.length - 1]);
if(this.$tours['scatter']) this.$tours['scatter'].previousStep();
}
},
isWide(popIn){
Expand All @@ -145,7 +164,7 @@
</script>

<style scoped lang="scss" rel="stylesheet/scss">
@import "../_variables.scss";
@import "../styles/variables";
.snackbar-holder {
position:fixed;
Expand Down Expand Up @@ -178,7 +197,6 @@
max-width:100%;
margin:0 40px;
position: relative;
border-radius:4px;
overflow:hidden;
}
Expand All @@ -189,7 +207,7 @@
align-items: center;
position:fixed;
top:0;
top:80px;
bottom:0;
left:0;
right:0;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Processes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</script>

<style scoped lang="scss" rel="stylesheet/scss">
@import "../_variables.scss";
@import "../styles/variables";
.processes {
width:160px;
Expand Down
7 changes: 4 additions & 3 deletions src/components/UserBar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section class="user-bar" v-if="scatter.toured">
<section class="user-bar" v-if="keypairs.length">
<section class="actions">
<router-link :to="{name:RouteNames.IDENTITY}" class="action">
{{locale(langKeys.USER_BAR.ManageIdentity)}}
Expand Down Expand Up @@ -34,7 +34,8 @@
'scatter',
]),
...mapGetters([
'identity'
'identity',
'keypairs'
])
},
methods:{
Expand All @@ -44,7 +45,7 @@
</script>

<style scoped lang="scss" rel="stylesheet/scss">
@import '../_variables.scss';
@import '../styles/variables';
.user-bar {
width:100%;
Expand Down
Loading

0 comments on commit 39d24e9

Please sign in to comment.