feat: Migrate script setup

This commit is contained in:
Dominik Pschenitschni 2022-05-21 17:06:40 +02:00 committed by Gitea
parent c1e4eba7f5
commit 27f7541b25

View file

@ -20,24 +20,23 @@
</div> </div>
</template> </template>
<script lang="ts"> <script setup lang="ts">
import {defineComponent} from 'vue' import {computed} from 'vue'
import {useI18n} from 'vue-i18n'
import {useStore} from 'vuex'
import {MIGRATORS} from './migrators' import {MIGRATORS} from './migrators'
import {useTitle} from '@/composables/useTitle'
export default defineComponent({ const {t} = useI18n()
name: 'Migrate', const store = useStore()
mounted() {
this.setTitle(this.$t('migrate.title')) useTitle(() => t('migrate.title'))
},
computed: { const availableMigrators = computed(() => store.state.config.availableMigrators
availableMigrators() { .map((id) => MIGRATORS[id])
return this.$store.state.config.availableMigrators .filter((item) => Boolean(item)),
.map((id) => MIGRATORS[id]) )
.filter((item) => Boolean(item))
},
},
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -50,7 +49,6 @@ export default defineComponent({
width: 100px; width: 100px;
text-transform: capitalize; text-transform: capitalize;
margin-right: 1rem; margin-right: 1rem;
} }
.migration-service-image { .migration-service-image {