1
0

Cleanup code & make sure it has a common code style

This commit is contained in:
kolaente
2020-09-05 22:35:52 +02:00
parent 4a8b15e7be
commit a8a7f70a3c
132 changed files with 6821 additions and 6595 deletions

View File

@ -3,8 +3,8 @@
<h1>Import your data from other services to Vikunja</h1>
<p>Click on the logo of one of the third-party services below to get started.</p>
<div class="migration-services-overview">
<router-link :to="{name: 'migrate.service', params: {service: m}}" v-for="m in availableMigrators" :key="m">
<img :src="`/images/migration/${m}.png`" :alt="m"/>
<router-link :key="m" :to="{name: 'migrate.service', params: {service: m}}" v-for="m in availableMigrators">
<img :alt="m" :src="`/images/migration/${m}.png`"/>
{{ m }}
</router-link>
</div>
@ -12,15 +12,15 @@
</template>
<script>
export default {
name: 'migrate.service',
mounted() {
this.setTitle('Import your data to Vikunja')
export default {
name: 'migrate.service',
mounted() {
this.setTitle('Import your data to Vikunja')
},
computed: {
availableMigrators() {
return this.$store.state.config.availableMigrators
},
computed: {
availableMigrators() {
return this.$store.state.config.availableMigrators
},
},
}
},
}
</script>

View File

@ -1,42 +1,42 @@
<template>
<migration
:identifier="identifier"
:name="name"
:identifier="identifier"
:name="name"
/>
</template>
<script>
import Migration from '../../components/migrator/migration'
import router from '../../router'
import Migration from '../../components/migrator/migration'
import router from '../../router'
export default {
name: 'migrateService',
components: {
Migration,
},
data() {
return {
name: '',
identifier: '',
}
},
mounted() {
this.setTitle(`Import your data from ${this.name} into Vikunja`)
},
created() {
switch (this.$route.params.service) {
case 'wunderlist':
this.name = 'Wunderlist'
this.identifier = 'wunderlist'
break
case 'todoist':
this.name = 'Todoist'
this.identifier = 'todoist'
break
default:
router.push({name: '404'})
}
},
}
export default {
name: 'migrateService',
components: {
Migration,
},
data() {
return {
name: '',
identifier: '',
}
},
mounted() {
this.setTitle(`Import your data from ${this.name} into Vikunja`)
},
created() {
switch (this.$route.params.service) {
case 'wunderlist':
this.name = 'Wunderlist'
this.identifier = 'wunderlist'
break
case 'todoist':
this.name = 'Todoist'
this.identifier = 'todoist'
break
default:
router.push({name: '404'})
}
},
}
</script>