classic-ui/components/settings/SettingsModalBox.vue

65 lines
1.4 KiB
Vue
Raw Normal View History

2022-04-22 06:05:56 +03:00
<template>
<div class="modal-card box box-modal">
<header class="box-modal-header is-spaced">
<div class="box-modal-title">{{ $t('withdrawalSettings') }}</div>
<button type="button" class="delete" @click="$parent.cancel('escape')" />
</header>
<b-tabs v-model="withdrawType" :animated="false" class="is-modal">
<RelayerTab />
</b-tabs>
</div>
</template>
<script>
/* eslint-disable no-console */
import { mapState, mapMutations } from 'vuex'
2023-12-04 18:59:17 +03:00
import { RelayerTab } from '@/components/settings/tabs'
2022-04-22 06:05:56 +03:00
export default {
components: {
2023-12-04 18:59:17 +03:00
RelayerTab
2022-04-22 06:05:56 +03:00
},
props: {
currency: {
type: String,
default: 'ETH'
},
title: {
type: String,
default: 'withdrawalSettings'
}
},
provide() {
return {
currency: this.currency,
save: this.save,
reset: this.reset
}
},
data() {
return {
withdrawType: 'relayer'
}
},
computed: {
...mapState('application', {
defaultWithdrawType: 'withdrawType'
})
},
created() {
this.withdrawType = this.defaultWithdrawType
},
methods: {
...mapMutations('application', ['SET_WITHDRAW_TYPE']),
reset() {
this.withdrawType = 'relayer'
this.$root.$emit('resetSettings')
},
save() {
this.SET_WITHDRAW_TYPE({ withdrawType: this.withdrawType })
this.$emit('close')
}
}
}
</script>