summaryrefslogtreecommitdiffstats
path: root/src/components/Settings
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Settings')
-rw-r--r--src/components/Settings/SettingsAddressbook.vue11
-rw-r--r--src/components/Settings/SettingsAddressbookSharee.vue5
-rw-r--r--src/components/Settings/SettingsNewAddressbook.vue3
3 files changed, 11 insertions, 8 deletions
diff --git a/src/components/Settings/SettingsAddressbook.vue b/src/components/Settings/SettingsAddressbook.vue
index e62ca5cf..2f75bb5b 100644
--- a/src/components/Settings/SettingsAddressbook.vue
+++ b/src/components/Settings/SettingsAddressbook.vue
@@ -99,6 +99,7 @@ import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import ActionInput from '@nextcloud/vue/dist/Components/ActionInput'
import ActionCheckbox from '@nextcloud/vue/dist/Components/ActionCheckbox'
import ShareAddressBook from './SettingsAddressbookShare'
+import { showError, showSuccess } from '@nextcloud/dialogs'
export default {
name: 'SettingsAddressbook',
@@ -195,7 +196,7 @@ export default {
} catch (err) {
// error handling
console.error(err)
- OC.Notification.showTemporary(t('contacts', 'Toggling of address book was not successful'))
+ showError(t('contacts', 'Toggling of address book was not successful'))
} finally {
// stop loading status regardless of outcome
this.toggleEnabledLoading = false
@@ -220,7 +221,7 @@ export default {
} catch (err) {
// error handling
console.error(err)
- OC.Notification.showTemporary(t('contacts', 'Deletion of address book was not successful.'))
+ showError(t('contacts', 'Deletion of address book was not successful.'))
} finally {
// stop loading status regardless of outcome
this.deleteAddressbookLoading = false
@@ -241,7 +242,7 @@ export default {
} catch (err) {
// error handling
console.error(err)
- OC.Notification.showTemporary(t('contacts', 'Renaming of address book was not successful.'))
+ showError(t('contacts', 'Renaming of address book was not successful.'))
} finally {
this.editingName = false
// stop loading status regardless of outcome
@@ -260,11 +261,11 @@ export default {
this.copySuccess = true
this.copied = true
// Notify addressbook was copied
- OC.Notification.showTemporary(t('contacts', 'Address book copied to clipboard'))
+ showSuccess(t('contacts', 'Address book copied to clipboard'))
} catch (error) {
this.copySuccess = false
this.copied = true
- OC.Notification.showTemporary(t('contacts', 'Address book was not copied to clipboard.'))
+ showError(t('contacts', 'Address book was not copied to clipboard.'))
} finally {
this.copyLoading = false
setTimeout(() => {
diff --git a/src/components/Settings/SettingsAddressbookSharee.vue b/src/components/Settings/SettingsAddressbookSharee.vue
index ddb43a37..f9bb7af0 100644
--- a/src/components/Settings/SettingsAddressbookSharee.vue
+++ b/src/components/Settings/SettingsAddressbookSharee.vue
@@ -53,6 +53,7 @@
</template>
<script>
+import { showError } from '@nextcloud/dialogs'
export default {
name: 'SettingsAddressbookSharee',
@@ -98,7 +99,7 @@ export default {
})
} catch (error) {
console.error(error)
- OC.Notification.showTemporary(t('contacts', 'Unable to delete the share.'))
+ showError(t('contacts', 'Unable to delete the share'))
} finally {
this.loading = false
}
@@ -117,7 +118,7 @@ export default {
})
} catch (error) {
console.error(error)
- OC.Notification.showTemporary(t('contacts', 'Unable to change permissions.'))
+ showError(t('contacts', 'Unable to change permissions'))
} finally {
this.loading = false
}
diff --git a/src/components/Settings/SettingsNewAddressbook.vue b/src/components/Settings/SettingsNewAddressbook.vue
index 7d5f72d2..2b4a764c 100644
--- a/src/components/Settings/SettingsNewAddressbook.vue
+++ b/src/components/Settings/SettingsNewAddressbook.vue
@@ -45,6 +45,7 @@
</template>
<script>
+import { showError } from '@nextcloud/dialogs'
export default {
name: 'SettingsNewAddressbook',
@@ -71,7 +72,7 @@ export default {
})
.catch((error) => {
console.error(error)
- OC.Notification.showTemporary(t('contacts', 'An error occurred, unable to create the address book.'))
+ showError(t('contacts', 'An error occurred, unable to create the address book'))
this.loading = false
})
},