aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/mixins
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-02-10 23:56:05 +0100
committerCarl Schwan <carl@carlschwan.eu>2022-02-17 17:52:03 +0100
commit7c8a901b841878c7d63940baa551f5982958874e (patch)
treefaf0c431d93cad5f294c4b09e14d3c1645f1bb5f /apps/settings/src/mixins
parentf5d1365bbd32fdcf2084eb2ad727a574529898d0 (diff)
downloadnextcloud-server-7c8a901b841878c7d63940baa551f5982958874e.tar.gz
nextcloud-server-7c8a901b841878c7d63940baa551f5982958874e.zip
Cleanup admin settings js files
* Move admin.js to webpack, so that this use the bundled jquery files instead of the deprecated window.$ Also fixing formatting * Remove log.js that seems to be from a time where logreader was bundled with server and I couldn't find an usage of it anymore * Fix recent regression in rebuild navigation function (now not depending on jquery anymore and bundled by webpack). Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings/src/mixins')
-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) })
},
},
}