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