-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Testnet migration warning banner's text & Add bridge warning (#…
…1244) * update testnetSwitchWarning content * add native gridge high traffic warning box * only displays native bridge high traffic on zkEVM * add bridge high traffic modal * add read more to red warning * fix font color of content in bridge high traffic modal
- Loading branch information
Showing
5 changed files
with
172 additions
and
3 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 |
---|---|---|
|
@@ -256,3 +256,8 @@ | |
border-color: $gray-3; | ||
} | ||
} | ||
|
||
.text-underline { | ||
text-decoration: underline; | ||
cursor: pointer; | ||
} |
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,69 @@ | ||
<template> | ||
<modal-wrapper | ||
:is-modal-open="show" | ||
title="" | ||
:is-closing="isClosingModal" | ||
:close-modal="closeModal" | ||
class-name="highest-z-index" | ||
> | ||
<div class="wrapper--modal-bridge-high-traffic"> | ||
<div class="row--description"> | ||
<span class="text--md"> | ||
{{ $t('bridge.modals.highTraffic.text1') }} | ||
</span> | ||
<span class="text--md"> | ||
{{ $t('bridge.modals.highTraffic.text2') }} | ||
</span> | ||
</div> | ||
<div class="bottoms--modal-bridge-high-traffic"> | ||
<button @click="closeModal">{{ $t('bridge.modals.highTraffic.understood') }}</button> | ||
</div> | ||
</div> | ||
</modal-wrapper> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { truncate, wait } from '@astar-network/astar-sdk-core'; | ||
import { fadeDuration } from '@astar-network/astar-ui'; | ||
import ModalWrapper from 'src/components/common/ModalWrapper.vue'; | ||
import { useBreakpoints } from 'src/hooks'; | ||
import { defineComponent, ref } from 'vue'; | ||
export default defineComponent({ | ||
components: { ModalWrapper }, | ||
props: { | ||
show: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
setIsOpen: { | ||
type: Function, | ||
required: true, | ||
}, | ||
}, | ||
setup(props) { | ||
const isClosingModal = ref<boolean>(false); | ||
const closeModal = async (): Promise<void> => { | ||
isClosingModal.value = true; | ||
await wait(fadeDuration); | ||
props.setIsOpen(false); | ||
isClosingModal.value = false; | ||
}; | ||
const { width, screenSize } = useBreakpoints(); | ||
return { | ||
width, | ||
screenSize, | ||
close, | ||
truncate, | ||
closeModal, | ||
isClosingModal, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@use 'src/components/common/styles/modal-bridge-high-traffic.scss'; | ||
</style> |
59 changes: 59 additions & 0 deletions
59
src/components/common/styles/modal-bridge-high-traffic.scss
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,59 @@ | ||
@import 'src/css/quasar.variables.scss'; | ||
|
||
.wrapper--modal-bridge-high-traffic { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 0 14px; | ||
padding-bottom: 36px; | ||
width: 100%; | ||
@media (min-width: $lg) { | ||
padding: 0; | ||
padding-bottom: 0px; | ||
max-width: 480px; | ||
} | ||
} | ||
|
||
.row--description { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 21px; // the line height of the text | ||
|
||
margin-bottom: 34px; | ||
padding: 0 16px; | ||
|
||
@media (min-width: $sm) { | ||
padding: 0; | ||
} | ||
} | ||
|
||
.bottoms--modal-bridge-high-traffic { | ||
width: 100%; | ||
|
||
& > button { | ||
width: 100%; | ||
padding: 14px 0px; | ||
border-radius: 50px; | ||
background-color: $astar-blue; | ||
color: $white; | ||
font-size: 20px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: normal; | ||
letter-spacing: -0.2px; | ||
} | ||
} | ||
|
||
.text--button { | ||
font-weight: 600; | ||
font-size: 14px; | ||
color: $gray-1; | ||
} | ||
|
||
.body--dark { | ||
.text--tips-title { | ||
color: $gray-1; | ||
} | ||
.container--tips { | ||
border: 1px solid $gray-3; | ||
} | ||
} |
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