Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/boards/index.js')
-rw-r--r--app/assets/javascripts/boards/index.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js
index 1888645ef78..fb347ce852d 100644
--- a/app/assets/javascripts/boards/index.js
+++ b/app/assets/javascripts/boards/index.js
@@ -27,7 +27,6 @@ import FilteredSearchBoards from '~/boards/filtered_search_boards';
import store from '~/boards/stores';
import boardsStore from '~/boards/stores/boards_store';
import toggleFocusMode from '~/boards/toggle_focus';
-import { deprecatedCreateFlash as Flash } from '~/flash';
import createDefaultClient from '~/lib/graphql';
import {
NavigationType,
@@ -196,7 +195,7 @@ export default () => {
}
},
methods: {
- ...mapActions(['setInitialBoardData', 'performSearch']),
+ ...mapActions(['setInitialBoardData', 'performSearch', 'setError']),
initialBoardLoad() {
boardsStore
.all()
@@ -205,8 +204,11 @@ export default () => {
lists.forEach((list) => boardsStore.addList(list));
this.loading = false;
})
- .catch(() => {
- Flash(__('An error occurred while fetching the board lists. Please try again.'));
+ .catch((error) => {
+ this.setError({
+ error,
+ message: __('An error occurred while fetching the board lists. Please try again.'),
+ });
});
},
updateTokens() {
@@ -250,7 +252,7 @@ export default () => {
.catch(() => {
newIssue.setFetchingState('subscriptions', false);
setWeightFetchingState(newIssue, false);
- Flash(__('An error occurred while fetching sidebar data'));
+ this.setError({ message: __('An error occurred while fetching sidebar data') });
});
}
@@ -287,7 +289,9 @@ export default () => {
})
.catch(() => {
issue.setFetchingState('subscriptions', false);
- Flash(__('An error occurred when toggling the notification subscription'));
+ this.setError({
+ message: __('An error occurred when toggling the notification subscription'),
+ });
});
}
},