This commit is contained in:
Pavel committed 2026-08-20 23:07:15 +02:00
1 parent 7553e74a96
commit 33d93ba0ca
13 files changed
+612 -85

No files matched your search

+8 -1
View File
@@ -129,6 +129,13 @@ export default function ImportAgentModal({
if (acceptedFiles[0]) processFile(acceptedFiles[0]);
},
multiple: false,
// Declared here (not via getInputProps) so drag-and-drop is filtered
// too, with drag-over rejection feedback; processFile's extension check
// stays as a backstop for odd MIME reports.
accept: {
'application/x-yaml': ['.yaml', '.yml'],
'text/yaml': ['.yaml', '.yml'],
},
});
const handleAnalyze = async () => {
@@ -325,7 +332,7 @@ export default function ImportAgentModal({
<p className="text-foreground text-sm font-medium">
{fileName || t('modals.importAgent.dropzoneText')}
</p>
<input {...getInputProps({ accept: '.yaml,.yml' })} />
<input {...getInputProps()} />
</div>
{error && <p className="text-destructive text-sm">{error}</p>}
</div>
+8 -1
View File
@@ -78,6 +78,13 @@ export default function ImportSpecModal({
if (acceptedFiles[0]) processFile(acceptedFiles[0]);
},
multiple: false,
// Declared here (not via getInputProps) so drag-and-drop is filtered
// too; processFile's extension check stays as a backstop.
accept: {
'application/json': ['.json'],
'application/x-yaml': ['.yaml', '.yml'],
'text/yaml': ['.yaml', '.yml'],
},
});
const handleParse = async () => {
@@ -217,7 +224,7 @@ export default function ImportSpecModal({
<p className="mt-1 text-xs text-gray-500 dark:text-gray-400">
{t('modals.importSpec.supportedFormats')}
</p>
<input {...getInputProps({ accept: '.json,.yaml,.yml' })} />
<input {...getInputProps()} />
</div>
{error && (