diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-11-14 11:25:32 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-11-14 11:25:32 +0100 |
commit | a91371e03906a3ea0581940d6afbd9816b7dfee4 (patch) | |
tree | bfd2987608c295148d8fb9308ed7685cbbb06da1 | |
parent | d54edac46c040e547f0b6ed65fae116fa1c5bd90 (diff) |
Disable import button while importing
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | src/components/Settings/SettingsImportContacts.vue | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/components/Settings/SettingsImportContacts.vue b/src/components/Settings/SettingsImportContacts.vue index e52b9f03..4b2bf745 100644 --- a/src/components/Settings/SettingsImportContacts.vue +++ b/src/components/Settings/SettingsImportContacts.vue @@ -23,15 +23,15 @@ <template> <div class="import-contact"> <template v-if="!isNoAddressbookAvailable"> - <input id="contact-import" type="file" class="hidden-visually" - @change="processFile"> + <input id="contact-import" :disabled="isImporting" type="file" + class="hidden-visually" @change="processFile"> <label id="upload" for="contact-import" class="button import-contact__multiselect-label icon-upload"> - {{ t('contacts', 'Import into') }} + {{ isImporting ? t('contacts', 'Importing into') : t('contacts', 'Import into') }} </label> <multiselect v-model="selectedAddressbook" :options="options" - :disabled="isSingleAddressbook" + :disabled="isSingleAddressbook || isImporting" :placeholder="t('contacts', 'Contacts')" label="displayName" class="multiselect-vue import-contact__multiselect" /> @@ -70,6 +70,9 @@ export default { importState() { return this.$store.getters.getImportState }, + isImporting() { + return this.importState.stage !== 'default' + }, selectedAddressbook: { get() { if (this.importDestination) { |