diff options
Diffstat (limited to 'src/components/AppNavigation')
-rw-r--r-- | src/components/AppNavigation/Settings/SettingsImportContacts.vue | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/AppNavigation/Settings/SettingsImportContacts.vue b/src/components/AppNavigation/Settings/SettingsImportContacts.vue index 130e7a64..5c4486e5 100644 --- a/src/components/AppNavigation/Settings/SettingsImportContacts.vue +++ b/src/components/AppNavigation/Settings/SettingsImportContacts.vue @@ -73,8 +73,7 @@ <IconLoading v-if="loading" :size="20" /> <IconFolder :size="20" /> </template> - <span class="import-contact__button-icon" /> - {{ t('contacts', 'Import from Files') }} + {{ t('contacts', 'Import from files') }} </Button> </section> </Modal> @@ -274,17 +273,20 @@ export default { */ async openPicker() { try { - this.loading = true // unlikely, but let's cancel any previous request this.cancelRequest() // pick, retrieve & process file const path = await picker.pick() - await this.processLocalFile(path) + if (path) { + this.loading = true + await this.processLocalFile(path) + } + this.resetState() + } catch (error) { + this.loading = false console.error('Something wrong happened while picking a file', error) - } finally { - this.resetState() } }, |