Skip to content

Commit

Permalink
Merge pull request #253 from liuqiang1357/master
Browse files Browse the repository at this point in the history
update version
  • Loading branch information
liuqiang1357 authored Sep 7, 2020
2 parents 4842059 + 7d07e1a commit 9ad9b09
Show file tree
Hide file tree
Showing 7 changed files with 313 additions and 273 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "owallet",
"homepage": "http://ont.io",
"version": "v0.9.25",
"version": "v0.9.26",
"author": "Ontology Foundation Ltd. <[email protected]>",
"description": "OWallet is a comprehensive Ontology desktop wallet",
"license": "Apache-2.0",
Expand Down Expand Up @@ -34,7 +34,7 @@
"nedb": "^1.8.0",
"node-hid": "^1.3.0",
"numeral": "^2.0.6",
"ontology-ts-sdk": "^1.1.9",
"ontology-ts-sdk": "^1.1.14-alpha.3",
"opn": "^5.4.0",
"popper.js": "^1.14.3",
"usb": "^1.6.3",
Expand Down
8 changes: 5 additions & 3 deletions src/components/Node/NodeAuthorize/NodeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<a-icon type="info-circle-o" class="proportion-info-icon" @click="showProportionTip"/>
</p>
</div>
<span slot="nodeProportion" slot-scope="text, record">{{record.nodeProportion}} / {{record.userProportion}}</span>
<a slot="name" slot-scope="text, record" class="node-name" :class="record.status ===2 ? 'node-consensus' : 'node-candidate' "
@click="handleNodeDetail(record)">

Expand Down Expand Up @@ -129,10 +130,10 @@ export default {
scopedSlots: {customRender: 'name'}
},
{
// title: this.$t('nodeMgmt.nodeProportion'),
dataIndex: 'nodeProportion',
key: 'nodeProportion',
slots: {title: 'nodeProportionTitle'}
slots: {title: 'nodeProportionTitle'},
scopedSlots: {customRender: 'nodeProportion'}
},
{
title: this.$t('nodeMgmt.currentStake'),
Expand Down Expand Up @@ -228,7 +229,8 @@ export default {
content: h('div',{}, [
h('p', {
style: {
margin:0
margin:0,
whiteSpace: 'pre-line'
}
},content),
h('a', {
Expand Down
59 changes: 42 additions & 17 deletions src/components/Node/NodeManagement/NodeStakeAuthorization.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,18 @@
}
.node-reward-proportion {
margin-top:10px;
margin-right: 10px;
float:left;
}
.node-reward-proportion p {
margin:0;
}
.edit-proportion-btn {
margin-top: 10px;
margin-left: 20px;
}
.h-spacer {
display: inline-block;
width: 10px;
}
</style>
<template>
Expand Down Expand Up @@ -159,7 +163,7 @@
</div>
<div class="content-row">
<div class="content-column">
<span>{{$t('nodeMgmt.userStake')}}</span>
<span>{{$t('nodeMgmt.userStakeAmount')}}</span>
<span>{{current_peer.totalPosStr}} ONT</span>
</div>
</div>
Expand All @@ -172,10 +176,17 @@
<div class="clearfix">
<div class="font-medium-black rewardProportionTip">{{$t('nodeMgmt.rewardProportion')}}</div>
<div class="node-reward-proportion">
<p class="font-medium">{{$t('nodeMgmt.nodeRewardProportion')}}</p>
<p class="font-medium">{{peer_attrs.tPeerCost}}% ({{$t('nodeMgmt.activeT')}})</p>
<p class="font-medium">{{peer_attrs.t1PeerCost}}% ({{$t('nodeMgmt.activeT1')}})</p>
<p class="font-medium">{{peer_attrs.t2PeerCost}}% ({{$t('nodeMgmt.activeT2')}})</p>
</div>
<div class="node-reward-proportion">
<p class="font-medium">{{$t('nodeMgmt.userRewardProportion')}}</p>
<p class="font-medium">{{peer_attrs.tStakeCost}}% ({{$t('nodeMgmt.activeT')}})</p>
<p class="font-medium">{{peer_attrs.t1StakeCost}}% ({{$t('nodeMgmt.activeT1')}})</p>
<p class="font-medium">{{peer_attrs.t2StakeCost}}% ({{$t('nodeMgmt.activeT2')}})</p>
</div>
<a-button type="primary" class="btn-next edit-proportion-btn" @click="editProportion">{{$t('nodeMgmt.edit')}}</a-button>
</div>

Expand Down Expand Up @@ -205,22 +216,34 @@
@ok="confirmChangeCost"
@cancel="handleCancelChangeCost"
>
<div class="clearfix" style="margin-top:10px;">
<span class="rewardProportionTip font-medium">{{$t('nodeMgmt.changeRewardProportion')}}</span>
<!-- <a-slider :min="0" :max="100" v-model="peerCost" :step="1" class="reward-slider"/> -->
<a-input-number
:min="0"
:max="100"
class="reward-input"
v-model="peerCost"
style="width:60px;"
/> %
<div class="clearfix">
{{$t('nodeMgmt.nodeRewardProportion')}}:
<a-input-number
:min="0"
:max="100"
class="reward-input"
v-model="peerCost"
style="width:60px;"
/> %
<span class="h-spacer" />
{{$t('nodeMgmt.userRewardProportion')}}:
<a-input-number
:min="0"
:max="100"
class="reward-input"
v-model="stakeCost"
style="width:60px;"
/> %
</div>
<div style="margin-top:5px;">
<a-icon type="exclamation-circle-o" />
<span>{{$t('nodeMgmt.nodeRewardProportionTip')}}</span>
</div>
<div>
<div style="margin-top:5px;">
<a-icon type="exclamation-circle-o" />
<span>{{$t('nodeMgmt.rewardsProportionTip')}}</span>
<span>{{$t('nodeMgmt.userRewardProportionTip')}}</span>
</div>
<div style="margin-bottom:5px;">
<div style="margin-top:5px;">
<a-icon type="exclamation-circle-o" />
<span>{{$t('nodeMgmt.changesTakeEffect')}}</span>
</div>
Expand All @@ -242,7 +265,8 @@ export default {
},
data(){
return {
peerCost:0,
peerCost: 0,
stakeCost: 0,
validUnit:true,
unit:0,
intervalId:0,
Expand Down Expand Up @@ -311,10 +335,11 @@ export default {
}
},
confirmChangeCost() {
const tx = GovernanceTxBuilder.makeSetPeerCostTx(
const tx = GovernanceTxBuilder.makeSetFeePercentageTx(
this.stakeDetail.publickey,
new Crypto.Address(this.stakeWallet.address),
parseInt(this.peerCost),
parseInt(this.stakeCost),
new Crypto.Address(this.stakeWallet.address),
GAS_PRICE,
GAS_LIMIT
Expand Down
Loading

0 comments on commit 9ad9b09

Please sign in to comment.