diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 00:10:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 00:10:07 +0300 |
commit | 0ea2d99b0bf43878a889cc6aa91443245d05356d (patch) | |
tree | dcaed8ad9d3a4fdf0efe9b9c4dd5b59b6360a51b /app/assets/javascripts/runner | |
parent | f602da84d10c36889714e46040f26cdfef5dce60 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/runner')
-rw-r--r-- | app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue b/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue index 09d46ce3e66..667cb0090b3 100644 --- a/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue +++ b/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue @@ -8,14 +8,16 @@ import runnersRegistrationTokenResetMutation from '~/runner/graphql/list/runners import { captureException } from '~/runner/sentry_utils'; import { INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE } from '../../constants'; +const i18n = { + modalAction: s__('Runners|Reset token'), + modalCancel: __('Cancel'), + modalCopy: __('Are you sure you want to reset the registration token?'), + modalTitle: __('Reset registration token'), +}; + export default { name: 'RunnerRegistrationTokenReset', - i18n: { - modalAction: s__('Runners|Reset token'), - modalCancel: __('Cancel'), - modalCopy: __('Are you sure you want to reset the registration token?'), - modalTitle: __('Reset registration token'), - }, + i18n, components: { GlDropdownItem, GlLoadingIcon, @@ -68,6 +70,18 @@ export default { return null; } }, + actionPrimary() { + return { + text: i18n.modalAction, + attributes: [{ variant: 'danger' }], + }; + }, + actionSecondary() { + return { + text: i18n.modalCancel, + attributes: [{ variant: 'default' }], + }; + }, }, methods: { handleModalPrimary() { @@ -115,14 +129,8 @@ export default { <gl-modal size="sm" :modal-id="$options.modalId" - :action-primary="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ { - text: $options.i18n.modalAction, - attributes: [{ variant: 'danger' }], - } /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */" - :action-secondary="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ { - text: $options.i18n.modalCancel, - attributes: [{ variant: 'default' }], - } /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */" + :action-primary="actionPrimary" + :action-secondary="actionSecondary" :title="$options.i18n.modalTitle" @primary="handleModalPrimary" > |