-
Notifications
You must be signed in to change notification settings - Fork 98
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
Billy/1053 balance header #1188
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7d81e36
pause
okwme 64a11ef
tests and new ui version
okwme 87fb0fe
new ui
okwme fc11c06
wont install
okwme 9fec1bd
changelog
okwme 7265164
update tests w new logic
okwme 02f0294
icon swaps
okwme dd7f648
Merge branch 'develop' into billy/1053-balance-header
okwme c3ce67d
add back advanced
okwme b8a8d54
Merge branch 'billy/1053-balance-header' of github.com:cosmos/voyager…
okwme 8646526
fix e2e
okwme 83b7536
fix e2e
okwme 741fc90
fix unit
okwme 98bb137
devMode
okwme db4847d
Merge branch 'develop' into billy/1053-balance-header
okwme 9673c2f
Update TmBalance.vue
okwme 106bb16
Update PageBond.vue
okwme bfa31b7
snapshots
okwme a8c521f
feedback
okwme 486b8b8
Merge branch 'develop' into billy/1053-balance-header
okwme 923e5e3
Update package.json
okwme 389b608
updated tendermint/ui
600775e
Merge remote-tracking branch 'origin/develop' into billy/1053-balance…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<template lang="pug"> | ||
.header-balance | ||
.top | ||
img.icon(src="~assets/images/cosmos-logo.png") | ||
.total-atoms | ||
.h3 Total {{bondingDenom}} | ||
.h2 {{totalAtoms || "---"}} | ||
.unstaked-atoms(v-if="unstakedAtoms") | ||
.h3 Unstaked {{bondingDenom}} | ||
.h2 {{unstakedAtoms}} | ||
.total-earnings(v-if="totalEarnings") | ||
.h3 Total Earnings | ||
.h2 {{totalEarnings}} | ||
.total-rewards(v-if="totalRewards") | ||
.h3 Total Rewards | ||
.group | ||
.h2 {{totalRewards}} | ||
router-link(to="claim") Claim | ||
.bottom | ||
.address(@click="copy") {{address}} | ||
.success(:class="{showSuccess:showSuccess}") | ||
i.material-icons check | ||
span Copied | ||
</template> | ||
<script> | ||
import { clipboard } from "electron" | ||
import { mapGetters } from "vuex" | ||
export default { | ||
name: "tm-balance", | ||
data() { | ||
return { | ||
showSuccess: false | ||
} | ||
}, | ||
props: ["unstakedAtoms", "totalEarnings", "totalRewards"], | ||
computed: { | ||
...mapGetters(["bondingDenom", "user", "totalAtoms"]), | ||
address() { | ||
return this.user.address | ||
} | ||
}, | ||
methods: { | ||
copy() { | ||
clipboard.writeText(this.user.address) | ||
this.showSuccess = true | ||
setTimeout(() => { | ||
this.showSuccess = false | ||
}, 3000) | ||
} | ||
} | ||
} | ||
</script> | ||
<style lang="stylus" scoped> | ||
@import '~variables'; | ||
|
||
.header-balance | ||
display flex | ||
flex-grow: 1 | ||
flex-direction: column | ||
align-items baseline | ||
padding-top 1rem | ||
.top | ||
display flex | ||
flex-direction: row | ||
> * | ||
padding-right 1em | ||
padding-left 1em | ||
display flex | ||
flex-direction column | ||
border-right: var(--bc) 1px solid | ||
> div:last-of-type { | ||
border-right none | ||
} | ||
.h3 | ||
font-size:14px; | ||
color var(--txt) | ||
.h2 | ||
font-size: h1 | ||
color var(--bright) | ||
.icon | ||
width 29px * 2 | ||
height 29px * 2 | ||
padding 0 | ||
border-right: none; | ||
.total-rewards .group | ||
display flex | ||
align-items baseline | ||
flex-direction: row | ||
a | ||
padding-left 10px | ||
.bottom | ||
display flex | ||
align-items: flex-start; | ||
padding-top:20px | ||
padding-bottom:20px | ||
.address | ||
font-size sm | ||
padding-left: 29px * 2 + 10px | ||
color var(--dim) | ||
cursor pointer | ||
&:hover | ||
color var(--link) | ||
.success | ||
font-size sm | ||
display flex | ||
align-items: flex-end; | ||
opacity 0 | ||
transition opacity 500ms ease | ||
padding-left 10px | ||
&.showSuccess | ||
opacity 1 | ||
i | ||
font-size m | ||
padding-right 0 | ||
padding-bottom 2px | ||
color var(--success) | ||
|
||
</style> |
4 changes: 3 additions & 1 deletion
4
.../renderer/components/common/TmToolBar.vue → .../renderer/components/common/VmToolBar.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be it's own component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it used anywhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet. OK, we can extract it later.