-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8549 from kodadot/teleport-warning
teleport warning followup
- Loading branch information
Showing
6 changed files
with
211 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -587,3 +587,6 @@ a.has-text-grey { | |
.has-text-inherit { | ||
color: inherit !important; | ||
} | ||
.cursor-default { | ||
cursor: default; | ||
} |
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,90 @@ | ||
<template> | ||
<NeoModal | ||
:value="isModalActive" | ||
scroll="clip" | ||
:enable-mobile="false" | ||
content-class="mx-4 " | ||
:can-cancel="false"> | ||
<div class="px-6 py-5 width-350"> | ||
<div class="is-flex mb-4 is-align-items-center"> | ||
<NeoIcon | ||
icon="triangle-exclamation" | ||
pack="fasr" | ||
class="mr-3" | ||
size="medium" /> | ||
<span class="has-text-weight-bold">{{ | ||
$t('teleport.fundLossRisk') | ||
}}</span> | ||
</div> | ||
<div | ||
class="is-flex is-flex-direction-column px-4 bakground-warning-red border border-color-k-red"> | ||
<span class="my-3"> | ||
{{ | ||
$t('teleport.insufficientExistentialDeposit', [ | ||
existentialDeposit, | ||
currency, | ||
]) | ||
}} | ||
<b>{{ $t('teleport.lossOfFunds') }}</b> | ||
</span> | ||
<div class="is-flex py-4"> | ||
<NeoCheckbox | ||
v-model="checked" | ||
class="mr-3 is-size-7" | ||
:label="$t('teleport.checkboxLabel')" /> | ||
</div> | ||
</div> | ||
<div | ||
class="is-flex mt-5 is-align-items-center is-justify-content-space-between"> | ||
<NeoButton | ||
variant="pill" | ||
:disabled="!checked" | ||
class="mr-4" | ||
no-shadow | ||
:label="$t('massmint.mobileDisclaimer.continueAnyway')" | ||
@click="emit('continue')" /> | ||
<NeoButton | ||
variant="pill" | ||
:label="$t('autoTeleport.close')" | ||
@click="emit('close')" /> | ||
</div> | ||
</div> | ||
</NeoModal> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { NeoButton, NeoCheckbox, NeoIcon, NeoModal } from '@kodadot1/brick' | ||
const props = defineProps<{ | ||
modelValue: boolean | ||
existentialDeposit: number | ||
currency: Currency | ||
}>() | ||
const isModalActive = useVModel(props, 'modelValue') | ||
const checked = ref(false) | ||
watch(isModalActive, () => { | ||
checked.value = false | ||
}) | ||
const emit = defineEmits(['close', 'continue']) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import '@/assets/styles/abstracts/variables.scss'; | ||
.width-350 { | ||
max-width: 350px; | ||
} | ||
.bakground-warning-red { | ||
@include ktheme() { | ||
background-color: theme('k-redaccent2'); | ||
} | ||
} | ||
.border-color-k-red { | ||
@include ktheme() { | ||
border-color: theme('k-red') !important; | ||
} | ||
} | ||
</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,42 @@ | ||
<template> | ||
<div class="has-text-danger is-flex is-align-items-center cursor-default"> | ||
<NeoIcon | ||
icon="triangle-exclamation" | ||
pack="fasr" | ||
class="mr-3" | ||
size="medium" /> | ||
<span>{{ $t('teleport.fundsAtRisk') }} - </span> | ||
<NeoTooltip | ||
multiline | ||
:multiline-width="256" | ||
:auto-close="['outside', 'inside']"> | ||
<u>{{ $t('teleport.why') }}</u> | ||
<template #content> | ||
<div class="has-text-left py-2 is-flex is-flex-direction-column"> | ||
<span class="mb-3"> | ||
{{ | ||
$t('teleport.existentialDepositTooltip', [ | ||
targetExistentialDepositAmount, | ||
]) | ||
}} | ||
</span> | ||
<a | ||
v-safe-href=" | ||
'https://hello.kodadot.xyz/multi-chain/existential-deposit' | ||
" | ||
target="_blank" | ||
class="has-text-k-blue"> | ||
{{ $t('teleport.whatIsExistentialDeposit') }} | ||
</a> | ||
</div> | ||
</template> | ||
</NeoTooltip> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { NeoIcon, NeoTooltip } from '@kodadot1/brick' | ||
defineProps<{ | ||
targetExistentialDepositAmount: number | ||
}>() | ||
</script> |
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