classic-ui/components/Loaders/Loader.vue

30 lines
810 B
Vue
Raw Normal View History

2022-10-13 16:50:29 +03:00
<template>
<b-loading v-model="enabled">
<div class="loading-container">
<div class="loading-tornado" data-test="tornado_loader"></div>
<div class="loading-message">{{ message }}...</div>
<div v-if="progress >= 0" class="loading-message">{{ progress }}%</div>
<approve-loader v-if="isApprove" />
</div>
</b-loading>
</template>
<script>
import { mapState, mapGetters } from 'vuex'
import ApproveLoader from './ApproveLoader'
export default {
components: {
ApproveLoader
},
computed: {
...mapGetters('metamask', ['isWalletConnect']),
...mapState('metamask', ['providerName']),
...mapState('loading', ['enabled', 'message', 'progress', 'type']),
isApprove() {
return this.type === 'approve'
}
}
}
</script>