Skip to content

Commit

Permalink
fix: teleport warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarsen136 committed Feb 19, 2025
1 parent ff34a80 commit 7926237
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 36 deletions.
24 changes: 4 additions & 20 deletions components/teleport/EDWarningModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,10 @@
<b>{{ $t('teleport.lossOfFunds') }}</b>
</span>
<div class="flex py-4">
<NeoCheckbox
v-model="checked"
class="mr-3 text-xs"
:label="$t('teleport.checkboxLabel')"
/>
<b>{{ $t('teleport.checkboxLabel') }}</b>
</div>
</div>
<div class="flex mt-5 items-center justify-between">
<NeoButton
variant="pill"
:disabled="!checked"
class="mr-4"
no-shadow
:label="$t('massmint.mobileDisclaimer.continueAnyway')"
@click="emit('continue')"
/>
<div class="flex mt-5 items-center justify-center">
<NeoButton
variant="pill"
:label="$t('autoTeleport.close')"
Expand All @@ -58,7 +46,7 @@
</template>

<script setup lang="ts">
import { NeoButton, NeoCheckbox, NeoIcon, NeoModal } from '@kodadot1/brick'
import { NeoButton, NeoIcon, NeoModal } from '@kodadot1/brick'
const props = defineProps<{
modelValue: boolean
Expand All @@ -69,10 +57,6 @@ const props = defineProps<{
}>()
const isModalActive = useVModel(props, 'modelValue')
const checked = ref(false)
watch(isModalActive, () => {
checked.value = false
})
const emit = defineEmits(['close', 'continue'])
const emit = defineEmits(['close'])
</script>
22 changes: 8 additions & 14 deletions components/teleport/Teleport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,15 @@
</a>
{{ $t('teleport.ownerMessage') }}
</div>
<TeleportEDWarningModal
v-model="insufficientEDModalOpen"
:target-existential-deposit="targetExistentialDeposit.displayValue"
:source-existential-deposit="sourceExistentialDeposit.displayValue"
:reason="warningReason"
:currency="currency"
@close="insufficientEDModalOpen = false"
/>
</form>
<TeleportEDWarningModal
v-model="insufficientEDModalOpen"
:target-existential-deposit="targetExistentialDeposit.displayValue"
:source-existential-deposit="sourceExistentialDeposit.displayValue"
:reason="warningReason"
:currency="currency"
@continue="
() => {
insufficientEDModalOpen = false
teleport()
}
"
@close="insufficientEDModalOpen = false"
/>
</template>

<script setup lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@
"artistProfile": "Go to artist's profile",
"bridging": "Bridging {0} {1}",
"btnCopyPayment": "Copy Payment link",
"checkboxLabel": "I understand this action will lead to an irreversible loss of funds.",
"checkboxLabel": "This action will lead to an irreversible loss of funds.",
"congratsSupport": "Congratulations for supporting",
"destination": "Destination",
"donationSentTo": "Your donation will be sent to:",
Expand Down
1 change: 0 additions & 1 deletion i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,6 @@
"amount": "Asset मात्रा",
"artistProfile": "कलाकार के प्रोफाइल पर जाएं",
"btnCopyPayment": "भुगतान लिंक कॉपी करें",
"checkboxLabel": "मुझे समझ में आता है कि इस क्रिया से धन की अपरिवर्तनी हानि होगी।",
"congratsSupport": "समर्थन के लिए बधाई",
"destination": "गंतव्य",
"donationSentTo": "आपका दान भेजा जाएगा:",
Expand Down

0 comments on commit 7926237

Please sign in to comment.