Composer fixes

This commit is contained in:
mrfry 2022-05-10 14:38:42 +02:00
parent e65739a64a
commit 02954e0d01
2 changed files with 15 additions and 12 deletions

View file

@ -86,17 +86,19 @@ export default function Composer({ onSubmit, allowFile, fileOnly }) {
return return
} }
const ext = file.name.split('.').reverse()[0] if (allowFile || fileOnly) {
if ( const ext = file.name.split('.').reverse()[0]
!constants.imageExts.includes(ext.toLowerCase()) && if (
!constants.videoExts.includes(ext.toLowerCase()) !constants.imageExts.includes(ext.toLowerCase()) &&
) { !constants.videoExts.includes(ext.toLowerCase())
alert( ) {
`Kérlek helyes formátum fájlt tölts fel! (${constants.imageExts.join( alert(
', ' `Kérlek helyes formátum fájlt tölts fel! (${constants.imageExts.join(
)}, ${constants.videoExts.join(', ')})` ', '
) )}, ${constants.videoExts.join(', ')})`
return )
return
}
} }
onSubmit(title, val, file) onSubmit(title, val, file)

View file

@ -17,7 +17,8 @@
.container > textarea { .container > textarea {
margin-left: 1px; margin-left: 1px;
width: 99%; width: 99%;
resize: none; resize: vertical;
height: 200px;
} }
.typeSelector { .typeSelector {