Skip to content

Commit

Permalink
Fix settings error message timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
(cherry picked from commit c22cfa0)
  • Loading branch information
Pytal committed Mar 4, 2022
1 parent db1e191 commit 2395589
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/settings/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import users from './users'
import apps from './apps'
import settings from './settings'
import oc from './oc'
import { showError } from '@nextcloud/dialogs'

Vue.use(Vuex)

Expand All @@ -36,9 +37,9 @@ const mutations = {
API_FAILURE(state, error) {
try {
const message = error.error.response.data.ocs.meta.message
OC.Notification.showHtml(t('settings', 'An error occured during the request. Unable to proceed.') + '<br>' + message, { timeout: 7 })
showError(t('settings', 'An error occured during the request. Unable to proceed.') + '<br>' + message, { isHTML: true })
} catch (e) {
OC.Notification.showTemporary(t('settings', 'An error occured during the request. Unable to proceed.'))
showError(t('settings', 'An error occured during the request. Unable to proceed.'))
}
console.error(state, error)
},
Expand Down

0 comments on commit 2395589

Please sign in to comment.