Skip to content

Commit b0a9ef7

Browse files
committed
Add links to eos block monitor for the account names in the list of running nodes.
1 parent 694f451 commit b0a9ef7

File tree

7 files changed

+34
-15
lines changed

7 files changed

+34
-15
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vdexnode",
3-
"version": "0.1.9",
3+
"version": "0.1.10",
44
"description": "vDexNode GUI",
55
"productName": "vDexNode",
66
"cordovaId": "org.cordova.vdexnode",
@@ -29,20 +29,20 @@
2929
"test": "echo \"No test specified\" && exit 0"
3030
},
3131
"dependencies": {
32-
"@quasar/extras": "^1.3.1",
32+
"@quasar/extras": "^1.3.2",
3333
"axios": "^0.18.1",
3434
"d3": "^3.5.12",
3535
"electron-log": "^3.0.8",
3636
"electron-updater": "^4.1.2",
3737
"eosjs": "^20.0.0",
3838
"eosjs-ecc": "^4.0.4",
3939
"node-fetch": "^2.6.0",
40-
"quasar": "^1.1.2",
40+
"quasar": "^1.1.4",
4141
"topojson": "^3.0.2",
4242
"vue-i18n": "^8.14.1"
4343
},
4444
"devDependencies": {
45-
"@quasar/app": "^1.1.1",
45+
"@quasar/app": "^1.1.2",
4646
"@quasar/quasar-app-extension-dotenv": "^1.0.0-beta.11",
4747
"@quasar/quasar-app-extension-icon-genie": "^1.0.2",
4848
"@vue/eslint-config-standard": "^4.0.0",

quasar.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module.exports = function (ctx) {
66
// --> boot files are part of "main.js"
77
boot: [
88
'i18n',
9-
'axios'
9+
'axios',
10+
'utils'
1011
],
1112

1213
css: [

src/boot/utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import * as utils from '@/util/utils.js'
2+
3+
export default ({ Vue }) => {
4+
Vue.prototype.$utils = utils
5+
}

src/css/app.styl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,12 @@
4242
}
4343
.text-vblack {
4444
color: #000 !important;
45+
}
46+
47+
.link {
48+
49+
}
50+
.link:hover {
51+
color: #A000FD !important;
52+
cursor:pointer;
4553
}

src/pages/Index.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
<q-item v-for="node in nodes" :key="node.id">
151151
<q-item-section>
152152
<q-item-label class="code"> {{ node.key }}</q-item-label>
153-
<q-item-label class="code text-vgreen" caption> {{ node.account }} </q-item-label>
153+
<q-item-label @click="$utils.openExternal(node.account)" class="code text-vgreen link" caption> {{ node.account }} </q-item-label>
154154
</q-item-section>
155155
<q-item-section side center>
156156
<q-item-label class="code text-vgreen" caption> {{ node.balance }}</q-item-label>
@@ -377,7 +377,6 @@
377377
<script>
378378
import GeoWidget from '../components/GeoWidget.vue'
379379
import EosWrapper from '@/util/EosWrapper'
380-
import * as utils from '@/util/utils.js'
381380
const { app, dialog } = require('electron').remote
382381
const fs = require('fs')
383382
@@ -810,11 +809,10 @@ export default {
810809
this.nodes.push({ id: key, key: result.data[key].trim(), account: '', vote: true })
811810
}
812811
}
813-
this.nodes = utils.getUnique(this.nodes, 'key')
814-
this.nodes = utils.sortByKey(this.nodes, 'key')
812+
this.nodes = this.$utils.getUnique(this.nodes, 'key')
813+
this.nodes = this.$utils.sortByKey(this.nodes, 'key')
815814
resolve()
816815
}).catch((error) => {
817-
console.log(error)
818816
this.errorDialog = true
819817
this.errorMessage = error
820818
})

src/util/utils.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { shell } from 'electron'
2+
13
/**
24
* Function returns an array with removed duplicates by any field in the object
35
* @param {Array} arr - Array of objects to work with.
@@ -34,7 +36,12 @@ function sortByKey (array, key) {
3436
})
3537
}
3638

39+
function openExternal (accountName) {
40+
shell.openExternal('https://bloks.io/account/' + accountName)
41+
}
42+
3743
export {
3844
getUnique,
39-
sortByKey
45+
sortByKey,
46+
openExternal
4047
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,10 +1266,10 @@
12661266
babel-plugin-module-resolver "^3.2.0"
12671267
babel-plugin-transform-imports "^1.0.0"
12681268

1269-
"@quasar/extras@^1.3.1":
1270-
version "1.3.1"
1271-
resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.3.1.tgz#218a1a14967ea18b6e1cb6c4c19e434c15a0ac9f"
1272-
integrity sha512-kcbH+wJ0kLc9lKsVvmSiHOcPRRtUNq8yolLWzqN25LaGELANKwE9gfOLaoNsZ3vTLYCpQKewpZHwbdQdyvOoSQ==
1269+
"@quasar/extras@^1.3.2":
1270+
version "1.3.2"
1271+
resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.3.2.tgz#d50f34fec235b79d4e570dc7f8b36209b0a9ada1"
1272+
integrity sha512-EGBvl4By7Cv/WFGD4dc2FX+iLA+GX7YOnDj8AH92Df4pSMDKxP3TdvpXRnKs3V6bfHKyafc3VklVdf30hT5EoA==
12731273

12741274
"@quasar/fastclick@1.1.3":
12751275
version "1.1.3"

0 commit comments

Comments
 (0)