Commit 2425e9de authored by Scott Hampton's avatar Scott Hampton

Merge branch 'ar-cleanup-protected-tags' into 'master'

Clean up protected tags

See merge request gitlab-org/gitlab!53924
parents ec4f978a 32b43af3
import { s__ } from '~/locale';
export const FAILED_TO_UPDATE_TAG_MESSAGE = s__('ProjectSettings|Failed to update tag!');
import { s__ } from '~/locale';
import { deprecatedCreateFlash as flash } from '../flash'; import { deprecatedCreateFlash as flash } from '../flash';
import axios from '../lib/utils/axios_utils'; import axios from '../lib/utils/axios_utils';
import ProtectedTagAccessDropdown from './protected_tag_access_dropdown'; import ProtectedTagAccessDropdown from './protected_tag_access_dropdown';
import { FAILED_TO_UPDATE_TAG_MESSAGE } from './constants';
export default class ProtectedTagEdit { export default class ProtectedTagEdit {
constructor(options) { constructor(options) {
...@@ -49,7 +49,7 @@ export default class ProtectedTagEdit { ...@@ -49,7 +49,7 @@ export default class ProtectedTagEdit {
this.$allowedToCreateDropdownButton.enable(); this.$allowedToCreateDropdownButton.enable();
window.scrollTo({ top: 0, behavior: 'smooth' }); window.scrollTo({ top: 0, behavior: 'smooth' });
flash(s__('ProjectSettings|Failed to update tag!')); flash(FAILED_TO_UPDATE_TAG_MESSAGE);
}); });
} }
} }
...@@ -2,7 +2,7 @@ import { find } from 'lodash'; ...@@ -2,7 +2,7 @@ import { find } from 'lodash';
import AccessDropdown from '~/projects/settings/access_dropdown'; import AccessDropdown from '~/projects/settings/access_dropdown';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale'; import { FAILED_TO_UPDATE_TAG_MESSAGE } from '~/protected_tags/constants';
import { ACCESS_LEVELS, LEVEL_TYPES } from './constants'; import { ACCESS_LEVELS, LEVEL_TYPES } from './constants';
export default class ProtectedTagEdit { export default class ProtectedTagEdit {
...@@ -67,7 +67,7 @@ export default class ProtectedTagEdit { ...@@ -67,7 +67,7 @@ export default class ProtectedTagEdit {
}) })
.catch(() => { .catch(() => {
window.scrollTo({ top: 0, behavior: 'smooth' }); window.scrollTo({ top: 0, behavior: 'smooth' });
createFlash(s__('ProjectSettings|Failed to update tag!')); createFlash(FAILED_TO_UPDATE_TAG_MESSAGE);
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment