Fix checking for existing migration from other services
This commit is contained in:
parent
5455c28d56
commit
5e170e14cc
1 changed files with 14 additions and 6 deletions
|
@ -2,11 +2,19 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>Import your data from {{ name }} to Vikunja</h1>
|
<h1>Import your data from {{ name }} to Vikunja</h1>
|
||||||
<p>Vikunja will import all lists, tasks, notes, reminders and files you have access to.</p>
|
<p>Vikunja will import all lists, tasks, notes, reminders and files you have access to.</p>
|
||||||
<template v-if="isMigrating === false && message === '' && lastMigrationDate === 0">
|
<template v-if="isMigrating === false && message === '' && lastMigrationDate === null">
|
||||||
<p>To authorize Vikunja to access your {{ name }} Account, click the button below.</p>
|
<p>To authorize Vikunja to access your {{ name }} Account, click the button below.</p>
|
||||||
<a :href="authUrl" class="button is-primary" :class="{'is-loading': migrationService.loading}" :disabled="migrationService.loading">Get Started</a>
|
<a
|
||||||
|
:href="authUrl"
|
||||||
|
class="button is-primary"
|
||||||
|
:class="{'is-loading': migrationService.loading}"
|
||||||
|
:disabled="migrationService.loading">
|
||||||
|
Get Started
|
||||||
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<div class="migration-in-progress-container" v-else-if="isMigrating === true && message === '' && lastMigrationDate === 0">
|
<div
|
||||||
|
class="migration-in-progress-container"
|
||||||
|
v-else-if="isMigrating === true && message === '' && lastMigrationDate === null">
|
||||||
<div class="migration-in-progress">
|
<div class="migration-in-progress">
|
||||||
<img :src="`/images/migration/${identifier}.png`" :alt="name"/>
|
<img :src="`/images/migration/${identifier}.png`" :alt="name"/>
|
||||||
<div class="progress-dots">
|
<div class="progress-dots">
|
||||||
|
@ -46,7 +54,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AbstractMigrationService from "../../services/migrator/abstractMigrationService";
|
import AbstractMigrationService from '../../services/migrator/abstractMigrationService'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'migration',
|
name: 'migration',
|
||||||
|
@ -74,11 +82,11 @@
|
||||||
this.getAuthUrl()
|
this.getAuthUrl()
|
||||||
this.message = ''
|
this.message = ''
|
||||||
|
|
||||||
if(typeof this.$route.query.code !== 'undefined') {
|
if (typeof this.$route.query.code !== 'undefined') {
|
||||||
this.wunderlistCode = this.$route.query.code
|
this.wunderlistCode = this.$route.query.code
|
||||||
this.migrationService.getStatus()
|
this.migrationService.getStatus()
|
||||||
.then(r => {
|
.then(r => {
|
||||||
if(r.time) {
|
if (r.time) {
|
||||||
this.lastMigrationDate = new Date(r.time)
|
this.lastMigrationDate = new Date(r.time)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue