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

hotfix: merge the hotfix to main branch #1146

Merged
merged 1 commit into from
Jan 22, 2024
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
47 changes: 42 additions & 5 deletions src/components/header/ClaimWarningBanner.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
<template>
<div class="banner" :class="`banner--${network}`">
{{ network !== 2 ? $t('warning.claimRewards') : $t('warning.underDevelopmentShibuyaWarning') }}
<div>
<a
v-if="network !== endpointKey.SHIBUYA"
href="https://docs.astar.network/docs/learn/dapp-staking/dapp-staking-faq/#q-i-am-a-leger-astar-native-app-user-what-do-i-need-to-do"
target="_blank"
rel="noopener noreferrer"
class="banner"
:class="`banner--${network}`"
>
<span>
<span class="text--ledger-users">{{ $t('warning.ledgerUsers') }}</span>
{{ $t('warning.ledgerUsersImportantInformation') }}
</span>
<astar-icon-arrow-right />
</a>
<div v-else class="banner" :class="`banner--${network}`">
{{ $t('warning.underDevelopmentShibuyaWarning') }}
</div>
</div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { endpointKey } from 'src/config/chainEndpoints';

export default defineComponent({
props: {
Expand All @@ -15,7 +32,7 @@ export default defineComponent({
},
},
setup() {
return {};
return { endpointKey };
},
});
</script>
Expand All @@ -26,13 +43,15 @@ export default defineComponent({
.banner {
color: $gray-2;
font-weight: 600;
padding: 4px 16px 8px 16px;
line-height: 1.25;
padding: 4px 8px 8px 8px;
font-size: 12px;
position: relative;
z-index: 1;
display: flex;
align-items: center;
@media (min-width: $sm) {
font-size: 14px;
padding: 4px 16px 8px 16px;
}

// shibuya, zKatana, local
Expand All @@ -53,4 +72,22 @@ export default defineComponent({
background: linear-gradient(90deg, #703ac2 25%, #226dff 100%);
}
}

a.banner {
transition: all 0.2s ease;
&:hover {
filter: brightness(1.1);
}
}

.text--ledger-users {
font-weight: 800;
padding: 3px 9px;
border-radius: 4px;
border: 1px solid $gray-2;
margin-right: 4px;
@media (min-width: $sm) {
margin-right: 8px;
}
}
</style>
3 changes: 3 additions & 0 deletions src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export default {
'DApp Staking V3 is coming early 2024! Make sure to claim your rewards and stay tuned for the release date.',
underDevelopmentShibuyaWarning:
'dApp Staking V3 is in beta. We are adding fixes and improves everyday to get ready for the launch.',
ledgerUsers: 'Ledger Users',
ledgerUsersImportantInformation:
'Important information regarding the upcoming transition to dApp Staking V3. Check out the details',
},
toast: {
transactionFailed: 'Transaction failed with error: {message}',
Expand Down
Loading