diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-02-10 23:56:05 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-02-17 17:52:03 +0100 |
commit | 7c8a901b841878c7d63940baa551f5982958874e (patch) | |
tree | faf0c431d93cad5f294c4b09e14d3c1645f1bb5f /apps/settings/src/store | |
parent | f5d1365bbd32fdcf2084eb2ad727a574529898d0 (diff) | |
download | nextcloud-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/store')
-rw-r--r-- | apps/settings/src/store/apps.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/settings/src/store/apps.js b/apps/settings/src/store/apps.js index 038b42e64c9..1efed274b32 100644 --- a/apps/settings/src/store/apps.js +++ b/apps/settings/src/store/apps.js @@ -25,6 +25,8 @@ import api from './api' import Vue from 'vue' import { generateUrl } from '@nextcloud/router' +import { showError, showInfo } from '@nextcloud/dialogs' +import '@nextcloud/dialogs/styles/toast.scss' const state = { apps: [], @@ -37,7 +39,7 @@ const state = { const mutations = { APPS_API_FAILURE(state, error) { - OC.Notification.showHtml(t('settings', 'An error occured during the request. Unable to proceed.') + '<br>' + error.error.response.data.data.message, { timeout: 7 }) + showError(t('settings', 'An error occured during the request. Unable to proceed.') + '<br>' + error.error.response.data.data.message, { timeout: 7, isHTML: true }) console.error(state, error) }, @@ -180,16 +182,16 @@ const actions = { return api.get(generateUrl('apps/files')) .then(() => { if (response.data.update_required) { - OC.dialogs.info( + showInfo( t( 'settings', 'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.' ), - t('settings', 'App update'), - function() { - window.location.reload() - }, - true + { + onClick: () => window.location.reload(), + close: false, + + } ) setTimeout(function() { location.reload() |