diff --git a/app/src/store/info.js b/app/src/store/info.js index 92f1fd2c..89d1a603 100644 --- a/app/src/store/info.js +++ b/app/src/store/info.js @@ -145,11 +145,15 @@ export default { 'END_REQUEST' ({ commit }, { request, success, wait }) { let status = success ? 'success' : 'error' if (success && (request.warnings || request.errors)) { + const messages = request.messages + if (messages.length && messages[messages.length - 1].color === 'warning') { + request.showWarningMessage = true + } status = 'warning' } commit('UPDATE_REQUEST', { request, key: 'status', value: status }) - if (wait) { + if (wait && !request.showWarningMessage) { // Remove the overlay after a short delay to allow an error to display withtout flickering. setTimeout(() => { commit('SET_WAITING', false) @@ -214,6 +218,11 @@ export default { } } commit('SET_ERROR', null) + }, + + 'DISMISS_WARNING' ({ commit, state }, request) { + commit('SET_WAITING', false) + delete request.showWarningMessage } }, diff --git a/app/src/views/_partials/ViewLockOverlay.vue b/app/src/views/_partials/ViewLockOverlay.vue index 3c5fcdeb..a4f61faf 100644 --- a/app/src/views/_partials/ViewLockOverlay.vue +++ b/app/src/views/_partials/ViewLockOverlay.vue @@ -12,8 +12,7 @@ - - + @@ -21,7 +20,7 @@ diff --git a/app/src/views/_partials/index.js b/app/src/views/_partials/index.js index 950eecca..dfcda23a 100644 --- a/app/src/views/_partials/index.js +++ b/app/src/views/_partials/index.js @@ -1,4 +1,5 @@ export { default as ErrorDisplay } from './ErrorDisplay' +export { default as WarningDisplay } from './WarningDisplay' export { default as WaitingDisplay } from './WaitingDisplay' export { default as HistoryConsole } from './HistoryConsole'