aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/mixins/AppManagement.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/src/mixins/AppManagement.js')
-rw-r--r--apps/settings/src/mixins/AppManagement.js27
1 files changed, 15 insertions, 12 deletions
diff --git a/apps/settings/src/mixins/AppManagement.js b/apps/settings/src/mixins/AppManagement.js
index 96f2c1dad4a..cf44a37a53f 100644
--- a/apps/settings/src/mixins/AppManagement.js
+++ b/apps/settings/src/mixins/AppManagement.js
@@ -20,6 +20,9 @@
*
*/
+import { showError } from '@nextcloud/dialogs'
+import rebuildNavigation from '../service/rebuild-navigation.js'
+
export default {
computed: {
appGroups() {
@@ -109,33 +112,33 @@ export default {
},
forceEnable(appId) {
this.$store.dispatch('forceEnableApp', { appId, groups: [] })
- .then((response) => { OC.Settings.Apps.rebuildNavigation() })
- .catch((error) => { OC.Notification.show(error) })
+ .then((response) => { rebuildNavigation() })
+ .catch((error) => { showError(error) })
},
enable(appId) {
this.$store.dispatch('enableApp', { appId, groups: [] })
- .then((response) => { OC.Settings.Apps.rebuildNavigation() })
- .catch((error) => { OC.Notification.show(error) })
+ .then((response) => { rebuildNavigation() })
+ .catch((error) => { showError(error) })
},
disable(appId) {
this.$store.dispatch('disableApp', { appId })
- .then((response) => { OC.Settings.Apps.rebuildNavigation() })
- .catch((error) => { OC.Notification.show(error) })
+ .then((response) => { rebuildNavigation() })
+ .catch((error) => { showError(error) })
},
remove(appId) {
this.$store.dispatch('uninstallApp', { appId })
- .then((response) => { OC.Settings.Apps.rebuildNavigation() })
- .catch((error) => { OC.Notification.show(error) })
+ .then((response) => { rebuildNavigation() })
+ .catch((error) => { showError(error) })
},
install(appId) {
this.$store.dispatch('enableApp', { appId })
- .then((response) => { OC.Settings.Apps.rebuildNavigation() })
- .catch((error) => { OC.Notification.show(error) })
+ .then((response) => { rebuildNavigation() })
+ .catch((error) => { showError(error) })
},
update(appId) {
this.$store.dispatch('updateApp', { appId })
- .then((response) => { OC.Settings.Apps.rebuildNavigation() })
- .catch((error) => { OC.Notification.show(error) })
+ .then((response) => { rebuildNavigation() })
+ .catch((error) => { showError(error) })
},
},
}