vikunja-frontend/src/views/migrator/MigrateService.vue

41 lines
774 B
Vue
Raw Normal View History

2020-05-24 15:31:27 +02:00
<template>
<migration
:identifier="identifier"
:name="name"
:is-file-migrator="isFileMigrator"
2020-05-24 15:31:27 +02:00
/>
</template>
<script>
import Migration from '../../components/migrator/migration'
import {getMigratorFromSlug} from '../../helpers/migrator'
2020-05-24 15:31:27 +02:00
export default {
name: 'migrateService',
components: {
Migration,
},
data() {
return {
name: '',
identifier: '',
isFileMigrator: false,
}
},
mounted() {
this.setTitle(this.$t('migrate.titleService', {name: this.name}))
},
created() {
try {
const {name, identifier, isFileMigrator} = getMigratorFromSlug(this.$route.params.service)
this.name = name
this.identifier = identifier
this.isFileMigrator = isFileMigrator
} catch (e) {
this.$router.push({name: '404'})
}
},
}
2020-05-24 15:31:27 +02:00
</script>