Merge pull request #18 from wownero/feature_0_3_1

Release 0.3.1
v0.1.3
Hiroji Kiyotake 5 years ago committed by GitHub
commit ed43794a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -72,6 +72,7 @@ function build () {
function pack (config) {
return new Promise((resolve, reject) => {
config.mode = 'production'
webpack(config, (err, stats) => {
if (err) reject(err.stack || err)
else if (stats.hasErrors()) {
@ -99,6 +100,7 @@ function pack (config) {
function web () {
del.sync(['dist/web/*', '!.gitkeep'])
webConfig.mode = 'production'
webpack(webConfig, (err, stats) => {
if (err || stats.hasErrors()) console.log(err)

@ -41,21 +41,21 @@ function logStats (proc, data) {
function startRenderer () {
return new Promise((resolve, reject) => {
rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer)
rendererConfig.mode = 'development'
const compiler = webpack(rendererConfig)
hotMiddleware = webpackHotMiddleware(compiler, {
log: false,
heartbeat: 2500
})
compiler.plugin('compilation', compilation => {
compilation.plugin('html-webpack-plugin-after-emit', (data, cb) => {
compiler.hooks.compilation.tap('compilation', compilation => {
compilation.hooks.htmlWebpackPluginAfterEmit.tapAsync('html-webpack-plugin-after-emit', (data, cb) => {
hotMiddleware.publish({ action: 'reload' })
cb()
})
})
compiler.plugin('done', stats => {
compiler.hooks.done.tap('done', stats => {
logStats('Renderer', stats)
})
@ -80,10 +80,10 @@ function startRenderer () {
function startMain () {
return new Promise((resolve, reject) => {
mainConfig.entry.main = [path.join(__dirname, '../src/main/index.dev.js')].concat(mainConfig.entry.main)
mainConfig.mode = 'development'
const compiler = webpack(mainConfig)
compiler.plugin('watch-run', (compilation, done) => {
compiler.hooks.watchRun.tapAsync('watch-run', (compilation, done) => {
logStats('Main', chalk.white.bold('compiling...'))
hotMiddleware.publish({ action: 'compiling' })
done()
@ -114,7 +114,19 @@ function startMain () {
}
function startElectron () {
electronProcess = spawn(electron, ['--inspect=5858', '.'])
var args = [
'--inspect=5858',
path.join(__dirname, '../dist/electron/main.js')
]
// detect yarn or npm and process commandline args accordingly
if (process.env.npm_execpath.endsWith('yarn.js')) {
args = args.concat(process.argv.slice(3))
} else if (process.env.npm_execpath.endsWith('npm-cli.js')) {
args = args.concat(process.argv.slice(2))
}
electronProcess = spawn(electron, args)
electronProcess.stdout.on('data', data => {
electronLog(data, 'blue')

@ -8,8 +8,9 @@ const webpack = require('webpack')
const BabiliWebpackPlugin = require('babili-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { VueLoaderPlugin } = require('vue-loader')
/**
* List of node_modules to include in webpack bundle
@ -30,12 +31,13 @@ let rendererConfig = {
],
module: {
rules: [
{
test: /\.less$/,
use: ['vue-style-loader', 'css-loader', 'less-loader']
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})
use: ['vue-style-loader', 'css-loader']
},
{
test: /\.html$/,
@ -58,7 +60,8 @@ let rendererConfig = {
extractCSS: process.env.NODE_ENV === 'production',
loaders: {
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1',
scss: 'vue-style-loader!css-loader!sass-loader'
scss: 'vue-style-loader!css-loader!sass-loader',
less: 'vue-style-loader!css-loader!less-loader'
}
}
}
@ -98,7 +101,8 @@ let rendererConfig = {
__filename: process.env.NODE_ENV !== 'production'
},
plugins: [
new ExtractTextPlugin('styles.css'),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({filename: 'styles.css'}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),

@ -7,8 +7,9 @@ const webpack = require('webpack')
const BabiliWebpackPlugin = require('babili-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { VueLoaderPlugin } = require('vue-loader')
let webConfig = {
devtool: '#cheap-module-eval-source-map',
@ -17,12 +18,13 @@ let webConfig = {
},
module: {
rules: [
{
test: /\.less$/,
use: ['vue-style-loader', 'css-loader', 'less-loader']
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})
use: ['vue-style-loader', 'css-loader']
},
{
test: /\.html$/,
@ -42,7 +44,8 @@ let webConfig = {
extractCSS: true,
loaders: {
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1',
scss: 'vue-style-loader!css-loader!sass-loader'
scss: 'vue-style-loader!css-loader!sass-loader',
less: 'vue-style-loader!css-loader!less-loader'
}
}
}
@ -70,7 +73,8 @@ let webConfig = {
]
},
plugins: [
new ExtractTextPlugin('styles.css'),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({filename: 'styles.css'}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),

@ -1,6 +1,7 @@
{
"name": "wowlight",
"version": "0.1.2",
"version": "0.1.3",
"__version": "bumping this should also bump LandingPage.vue (version checker)",
"author": "dsc <xmrdsc@protonmail.com>",
"description": "Wownero Light Wallet",
"license": "WTFPL",
@ -75,53 +76,54 @@
}
},
"dependencies": {
"vue": "^2.3.3",
"axios": "^0.16.2",
"app-root-dir": "1.0.2",
"axios": "^0.18.0",
"jquery": "^3.3.1",
"text-encoding": "0.7.0",
"vue": "^2.5.16",
"vue-electron": "^1.0.6",
"vue-router": "^2.5.3",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"opn": "^5.4.0",
"electron-context-menu": "0.10.0",
"jquery": "^3.3.1",
"app-root-dir": "1.0.2"
"vuex-electron": "^1.0.0",
"bootstrap": "^4.1.1",
"popper.js": "^1.12.9"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"ajv": "^6.5.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.24.1",
"babel-register": "^6.26.0",
"babili-webpack-plugin": "^0.1.2",
"cfonts": "^1.1.3",
"chalk": "^2.1.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.0.5",
"css-loader": "^0.28.4",
"cfonts": "^2.1.2",
"chalk": "^2.4.1",
"copy-webpack-plugin": "^4.5.1",
"cross-env": "^5.1.6",
"css-loader": "^0.28.11",
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^1.7.5",
"electron-builder": "^19.19.1",
"electron-debug": "^1.4.0",
"electron-devtools-installer": "^2.2.0",
"electron-store": "^2.0.0",
"electron-util": "^0.9.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"html-webpack-plugin": "^2.30.1",
"jquery": "^3.3.1",
"electron": "^2.0.4",
"electron-debug": "3.0.0",
"electron-util": "0.11.0",
"electron-devtools-installer": "^2.2.4",
"electron-builder": "^20.19.2",
"mini-css-extract-plugin": "0.4.0",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"style-loader": "^0.18.2",
"text-encoding": "^0.6.4",
"url-loader": "^0.5.9",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"vue-html-loader": "^1.2.4",
"vue-loader": "^13.0.5",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.4.2",
"vuex": "^3.0.1",
"webpack": "^3.5.2",
"webpack-dev-server": ">=3.1.11",
"webpack-hot-middleware": "^2.18.2"
"vue-loader": "^15.2.4",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack-cli": "^3.0.8",
"webpack": "^4.15.1",
"webpack-dev-server": "^3.1.4",
"webpack-hot-middleware": "^2.22.2",
"webpack-merge": "^4.1.3"
}
}

@ -5,8 +5,6 @@
<title>wowlight</title>
<script>
const {ipcRenderer} = require('electron');
// window.$ = window.jQuery = require('./assets/scripts/jquery.min.js');
window.jQuery = window.$ = require('jquery');
</script>
<% if (htmlWebpackPlugin.options.nodeModules) { %>
@ -16,9 +14,14 @@
</script>
<% } %>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.5/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!--<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.5/umd/popper.min.js"></script>-->
<!--<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>-->
<script src="./node_modules/popper.js/dist/umd/popper.js" crossorigin="anonymous"></script>
<script src="./node_modules/bootstrap/dist/js/bootstrap.js" crossorigin="anonymous"></script>
<link rel="stylesheet"
href="./node_modules/bootstrap/dist/css/bootstrap.css"
crossorigin="anonymous">
</head>
<body>

@ -27,8 +27,6 @@ export class Config {
"node": "node.wowne.ro:34568",
"nodes": [
{"address": "node.wowne.ro:34568", "location": "New Jersey, United States", "region": "US"},
{"address": "node.pwned.systems:34568", "location": "Amsterdam, The Netherlands", "region": "EU"},
{"address": "node.wownero.com:34568", "location": "Montreal, Canada", "region": "US"},
{"address": "localhost:34568", 'location': "", "region": "*"}
],
"wallets": []
@ -59,23 +57,4 @@ export class Config {
return true;
}
saveLastWalletPath(path){
console.log(this.data);
if (typeof this.data === 'string' || this.data instanceof String){
this.data = JSON.parse(this.data);
}
if(path === ''){
return;
}
if(!this.data.hasOwnProperty('wallets')){
this.data.wallets = [];
}
const name = path.split('/').pop();
this.data.wallets.push({ name, path });
this.save();
}
}

@ -7,9 +7,6 @@
/* eslint-disable */
// Set environment for development
process.env.NODE_ENV = 'development'
// Install `electron-debug` with `devtron`
require('electron-debug')({ showDevTools: true })

@ -216,7 +216,6 @@ ipcMain.on('rpc_kill_wallet', (event) => {
ipcMain.on('rpc_open_wallet', (event, data) => {
wallet.onWalletOpened = function(data){
cfg.saveLastWalletPath(data.wallet_path);
event.sender.send('rpc_wallet_opened', data);
}

@ -89,6 +89,7 @@ export class WowRpc {
if(this._state === 5){
this._sendCmd('show_transfers');
this._sendCmd('balance');
this._sendCmd('save');
setTimeout(this._checkMemPool.bind(this), this._checkMemPoolTimeout);
}
}
@ -138,6 +139,12 @@ export class WowRpc {
}
}
// detect background mining prompt
let re_background_mining = /Do you want to do it now?/g;
if(data.match(re_background_mining)){
this._sendCmd("No\n");
}
if(this._state === 5 && data.match(/Error: invalid password/)){
this._sendCmd(this._cli_wallet_password);
}
@ -275,22 +282,22 @@ export class WowRpc {
// }
if(data.match(/Background refresh thread started/)){
let re_addy = /Generated new wallet: (W[o|W][a-zA-Z0-9]{95})/
let re_addy = /Generated new wallet: (W[o|W][a-zA-Z0-9]{95})/;
let re_addy_match = this._buffer.match(re_addy);
if(re_addy_match){
this._create_wallet['address'] = re_addy_match[1];
}
let re_view_key = /View key: ([0-9a-fA-F]+)\n/
let re_view_key = /View key: ([0-9a-fA-F]+)\n/;
let re_view_key_match = this._buffer.match(re_view_key);
if(re_view_key_match){
this._create_wallet['view_key'] = re_view_key_match[1];
}
let re_seed = /\*\*\*\*\*\*SEED\n(.*)\n\*\*/
let re_seed_match = this._buffer.match(re_seed);
let re_seed_lol = /(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+ )(\w+)/g;
let re_seed_match = this._buffer.match(re_seed_lol);
if(re_seed_match){
let seed = re_seed_match[1].trim();
let seed = re_seed_match[0].trim();
if(seed.split(' ').length !== 25){
this.onCreateWalletFinished("could not get seed; invalid num words");
}

@ -15,16 +15,10 @@
Create wallet
</button>
<div class="dropdown" style="display: inline-block;">
<button class="btn btn-success btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-folder-open" aria-hidden="true"></i>
<button id="create_wallet_btn" v-on:click="openWallet" type="button" class="btn btn-success btn-sm">
<i class="fa fa-plus" id="create_wallet_icon" aria-hidden="true"></i>
Open wallet
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a v-on:click="openWallet" class="dropdown-item" href="#">Browse</a>
<a v-on:click="openLastWallet" v-for="item in cfg_wallet_names" class="dropdown-item" href="#">{{item}}</a>
</div>
</div>
<button id="" v-on:click="settings" type="button" class="btn btn-success btn-sm">
<!-- fa fa-refresh fa-spin -->
@ -141,8 +135,7 @@
this.$store.commit('addRate', response.data.usd);
});
let appVersion = require('electron').remote.app.getVersion();
axios.get(`https://funding.wownero.com/api/1/wowlight?version=${appVersion}`).then(response => {
axios.get(`https://funding.wownero.com/api/1/wowlight?version=0.1.3`).then(response => {
if(response.data.data === false) {
const {dialog} = require('electron').remote
const dialogOptions = {

@ -17,7 +17,7 @@
<div class="grassfill">
<span class="version">
{{version}} - <span style="font-size:12px;">{{version_embedded}}</span>
0.1.3 - <span style="font-size:12px;">{{version_embedded}}</span>
</span>
<a class="credits" href="#" v-on:click="openCredits">
Credits

@ -10,7 +10,7 @@ const EventBus = new Vue();
export default EventBus;
import { shell } from 'electron'
window.jQuery = window.$ = require('jquery');
/* eslint-disable no-new */
let app = new Vue({

Loading…
Cancel
Save