diff --git a/src/components/migrator/migration.vue b/src/components/migrator/migration.vue
deleted file mode 100644
index 235df9ca..00000000
--- a/src/components/migrator/migration.vue
+++ /dev/null
@@ -1,255 +0,0 @@
-
-
-
{{ $t('migrate.titleService', {name: name}) }}
-
{{ $t('migrate.descriptionDo') }}
-
-
- {{ $t('migrate.importUpload', {name: name}) }}
-
-
- {{ $t('migrate.upload') }}
-
-
-
- {{ $t('migrate.authorize', {name: name}) }}
-
- {{ $t('migrate.getStarted') }}
-
-
-
-
-
-
-
-
-
-
-
-
{{ $t('migrate.inProgress') }}
-
-
-
- {{ $t('migrate.alreadyMigrated1', {name: name, date: formatDate(lastMigrationDate)}) }}
- {{ $t('migrate.alreadyMigrated2') }}
-
-
- {{ $t('migrate.confirm') }}
- {{ $t('misc.cancel') }}
-
-
-
-
-
{{ $t('misc.refresh') }}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/helpers/migrator.ts b/src/helpers/migrator.ts
deleted file mode 100644
index 92106b76..00000000
--- a/src/helpers/migrator.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-export interface Migrator {
- name: string
- identifier: string
- isFileMigrator?: boolean
-}
-
-export const getMigratorFromSlug = (slug: string): Migrator => {
- switch (slug) {
- case 'wunderlist':
- return {
- name: 'Wunderlist',
- identifier: 'wunderlist',
- }
- case 'todoist':
- return {
- name: 'Todoist',
- identifier: 'todoist',
- }
- case 'trello':
- return {
- name: 'Trello',
- identifier: 'trello',
- }
- case 'microsoft-todo':
- return {
- name: 'Microsoft Todo',
- identifier: 'microsoft-todo',
- }
- case 'vikunja-file':
- return {
- name: 'Vikunja Export',
- identifier: 'vikunja-file',
- isFileMigrator: true,
- }
- default:
- throw new Error('Unknown migrator slug ' + slug)
- }
-}
-
-
-// NOTE: we list the imports individually for better build time optimisation
-export const SERVICE_ICONS = {
- 'vikunja-file': () => import('@/assets/migration/vikunja-file.png'),
- 'microsoft-todo': () => import('@/assets/migration/microsoft-todo.svg'),
- 'todoist': () => import('@/assets/migration/todoist.svg'),
- 'trello': () => import('@/assets/migration/trello.svg'),
- 'wunderlist': () => import('@/assets/migration/wunderlist.jpg'),
-}
\ No newline at end of file
diff --git a/src/views/migrator/Migrate.vue b/src/views/migrator/Migrate.vue
index 3f3a6e34..5ec7bf2f 100644
--- a/src/views/migrator/Migrate.vue
+++ b/src/views/migrator/Migrate.vue
@@ -2,13 +2,18 @@
{{ $t('migrate.title') }}
{{ $t('migrate.description') }}
-
+
-
+
{{ name }}
@@ -16,38 +21,37 @@
\ No newline at end of file
diff --git a/src/views/migrator/MigrateService.vue b/src/views/migrator/MigrateService.vue
index fddf901e..ae6d762b 100644
--- a/src/views/migrator/MigrateService.vue
+++ b/src/views/migrator/MigrateService.vue
@@ -1,40 +1,252 @@
-
+
+
{{ $t('migrate.titleService', {name: migrator.name}) }}
+
{{ $t('migrate.descriptionDo') }}
+
+
+
+
+ {{ $t('migrate.importUpload', {name: migrator.name}) }}
+
+
+ {{ $t('migrate.upload') }}
+
+
+
+ {{ $t('migrate.authorize', {name: migrator.name}) }}
+
+ {{ $t('migrate.getStarted') }}
+
+
+
+
+
+
+
+
+
+
+
+
{{ $t('migrate.inProgress') }}
+
+
+
+
+ {{ $t('migrate.alreadyMigrated1', {name: migrator.name, date: formatDate(lastMigrationDate)}) }}
+ {{ $t('migrate.alreadyMigrated2') }}
+
+
+ {{ $t('migrate.confirm') }}
+ {{ $t('misc.cancel') }}
+
+
+
+
+
{{ $t('misc.refresh') }}
+
+
+
\ No newline at end of file
diff --git a/src/assets/migration/microsoft-todo.svg b/src/views/migrator/icons/microsoft-todo.svg
similarity index 100%
rename from src/assets/migration/microsoft-todo.svg
rename to src/views/migrator/icons/microsoft-todo.svg
diff --git a/src/assets/migration/todoist.svg b/src/views/migrator/icons/todoist.svg
similarity index 100%
rename from src/assets/migration/todoist.svg
rename to src/views/migrator/icons/todoist.svg
diff --git a/src/assets/migration/trello.svg b/src/views/migrator/icons/trello.svg
similarity index 100%
rename from src/assets/migration/trello.svg
rename to src/views/migrator/icons/trello.svg
diff --git a/src/assets/migration/vikunja-file.png b/src/views/migrator/icons/vikunja-file.png
similarity index 100%
rename from src/assets/migration/vikunja-file.png
rename to src/views/migrator/icons/vikunja-file.png
diff --git a/src/assets/migration/wunderlist.jpg b/src/views/migrator/icons/wunderlist.jpg
similarity index 100%
rename from src/assets/migration/wunderlist.jpg
rename to src/views/migrator/icons/wunderlist.jpg
diff --git a/src/views/migrator/migrators.ts b/src/views/migrator/migrators.ts
new file mode 100644
index 00000000..f0885950
--- /dev/null
+++ b/src/views/migrator/migrators.ts
@@ -0,0 +1,45 @@
+import wunderlistIcon from './icons/wunderlist.jpg'
+import todoistIcon from './icons/todoist.svg'
+import trelloIcon from './icons/trello.svg'
+import microsoftTodoIcon from './icons/microsoft-todo.svg'
+import vikunjaFileIcon from './icons/vikunja-file.png'
+
+export interface Migrator {
+ id: string
+ name: string
+ isFileMigrator?: boolean
+ icon: string
+}
+
+interface IMigratorRecord {
+ [key: Migrator['id']]: Migrator
+ }
+
+export const MIGRATORS: IMigratorRecord = {
+ wunderlist: {
+ id: 'wunderlist',
+ name: 'Wunderlist',
+ icon: wunderlistIcon,
+ },
+ todoist: {
+ id: 'todoist',
+ name: 'Todoist',
+ icon: todoistIcon,
+ },
+ trello: {
+ id: 'trello',
+ name: 'Trello',
+ icon: trelloIcon,
+ },
+ 'microsoft-todo': {
+ id: 'microsoft-todo',
+ name: 'Microsoft Todo',
+ icon: microsoftTodoIcon,
+ },
+ 'vikunja-file': {
+ id: 'vikunja-file',
+ name: 'Vikunja Export',
+ icon: vikunjaFileIcon,
+ isFileMigrator: true,
+ },
+}
\ No newline at end of file