Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/0.5.6-alpha'
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbachini committed Sep 22, 2018
2 parents 3f92d9d + ed0fab9 commit 3ff5163
Show file tree
Hide file tree
Showing 25 changed files with 810 additions and 77 deletions.
3 changes: 2 additions & 1 deletion build/mobile/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.jsecoin.alpha" version="0.5.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.jsecoin.alpha" version="0.5.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>JSECoin</name>
<description>
JSECoin Mobile Wallet Designed to manage and transfer JSE Tokens.
Expand Down Expand Up @@ -42,6 +42,7 @@
</plugin>
<plugin name="cordova-plugin-x-socialsharing" spec="^5.4.1" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
<plugin name="cordova-plugin-battery-status" spec="^2.0.2" />
<engine name="browser" spec="^5.0.4" />
<engine name="android" spec="^7.1.1" />
</widget>
5 changes: 5 additions & 0 deletions build/mobile/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"cordova-android-support-gradle-release": "^1.4.4",
"cordova-browser": "^5.0.4",
"cordova-plugin-background-mode": "^0.7.2",
"cordova-plugin-battery-status": "^2.0.2",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-inappbrowser": "^3.0.0",
Expand All @@ -32,7 +33,8 @@
"ANDROID_SUPPORT_VERSION": "27.+"
},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-inappbrowser": {}
"cordova-plugin-inappbrowser": {},
"cordova-plugin-battery-status": {}
},
"platforms": [
"browser",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jse-desktop",
"version": "0.5.5",
"version": "0.5.6",
"author": "JSECOIN",
"description": "JSE Desktop APP",
"license": "(ISC OR GPL-3.0)",
Expand Down
2 changes: 1 addition & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { autoUpdater } from 'electron-updater';
//import { readFileSync } from 'fs';
//import crypto from 'crypto';

const appVersion = '0.5.5';
const appVersion = '0.5.6';

//test
app.disableHardwareAcceleration();
Expand Down
47 changes: 44 additions & 3 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ export default {
*/
created() {
const self = this;
console.log(self.$ma);
//confirm if server needs to change as may be blocked
window.addEventListener('jseServerUpdate', (e) => {
self.$store.commit('updateAppState', {
val: e.detail,
state: 'jseCoinServer',
});
});
//set theme
if (localStorage.getItem('theme') !== null) {
self.$store.commit('updateAppState', {
Expand Down Expand Up @@ -162,6 +170,14 @@ export default {
});
}
//should app auto mine only when plugged in
if (localStorage.getItem('mineWhenpluggedIn') !== null) {
self.$store.commit('updateAppState', {
val: ((String(localStorage.getItem('mineWhenpluggedIn')) === 'true') && (!process.env.ISGOOGLE) && (String(localStorage.getItem('autoMine')) === 'true')),
state: 'mineWhenpluggedIn',
});
}
//should app autologin
if (localStorage.getItem('autoLogin') !== null) {
self.$store.commit('updateAppState', {
Expand Down Expand Up @@ -308,9 +324,20 @@ export default {
self.$router.push('upgradeApp');
return;
}
//update Pending rewards system user obj
if (typeof (window.calculatePendingTotal) === 'function') {
window.calculatePendingTotal();
}
//set update user globals
self.$store.dispatch({
type: 'updateUserState',
txLimit: (window.user.txLimit)?window.user.txLimit:0,
pendingTotal: (window.user.pendingTotal)?window.user.pendingTotal:0,
pendingSelfMining: (window.user.pendingSelfMining)?window.user.pendingSelfMining:0,
pendingPublisherMining: (window.user.pendingPublisherMining)?window.user.pendingPublisherMining:0,
pendingReferrals: (window.user.pendingReferrals)?window.user.pendingReferrals:0,
confirmed: (window.user.confirmed)?window.user.confirmed:false,
balance: (window.user.balance)?window.user.balance:0,
todaysEarnings: (window.user.statsToday)?window.user.statsToday.c:0,
Expand Down Expand Up @@ -363,7 +390,17 @@ export default {
},
onDeviceReady() {
const self = this;
window.addEventListener('batterystatus', (status) => {
if ((String(localStorage.getItem('mineWhenpluggedIn')) === 'true') && (!process.env.ISGOOGLE) && (String(localStorage.getItem('autoMine')) === 'true')) {
self.$store.dispatch({
type: 'startPlatformMining',
});
} else {
self.$store.dispatch({
type: 'stopPlatformMining',
});
}
}, false);
// Handle the device ready event.
document.addEventListener('pause', self.onPause, false);
document.addEventListener('resume', self.onResume, false);
Expand Down Expand Up @@ -415,7 +452,7 @@ export default {
},
onBackKeyDown() {
// Handle the back-button event on Android. By default it will exit the app.
navigator.app.exitApp();
//navigator.app.exitApp();
},
/**
* Close Window
Expand Down Expand Up @@ -658,6 +695,10 @@ body.QRScanner.mobile footer {
border-bottom: none;
}
.hr hr {
display: none;
}
/*iframe*/
#JSEA-iCaptcha {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/Register-Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ export default {
if (self.$store.getters.whichPlatform === 'desktop') {
self.$electron.ipcRenderer.send('login');
}
//mark user as registered enable tracker
self.$store.commit('updateUserStateValue', {
val: true,
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/components/SplashLoadingScreen-Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ export default {
if (self.$store.getters.whichLandingPage !== 'splash') {
self.route = self.$store.getters.whichLandingPage;
}
self.routeDelay(self.route);
setTimeout(() => {
self.routeDelay(self.route);
}, 5000);
}
},
methods: {
Expand Down
Loading

0 comments on commit 3ff5163

Please sign in to comment.