Skip to content

Commit

Permalink
update candidate list table
Browse files Browse the repository at this point in the history
  • Loading branch information
pqv199x committed Jul 17, 2019
1 parent 7f1dc17 commit f6b9e86
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 41 deletions.
53 changes: 13 additions & 40 deletions app/components/candidates/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@
slot-scope="data">
<div>
<span
:class="`float-left mr-2 ${(data.item.latestSignedBlock)
:class="`float-left mr-2 ${(data.item.status !== 'PROPOSED')
? ` tomo-status-dot tomo-status-dot--${getColor(
data.item.latestSignedBlock || '', currentBlock)}` : '' }`">
{{ data.item.latestSignedBlock || '' }}
{{ data.item.latestSignedBlock }}
</span>
</div>
</template>
Expand Down Expand Up @@ -181,40 +181,13 @@ export default {
return {
chainConfig: {},
fields: [
{
key: 'rank',
label: 'Rank'
},
{
key: 'address',
label: 'Address',
sortable: false
},
{
key: 'name',
label: 'Name',
sortable: false
},
{
key: 'capacity',
label: 'Capacity',
sortable: true
},
{
key: 'latestSignedBlock',
label: 'Latest Signed Block',
sortable: true
},
{
key: 'status',
label: 'Status',
sortable: false
},
{
key: 'action',
label: '',
sortable: false
}
{ key: 'rank', label: 'Rank' },
{ key: 'address', label: 'Address', sortable: false },
{ key: 'name', label: 'Name', sortable: false },
{ key: 'capacity', label: 'Capacity', sortable: true },
{ key: 'latestSignedBlock', label: 'Latest Signed Block', sortable: true },
{ key: 'status', label: 'Status', sortable: false },
{ key: 'action', label: '', sortable: false }
],
sortBy: 'capacity',
sortDesc: true,
Expand Down Expand Up @@ -354,7 +327,7 @@ export default {
isPenalty: candidate.isPenalty,
name: candidate.name || 'Anonymous',
cap: new BigNumber(candidate.capacity).div(10 ** 18).toNumber(),
latestSignedBlock: candidate.latestSignedBlock,
latestSignedBlock: candidate.latestSignedBlock || 0,
rank: candidate.rank
})
})
Expand Down Expand Up @@ -407,7 +380,7 @@ export default {
isPenalty: candidate.isPenalty,
name: candidate.name || 'Anonymous',
cap: new BigNumber(candidate.capacity).div(10 ** 18).toNumber(),
latestSignedBlock: candidate.latestSignedBlock
latestSignedBlock: candidate.latestSignedBlock || 0
})
})
self.candidates = items
Expand Down Expand Up @@ -445,7 +418,7 @@ export default {
isPenalty: candidate.isPenalty,
name: candidate.name || 'Anonymous',
cap: new BigNumber(candidate.capacity).div(10 ** 18).toNumber(),
latestSignedBlock: '' // candidate.latestSignedBlock
latestSignedBlock: '---' // candidate.latestSignedBlock
})
})
self.candidates = items
Expand Down Expand Up @@ -482,7 +455,7 @@ export default {
isPenalty: candidate.isPenalty,
name: candidate.name || 'Anonymous',
cap: new BigNumber(candidate.capacity).div(10 ** 18).toNumber(),
latestSignedBlock: candidate.latestSignedBlock
latestSignedBlock: candidate.latestSignedBlock || 0
})
})
self.candidates = items
Expand Down
4 changes: 3 additions & 1 deletion app/components/candidates/View.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
</router-link>
</p>
</div>
<div class="col-12 col-sm-6 col-md-4 col-lg-3 col-xl-2 tomo-info">
<div
v-if="candidate.status !== 'PROPOSED'"
class="col-12 col-sm-6 col-md-4 col-lg-3 col-xl-2 tomo-info">
<p class="tomo-info__title">
<i class="tm-dot tomo-info__icon" />
<span class="tomo-info__text">Latest Signed Block</span>
Expand Down

0 comments on commit f6b9e86

Please sign in to comment.