Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix validator anchor #2383

Merged
merged 6 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PENDING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[Changed] Naming of amount input to "Deposit" on ModalPropose @faboweb
[Fixed] [\#2359](https://github.com/cosmos/lunie/pull/2359) fixed spacing on transactions @faboweb
[Fixed] [\#2359](https://github.com/cosmos/lunie/pull/2359) fixed spacing on transactions @faboweb
[Fixed] [\#2323](https://github.com/cosmos/lunie/issues/2323) fixed and added anchor to validator's website @fedekunze
22 changes: 18 additions & 4 deletions app/src/renderer/components/staking/PageValidator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,18 @@
</dl>
<dl class="info_dl">
<dt>Website</dt>
<dd>
{{ translateEmptyDescription(validator.description.website) }}
<dd v-if="website !== `--`">
<a
id="validator-website"
:href="website"
target="_blank"
rel="nofollow noreferrer noopener"
>
{{ website }}
</a>
</dd>
<dd v-else>
{{ website }}
</dd>
</dl>
<dl class="info_dl">
Expand Down Expand Up @@ -233,7 +243,7 @@ export default {
const totalBlocks = this.lastHeader.height
const missedBlocks = this.validator.signing_info.missed_blocks_counter
const signedBlocks = totalBlocks - missedBlocks
const uptime = signedBlocks / totalBlocks * 100
const uptime = (signedBlocks / totalBlocks) * 100

return String(uptime).substring(0, 4) + `%`
},
Expand Down Expand Up @@ -288,6 +298,11 @@ export default {
// status: active
return `green`
},
// empty descriptions have a strange '[do-not-modify]' value which we don't want to show
website() {
const url = this.validator.description.website
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: we could pass the parameter straight to the function

return this.translateEmptyDescription(url)
},
rewards() {
const { session, bondDenom, distribution, validator } = this
if (!session.signedIn) {
Expand Down Expand Up @@ -387,7 +402,6 @@ export default {
})
return myWallet.concat(redelegationOptions)
},
// empty descriptions have a strange '[do-not-modify]' value which we don't want to show
translateEmptyDescription(value) {
if (!value || value === `[do-not-modify]`) return `--`
return value
Expand Down
8 changes: 4 additions & 4 deletions app/src/renderer/components/wallet/LiCoin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export default {
required: true
}
},
data: () => ({
tooltip: `Sending tokens is currently disabled on the Cosmos Hub.`
}),
computed: {
...mapGetters([`lastHeader`]),
viewCoin() {
Expand All @@ -57,10 +60,7 @@ export default {
denomination() {
return this.viewCoin.denom
}
},
data: () => ({
tooltip: `Sending tokens is currently disabled on the Cosmos Hub.`
})
}
}
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,16 @@ exports[`PageValidator shows a validator profile information errors signing info
</dt>

<dd>
<a
href="www.monty.ca"
id="validator-website"
rel="nofollow noreferrer noopener"
target="_blank"
>

www.monty.ca

www.monty.ca

</a>
</dd>
</dl>

Expand Down Expand Up @@ -549,9 +556,16 @@ exports[`PageValidator shows a validator profile information if user has signed
</dt>

<dd>
<a
href="www.monty.ca"
id="validator-website"
rel="nofollow noreferrer noopener"
target="_blank"
>

www.monty.ca

www.monty.ca

</a>
</dd>
</dl>

Expand Down Expand Up @@ -879,9 +893,16 @@ exports[`PageValidator shows a validator profile information if user hasn't sign
</dt>

<dd>
<a
href="www.monty.ca"
id="validator-website"
rel="nofollow noreferrer noopener"
target="_blank"
>

www.monty.ca

www.monty.ca

</a>
</dd>
</dl>

Expand Down