-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Polkaswap layout redesign (#98) * pss-498 header redesign * wip pss-496 * style fixes * add HelpDialog component * reexport package.json * exchange routing fix * add Rewards stub with coming soon text * refactoring SidebarItemContent * refactoring styles * add FAUCET_URL to env.json * fixes after review * fix sidebar item hover css * fix disabled item css * Move bridge functionality (#103) * pss-498 header redesign * wip pss-496 * style fixes * add HelpDialog component * reexport package.json * exchange routing fix * add Rewards stub with coming soon text * refactoring SidebarItemContent * refactoring styles * add FAUCET_URL to env.json * fixes after review * Move bridge functionality Co-authored-by: Nikita-Polyakov <[email protected]> * Update wallet & api * PSS-524: Bridge (#107) * pss-498 header redesign * wip pss-496 * style fixes * add HelpDialog component * reexport package.json * exchange routing fix * add Rewards stub with coming soon text * refactoring SidebarItemContent * refactoring styles * add FAUCET_URL to env.json * fixes after review * Move bridge functionality * Bridge: Updated unauthorized routes. * Updated Generic Page Header, updated Bridge screens. * Fixed token icons. * Bridge: Updated styles. * Updated tooltips. * Removed unused token images. * Refactored due to PR comments. Co-authored-by: Nikita-Polyakov <[email protected]> Co-authored-by: Stefan Popov <[email protected]> * wip initial screen * token row wip * Fix/pss 539 metamsk lock issue (#108) * improve subscribers * add check account is connected * Fix/balance flickering (#109) * wip update balance flow * refactoring views and store modules * remove unused code * fixes after review * add TokensRow component * add rewards amount components * add ordinal translations * rename actions * Update yarn.lock * wip rewards states * fix types * wip rewards parsing * update states * add states flags * remove comments * sync yarn.lock * refactoring bridge to use WalletConnectMixin * css fixes * change account flow * save signature * convert address to hex * notification for no rewards * fetch network fee for claiming rewards * reset rewards for testing * add types to store * notification * disconnect process * add types for components * fixes * improve loading state * improve notification * success state ui update * fetch rewards and network fee parallel * improve error message * unsubscribe ethereum events Co-authored-by: Stefan Popov <[email protected]> Co-authored-by: Alex Natalia <[email protected]>
- Loading branch information
1 parent
efe0595
commit 84b6489
Showing
22 changed files
with
1,119 additions
and
145 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<template> | ||
<div class="amount-header"> | ||
<template v-for="({ amount, symbol }, index) in items"> | ||
<div :key="symbol" class="amount-block"> | ||
<div class="amount-block__amount">{{ amount || '-' }}</div> | ||
<div class="amount-block__symbol">{{ symbol }}</div> | ||
</div> | ||
<div v-if="items.length - 1 !== index" class="amount-header-divider" :key="index"> | ||
<s-divider direction="vertical" class="amount-header-divider__slash" /> | ||
</div> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Vue, Component, Prop } from 'vue-property-decorator' | ||
import { RewardsAmountHeaderItem } from '@/types/rewards' | ||
@Component | ||
export default class AmountHeader extends Vue { | ||
@Prop({ default: () => [], type: Array }) items!: Array<RewardsAmountHeaderItem> | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
$amount-font-size: 20px; | ||
$divider-width: 12px; | ||
$divider-height: 40px; | ||
.amount { | ||
&-header { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
align-items: center; | ||
justify-content: center; | ||
&-divider { | ||
display: flex; | ||
justify-content: center; | ||
margin: 0 $inner-spacing-mini; | ||
width: $divider-width; | ||
&__slash { | ||
width: 1px; | ||
height: $divider-height; | ||
margin: 0; | ||
background: var(--s-color-base-on-accent); | ||
opacity: 0.5; | ||
transform: rotate(15deg) | ||
} | ||
} | ||
} | ||
&-block { | ||
flex: 1; | ||
color: var(--s-color-base-on-accent); | ||
text-align: center; | ||
&:first-child:not(:last-child) { | ||
text-align: right; | ||
} | ||
&:last-child:not(:first-child) { | ||
text-align: left; | ||
} | ||
&__amount { | ||
font-size: $amount-font-size; | ||
font-weight: $s-font-weight-big; | ||
line-height: $s-line-height-medium; | ||
letter-spacing: $s-letter-spacing-big; | ||
} | ||
&__symbol { | ||
font-size: var(--s-font-size-small); | ||
line-height: $s-line-height-base; | ||
} | ||
} | ||
} | ||
</style> |
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,35 @@ | ||
<template> | ||
<div class="amount-table"> | ||
<div v-for="({ title, amount, symbol }, index) in items" :key="index" class="amount-table-item"> | ||
<span>{{ title }}</span> | ||
<div> | ||
<span>{{ amount }}</span> <span>{{ symbol }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Vue, Component, Prop } from 'vue-property-decorator' | ||
import { RewardsAmountTableItem } from '@/types/rewards' | ||
@Component | ||
export default class AmountTable extends Vue { | ||
@Prop({ default: () => [], type: Array }) items!: Array<RewardsAmountTableItem> | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.amount-table { | ||
&-item { | ||
color: var(--s-color-base-on-accent); | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
font-size: var(--s-font-size-mini); | ||
line-height: $s-line-height-base; | ||
padding: $inner-spacing-mini / 2 0; | ||
} | ||
} | ||
</style> |
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,39 @@ | ||
<template> | ||
<div :class="['gradient-box', symbolClass]"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Vue, Prop } from 'vue-property-decorator' | ||
import { KnownSymbols } from '@sora-substrate/util' | ||
@Component | ||
export default class GradientBox extends Vue { | ||
@Prop({ default: '', type: String }) symbol!: KnownSymbols | ||
get symbolClass (): string { | ||
if (!this.symbol) return '' | ||
return `gradient-box--${this.symbol.toLowerCase()}` | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.gradient-box { | ||
padding: $basic-spacing * 2; | ||
border-radius: var(--s-border-radius-medium); | ||
background: linear-gradient(101.79deg, #E81860 8.64%, #F89B29 93.47%); | ||
display: flex; | ||
flex-flow: column nowrap; | ||
&--pswap { | ||
background: linear-gradient(110.38deg, #E81860 13.54%, #6453C1 86.15%); | ||
} | ||
&--val { | ||
background: linear-gradient(110.38deg, #C8AC5F 13.54%, #967E2C 86.15%); | ||
} | ||
} | ||
</style> |
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,54 @@ | ||
<template> | ||
<div class="tokens-row"> | ||
<div class="tokens-row-container"> | ||
<token-logo | ||
v-for="(symbol, index) in symbols" | ||
:key="symbol" | ||
:token-symbol="symbol" | ||
:size="size" | ||
:style="{ zIndex: symbols.length - index }" | ||
class="tokens-row__item" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Vue, Component, Prop } from 'vue-property-decorator' | ||
import { KnownSymbols } from '@sora-substrate/util' | ||
import { lazyComponent } from '@/router' | ||
import { Components, LogoSize } from '@/consts' | ||
@Component({ | ||
components: { | ||
TokenLogo: lazyComponent(Components.TokenLogo) | ||
} | ||
}) | ||
export default class TokensRow extends Vue { | ||
@Prop({ default: () => [], type: Array }) symbols!: Array<KnownSymbols> | ||
@Prop({ default: LogoSize.LARGE, type: String }) readonly size!: LogoSize | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.tokens-row { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
align-items: center; | ||
justify-content: center; | ||
&-container { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
} | ||
&__item { | ||
display: block; | ||
& + & { | ||
margin-left: -$basic-spacing * 2; | ||
} | ||
} | ||
} | ||
</style> |
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,49 @@ | ||
<template> | ||
<s-button class="toggle-text-button" v-bind="$attrs" v-on="$listeners"> | ||
<span class="primary-text">{{ primaryText }}</span> | ||
<span class="secondary-text">{{ secondaryText }}</span> | ||
</s-button> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Vue, Component, Prop } from 'vue-property-decorator' | ||
@Component | ||
export default class ToggleTextButton extends Vue { | ||
@Prop({ default: '', type: String }) primaryText!: string | ||
@Prop({ default: '', type: String }) secondaryText!: string | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.toggle-text-button { | ||
padding: 0; | ||
color: inherit; | ||
font-size: inherit; | ||
line-height: inherit; | ||
span { | ||
font-weight: 400 !important; | ||
} | ||
.secondary-text { | ||
display: none; | ||
} | ||
&:hover { | ||
color: inherit; | ||
.primary-text { | ||
display: none; | ||
} | ||
.secondary-text { | ||
display: inline-block; | ||
} | ||
} | ||
&[type="link"]:hover .secondary-text { | ||
text-decoration: underline; | ||
} | ||
} | ||
</style> |
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.