From 0244544e2fc2953e08799c555c2d40a8cd2005a0 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Tue, 18 Jun 2019 13:32:40 +0200 Subject: [PATCH] Add username to token modal --- .../js/apps/users/components/TokensFormModal.tsx | 12 +++++++++--- .../__snapshots__/TokensFormModal-test.tsx.snap | 12 +++++++++++- .../main/resources/org/sonar/l10n/core.properties | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx index 6c313fe85ad..567a143b99c 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import TokensForm from './TokensForm'; import Modal from '../../../components/controls/Modal'; import { translate } from '../../../helpers/l10n'; @@ -30,11 +31,16 @@ interface Props { } export default function TokensFormModal(props: Props) { - const header = translate('users.tokens'); return ( - +
-

{header}

+

+ {props.user.name} }} + /> +

diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap index f989b7c3d4c..77879640815 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap @@ -9,7 +9,17 @@ exports[`should render correctly 1`] = ` className="modal-head" >

- users.tokens + + John Doe + , + } + } + />