Only show location when moving
This commit is contained in:
parent
7623b1d1e6
commit
e23f609e7a
1 changed files with 8 additions and 4 deletions
|
@ -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>
|
||||||
/home/container/{join(directory, values.name).replace(/^(\.\.\/|\/)+/, '')}
|
/home/container/{join(directory, values.name).replace(/^(\.\.\/|\/)+/, '')}
|
||||||
</p>
|
</p>
|
||||||
|
}
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue