diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 21:07:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 21:07:59 +0300 |
commit | 3ff3d897d6529aabb21aa6aed54eb430a9cf0fe2 (patch) | |
tree | d5aaf0b6766cd5d4118e8ccd57d1269d3e4d673e /app/assets/javascripts/snippets | |
parent | 807c4eae46f96ccd54ce1d8d13f4547eda017267 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets')
3 files changed, 8 insertions, 8 deletions
diff --git a/app/assets/javascripts/snippets/components/edit.vue b/app/assets/javascripts/snippets/components/edit.vue index 4a7528d9c8e..151c38d01dc 100644 --- a/app/assets/javascripts/snippets/components/edit.vue +++ b/app/assets/javascripts/snippets/components/edit.vue @@ -2,7 +2,7 @@ import { GlButton, GlLoadingIcon, GlFormInput, GlFormGroup } from '@gitlab/ui'; import eventHub from '~/blob/components/eventhub'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import { redirectTo, joinPaths } from '~/lib/utils/url_utility'; import { __, sprintf } from '~/locale'; import { @@ -141,7 +141,7 @@ export default { Object.assign(e, { returnValue }); return returnValue; }, - flashAPIFailure(err) { + alertAPIFailure(err) { const defaultErrorMsg = this.newSnippet ? SNIPPET_CREATE_MUTATION_ERROR : SNIPPET_UPDATE_MUTATION_ERROR; @@ -190,7 +190,7 @@ export default { const errors = baseObj?.errors; if (errors?.length) { - this.flashAPIFailure(errors[0]); + this.alertAPIFailure(errors[0]); } else { redirectTo(baseObj.snippet.webUrl); } @@ -199,7 +199,7 @@ export default { // eslint-disable-next-line no-console console.error('[gitlab] unexpected error while updating snippet', e); - this.flashAPIFailure(getErrorMessage(e)); + this.alertAPIFailure(getErrorMessage(e)); }); }, updateActions(actions) { diff --git a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue index 7e80928cbea..021bd23781e 100644 --- a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue +++ b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue @@ -1,7 +1,7 @@ <script> import { GlLoadingIcon } from '@gitlab/ui'; import BlobHeaderEdit from '~/blob/components/blob_edit_header.vue'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import axios from '~/lib/utils/axios_utils'; import { getBaseURL, joinPaths } from '~/lib/utils/url_utility'; import { sprintf } from '~/locale'; @@ -60,9 +60,9 @@ export default { .then((res) => { this.notifyAboutUpdates({ content: res.data }); }) - .catch((e) => this.flashAPIFailure(e)); + .catch((e) => this.alertAPIFailure(e)); }, - flashAPIFailure(err) { + alertAPIFailure(err) { createAlert({ message: sprintf(SNIPPET_BLOB_CONTENT_FETCH_ERROR, { err }) }); }, }, diff --git a/app/assets/javascripts/snippets/components/snippet_header.vue b/app/assets/javascripts/snippets/components/snippet_header.vue index 231eaff41b5..881e06113d9 100644 --- a/app/assets/javascripts/snippets/components/snippet_header.vue +++ b/app/assets/javascripts/snippets/components/snippet_header.vue @@ -19,7 +19,7 @@ import axios from '~/lib/utils/axios_utils'; import { joinPaths } from '~/lib/utils/url_utility'; import { __, s__, sprintf } from '~/locale'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; -import { createAlert, VARIANT_DANGER, VARIANT_SUCCESS } from '~/flash'; +import { createAlert, VARIANT_DANGER, VARIANT_SUCCESS } from '~/alert'; import DeleteSnippetMutation from '../mutations/delete_snippet.mutation.graphql'; |