From 6563602fb39db8ae9a976784b62538cbcf3de108 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 1 Jul 2021 16:07:08 +0200 Subject: Adds progress log and ui enhancements --- app/src/pages/Home.vue | 66 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 19 deletions(-) (limited to 'app/src/pages') diff --git a/app/src/pages/Home.vue b/app/src/pages/Home.vue index bfe92bf..8385a46 100644 --- a/app/src/pages/Home.vue +++ b/app/src/pages/Home.vue @@ -1,22 +1,38 @@ @@ -31,7 +47,10 @@ export default { }, data () { - return {}; + return { + progress: '', + log: [], + }; }, computed: { @@ -61,6 +80,18 @@ export default { this.$electron.ipcRenderer.on('imap:listTree:to:reply', (event, folders) => { this.to.folders = folders; }); + + this.$electron.ipcRenderer.on('imap:from:error', (event, error) => { + this.from.error = error; + }); + this.$electron.ipcRenderer.on('imap:to:error', (event, error) => { + this.to.error = error; + }); + + this.$electron.ipcRenderer.on('imap:migrate:progress', (event, progress) => { + this.progress = progress; + this.log.push(progress); + }); }, methods: { @@ -73,6 +104,9 @@ export default { }, async migrate () { + this.progress = ''; + this.log = []; + this.$electron.ipcRenderer.send('imap:migrate', { from: JSON.parse(JSON.stringify(this.from)), to: JSON.parse(JSON.stringify(this.to)), @@ -83,12 +117,6 @@ export default {