diff options
Diffstat (limited to 'app/assets/javascripts/access_tokens/components/access_token_table_app.vue')
-rw-r--r-- | app/assets/javascripts/access_tokens/components/access_token_table_app.vue | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/app/assets/javascripts/access_tokens/components/access_token_table_app.vue b/app/assets/javascripts/access_tokens/components/access_token_table_app.vue index 85b3c994e02..9a7296b6b1f 100644 --- a/app/assets/javascripts/access_tokens/components/access_token_table_app.vue +++ b/app/assets/javascripts/access_tokens/components/access_token_table_app.vue @@ -33,7 +33,7 @@ export default { emptyField: __('Never'), expired: __('Expired'), modalMessage: __( - 'Are you sure you want to revoke this %{accessTokenType}? This action cannot be undone.', + 'Are you sure you want to revoke the %{accessTokenType} "%{tokenName}"? This action cannot be undone.', ), revokeButton: __('Revoke'), tokenValidity: __('Token valid until revoked'), @@ -72,11 +72,6 @@ export default { return FIELDS.filter(({ key }) => !ignoredFields.includes(key)); }, - modalMessage() { - return sprintf(this.$options.i18n.modalMessage, { - accessTokenType: this.accessTokenType, - }); - }, showPagination() { return this.activeAccessTokens.length > PAGE_SIZE; }, @@ -87,6 +82,12 @@ export default { this.activeAccessTokens = convertObjectPropsToCamelCase(activeAccessTokens, { deep: true }); this.currentPage = INITIAL_PAGE; }, + modalMessage(tokenName) { + return sprintf(this.$options.i18n.modalMessage, { + accessTokenType: this.accessTokenType, + tokenName, + }); + }, sortingChanged(aRow, bRow, key) { if (['createdAt', 'lastUsedAt', 'expiresAt'].includes(key)) { // Transform `null` value to the latest possible date @@ -149,13 +150,13 @@ export default { }}</span> </template> - <template #cell(action)="{ item: { revokePath } }"> + <template #cell(action)="{ item: { name, revokePath } }"> <gl-button v-if="revokePath" category="tertiary" :title="$options.i18n.revokeButton" :aria-label="$options.i18n.revokeButton" - :data-confirm="modalMessage" + :data-confirm="modalMessage(name)" data-confirm-btn-variant="danger" data-qa-selector="revoke_button" data-method="put" |