Only show location when moving

This commit is contained in:
Dane Everitt 2019-08-05 21:55:33 -07:00
parent 7623b1d1e6
commit e23f609e7a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -42,10 +42,12 @@ export default ({ file, useMoveTerminology, ...props }: Props) => {
{({ isSubmitting, values }) => ( {({ isSubmitting, values }) => (
<Modal {...props} dismissable={!isSubmitting} showSpinnerOverlay={isSubmitting}> <Modal {...props} dismissable={!isSubmitting} showSpinnerOverlay={isSubmitting}>
<Form className={'m-0'}> <Form className={'m-0'}>
<div className={classNames('flex', { <div
'items-center': useMoveTerminology, className={classNames('flex', {
'items-end': !useMoveTerminology, 'items-center': useMoveTerminology,
})}> 'items-end': !useMoveTerminology,
})}
>
<div className={'flex-1 mr-6'}> <div className={'flex-1 mr-6'}>
<Field <Field
type={'string'} type={'string'}
@ -65,10 +67,12 @@ export default ({ file, useMoveTerminology, ...props }: Props) => {
</button> </button>
</div> </div>
</div> </div>
{useMoveTerminology &&
<p className={'text-xs mt-2 text-neutral-400'}> <p className={'text-xs mt-2 text-neutral-400'}>
<strong className={'text-neutral-200'}>New location:</strong> <strong className={'text-neutral-200'}>New location:</strong>
&nbsp;/home/container/{join(directory, values.name).replace(/^(\.\.\/|\/)+/, '')} &nbsp;/home/container/{join(directory, values.name).replace(/^(\.\.\/|\/)+/, '')}
</p> </p>
}
</Form> </Form>
</Modal> </Modal>
)} )}