diff options
Diffstat (limited to 'app/assets/javascripts/labels')
5 files changed, 13 insertions, 13 deletions
diff --git a/app/assets/javascripts/labels/components/promote_label_modal.vue b/app/assets/javascripts/labels/components/promote_label_modal.vue index 8598500c842..1b99a094c48 100644 --- a/app/assets/javascripts/labels/components/promote_label_modal.vue +++ b/app/assets/javascripts/labels/components/promote_label_modal.vue @@ -1,6 +1,6 @@ <script> import { GlSprintf, GlModal } from '@gitlab/ui'; -import createFlash from '~/flash'; +import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { visitUrl } from '~/lib/utils/url_utility'; import { s__, __, sprintf } from '~/locale'; @@ -70,7 +70,7 @@ export default { labelUrl: this.url, successful: false, }); - createFlash({ + createAlert({ message: error, }); }); diff --git a/app/assets/javascripts/labels/group_label_subscription.js b/app/assets/javascripts/labels/group_label_subscription.js index ea69e6585e6..c4f80d32a83 100644 --- a/app/assets/javascripts/labels/group_label_subscription.js +++ b/app/assets/javascripts/labels/group_label_subscription.js @@ -1,7 +1,7 @@ import $ from 'jquery'; import { __ } from '~/locale'; import { fixTitle, hide } from '~/tooltips'; -import createFlash from '~/flash'; +import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; const tooltipTitles = { @@ -31,7 +31,7 @@ export default class GroupLabelSubscription { this.$unsubscribeButtons.removeAttr('data-url'); }) .catch(() => - createFlash({ + createAlert({ message: __('There was an error when unsubscribing from this label.'), }), ); @@ -50,7 +50,7 @@ export default class GroupLabelSubscription { .then(() => GroupLabelSubscription.setNewTooltip($btn)) .then(() => this.toggleSubscriptionButtons()) .catch(() => - createFlash({ + createAlert({ message: __('There was an error when subscribing to this label.'), }), ); diff --git a/app/assets/javascripts/labels/label_manager.js b/app/assets/javascripts/labels/label_manager.js index 1927ac6e1ec..be515869bff 100644 --- a/app/assets/javascripts/labels/label_manager.js +++ b/app/assets/javascripts/labels/label_manager.js @@ -3,7 +3,7 @@ import $ from 'jquery'; import Sortable from 'sortablejs'; import { dispose } from '~/tooltips'; -import createFlash from '~/flash'; +import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { __ } from '~/locale'; @@ -112,7 +112,7 @@ export default class LabelManager { onPrioritySortUpdate() { this.savePrioritySort().catch(() => - createFlash({ + createAlert({ message: this.errorMessage, }), ); @@ -127,7 +127,7 @@ export default class LabelManager { rollbackLabelPosition($label, originalAction) { const action = originalAction === 'remove' ? 'add' : 'remove'; this.toggleLabelPriority($label, action, false); - createFlash({ + createAlert({ message: this.errorMessage, }); } diff --git a/app/assets/javascripts/labels/labels_select.js b/app/assets/javascripts/labels/labels_select.js index 51fedac339b..65dda804a20 100644 --- a/app/assets/javascripts/labels/labels_select.js +++ b/app/assets/javascripts/labels/labels_select.js @@ -6,7 +6,7 @@ import { difference, isEqual, escape, sortBy, template, union } from 'lodash'; import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown'; import IssuableBulkUpdateActions from '~/issuable/bulk_update_sidebar/issuable_bulk_update_actions'; import { isScopedLabel } from '~/lib/utils/common_utils'; -import createFlash from '~/flash'; +import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { sprintf, __ } from '~/locale'; import CreateLabelDropdown from './create_label_dropdown'; @@ -146,7 +146,7 @@ export default class LabelsSelect { }); }) .catch(() => - createFlash({ + createAlert({ message: __('Error saving label update.'), }), ); @@ -185,7 +185,7 @@ export default class LabelsSelect { } }) .catch(() => - createFlash({ + createAlert({ message: __('Error fetching labels.'), }), ); diff --git a/app/assets/javascripts/labels/project_label_subscription.js b/app/assets/javascripts/labels/project_label_subscription.js index b2612e9ede0..9ca6ee5609c 100644 --- a/app/assets/javascripts/labels/project_label_subscription.js +++ b/app/assets/javascripts/labels/project_label_subscription.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import { fixTitle } from '~/tooltips'; -import createFlash from '~/flash'; +import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { __ } from '~/locale'; @@ -61,7 +61,7 @@ export default class ProjectLabelSubscription { }); }) .catch(() => - createFlash({ + createAlert({ message: __('There was an error subscribing to this label.'), }), ); |