M: Prevent user from creating OSS from file
This commit is contained in:
parent
d23f02420a
commit
64076ec7d2
|
@ -114,9 +114,17 @@ function FormCreateItem() {
|
|||
handleSelectLocation(initLocation);
|
||||
}, [initLocation, handleSelectLocation]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
if (itemType !== LibraryItemType.RSFORM) {
|
||||
setFile(undefined);
|
||||
setFileName('');
|
||||
}
|
||||
}, [itemType]);
|
||||
|
||||
return (
|
||||
<form className={clsx('cc-column', 'min-w-[30rem] max-w-[30rem] mx-auto', 'px-6 py-3')} onSubmit={handleSubmit}>
|
||||
<h1>
|
||||
{itemType == LibraryItemType.RSFORM ? (
|
||||
<Overlay position='top-0 right-[0.5rem]'>
|
||||
<input
|
||||
id='schema_file'
|
||||
|
@ -132,6 +140,7 @@ function FormCreateItem() {
|
|||
onClick={() => inputRef.current?.click()}
|
||||
/>
|
||||
</Overlay>
|
||||
) : null}
|
||||
Создание схемы
|
||||
</h1>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user