feat(ui): ui change for create access token EE-3541 (#7366)

* ui change for create access token
pull/7391/head
Richard Wei 2 years ago committed by GitHub
parent 0ba10b44ec
commit d4d80ed8f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,8 @@
import { PropsWithChildren } from 'react'; import { PropsWithChildren } from 'react';
import clsx from 'clsx'; import clsx from 'clsx';
import { Icon } from '@@/Icon';
import { Button } from '../Button'; import { Button } from '../Button';
import styles from './CopyButton.module.css'; import styles from './CopyButton.module.css';
@ -31,7 +33,7 @@ export function CopyButton({
title="Copy Value" title="Copy Value"
type="button" type="button"
> >
<i className="fa fa-copy space-right" aria-hidden="true" /> {children} <Icon icon="copy" feather /> {children}
</Button> </Button>
<span <span
@ -41,7 +43,7 @@ export function CopyButton({
'space-left' 'space-left'
)} )}
> >
<i className="fa fa-check" aria-hidden="true" /> <Icon icon="check" feather />
{displayText && <span className="space-left">{displayText}</span>} {displayText && <span className="space-left">{displayText}</span>}
</span> </span>
</div> </div>

@ -74,18 +74,16 @@ export function CreateAccessToken({
/> />
</FormControl> </FormControl>
<div className="row mt-5"> <div className="row mt-5">
<div className="col-sm-12"> <Button
<Button disabled={!!errorText || !!accessToken}
disabled={!!errorText || !!accessToken} onClick={() => generateAccessToken()}
onClick={() => generateAccessToken()} >
> {t('Add access token')}
{t('Add access token')} </Button>
</Button>
</div>
</div> </div>
</div> </div>
{accessToken && ( {accessToken && (
<> <div className="mt-5">
<FormSectionTitle> <FormSectionTitle>
<Trans ns={translationNS}>New access token</Trans> <Trans ns={translationNS}>New access token</Trans>
</FormSectionTitle> </FormSectionTitle>
@ -106,7 +104,7 @@ export function CreateAccessToken({
> >
<Trans ns={translationNS}>Done</Trans> <Trans ns={translationNS}>Done</Trans>
</Button> </Button>
</> </div>
)} )}
</WidgetBody> </WidgetBody>
</Widget> </Widget>

Loading…
Cancel
Save