Fix getting migration status
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-05-24 15:49:58 +02:00
parent 991de38980
commit 405dd1c1a6
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 5 deletions

View File

@ -23,9 +23,9 @@
</div> </div>
<p>Importing in progress, hang tight...</p> <p>Importing in progress, hang tight...</p>
</div> </div>
<div v-else-if="lastMigrationDate > 0"> <div v-else-if="lastMigrationDate">
<p> <p>
It looks like you've already imported your stuff from {{ name }} at {{ new Date(lastMigrationDate * 1000) }}.<br/> It looks like you've already imported your stuff from {{ name }} at {{ formatDate(lastMigrationDate) }}.<br/>
Importing again is possible, but might create duplicates. Importing again is possible, but might create duplicates.
Are you sure? Are you sure?
</p> </p>
@ -54,7 +54,7 @@
return { return {
authUrl: '', authUrl: '',
isMigrating: false, isMigrating: false,
lastMigrationDate: 0, lastMigrationDate: null,
message: '', message: '',
wunderlistCode: '', wunderlistCode: '',
} }
@ -78,8 +78,8 @@
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_unix > 0) { if(r.time_unix) {
this.lastMigrationDate = r.time_unix this.lastMigrationDate = new Date(r.time_unix)
return return
} }
this.migrate() this.migrate()