tornado-initiation-ui/layouts/default.vue

52 lines
1.1 KiB
Vue
Raw Normal View History

2020-10-09 03:15:45 +02:00
<template>
2020-10-12 19:41:52 +02:00
<div class="wrapper">
<Navbar />
<section class="main-content section">
<div class="container">
2020-10-09 03:15:45 +02:00
<nuxt />
</div>
</section>
2020-11-03 07:54:19 +01:00
<Footer />
2020-11-03 08:35:46 +01:00
<Loading />
<Notices />
2020-10-09 03:15:45 +02:00
</div>
</template>
<script>
2020-10-12 19:41:52 +02:00
import Navbar from '@/components/Navbar'
2020-11-03 07:54:19 +01:00
import Footer from '@/components/Footer'
2020-11-03 08:35:46 +01:00
import Loading from '@/components/Loading'
import Notices from '@/components/Notices'
2020-10-21 16:42:50 +02:00
import { mapActions } from 'vuex'
2020-11-03 13:27:23 +01:00
import { localStorage } from '@/utillites'
2020-10-12 19:41:52 +02:00
2020-10-09 03:15:45 +02:00
export default {
2020-10-12 19:41:52 +02:00
components: {
Navbar,
2020-11-03 07:54:19 +01:00
Footer,
2020-11-03 08:35:46 +01:00
Loading,
Notices,
2020-10-09 03:15:45 +02:00
},
2020-11-03 14:33:33 +01:00
async mounted() {
2020-11-03 13:27:23 +01:00
const result = localStorage.getItem('provider')
if (result && result.name) {
2020-11-03 14:33:33 +01:00
await this.initProvider({
2020-11-03 13:49:11 +01:00
name: result.name,
network: result.network,
})
2020-11-03 13:27:23 +01:00
}
2020-11-03 14:33:33 +01:00
this.fetchDeploymentStatus()
2020-11-19 11:25:44 +01:00
this.statusPooling()
2021-06-23 14:18:14 +02:00
this.fetchGasPrice()
2020-11-20 17:11:39 +01:00
this.setAirdropAddresses()
2020-10-21 16:42:50 +02:00
},
methods: {
2020-11-03 13:49:11 +01:00
...mapActions('provider', ['initProvider']),
2020-11-20 17:11:39 +01:00
...mapActions('airdrop', ['setAirdropAddresses']),
2020-11-19 11:25:44 +01:00
...mapActions('steps', ['statusPooling', 'fetchDeploymentStatus']),
2021-06-23 14:18:14 +02:00
...mapActions('gasPrice', ['fetchGasPrice']),
2020-10-21 16:42:50 +02:00
},
2020-10-09 03:15:45 +02:00
}
</script>