diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /app/assets/javascripts/group_label_subscription.js | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/assets/javascripts/group_label_subscription.js')
-rw-r--r-- | app/assets/javascripts/group_label_subscription.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/assets/javascripts/group_label_subscription.js b/app/assets/javascripts/group_label_subscription.js index 257f5ac9658..378259eb9c8 100644 --- a/app/assets/javascripts/group_label_subscription.js +++ b/app/assets/javascripts/group_label_subscription.js @@ -1,7 +1,7 @@ import $ from 'jquery'; import { __ } from '~/locale'; import { fixTitle, hide } from '~/tooltips'; -import { deprecatedCreateFlash as flash } from './flash'; +import createFlash from './flash'; import axios from './lib/utils/axios_utils'; const tooltipTitles = { @@ -30,7 +30,11 @@ export default class GroupLabelSubscription { this.toggleSubscriptionButtons(); this.$unsubscribeButtons.removeAttr('data-url'); }) - .catch(() => flash(__('There was an error when unsubscribing from this label.'))); + .catch(() => + createFlash({ + message: __('There was an error when unsubscribing from this label.'), + }), + ); } subscribe(event) { @@ -45,7 +49,11 @@ export default class GroupLabelSubscription { .post(url) .then(() => GroupLabelSubscription.setNewTooltip($btn)) .then(() => this.toggleSubscriptionButtons()) - .catch(() => flash(__('There was an error when subscribing to this label.'))); + .catch(() => + createFlash({ + message: __('There was an error when subscribing to this label.'), + }), + ); } toggleSubscriptionButtons() { |