chore: text result extensions

This commit is contained in:
Ibrahima G. Coulibaly
2025-03-26 20:50:56 +00:00
parent ab587e60d0
commit ca7f6a6900
7 changed files with 42 additions and 25 deletions

View File

@@ -150,7 +150,9 @@ export default function CsvToJson({ title }: ToolComponentProps) {
inputComponent={
<ToolTextInput title="Input CSV" value={input} onChange={setInput} />
}
resultComponent={<ToolTextResult title="Output JSON" value={result} />}
resultComponent={
<ToolTextResult title="Output JSON" value={result} extension={'json'} />
}
getGroups={({ values, updateField }) => [
{
title: 'Input CSV Format',

View File

@@ -79,7 +79,9 @@ export default function CsvToXml({ title }: ToolComponentProps) {
inputComponent={
<ToolTextInput title="Input CSV" value={input} onChange={setInput} />
}
resultComponent={<ToolTextResult title="Output XML" value={result} />}
resultComponent={
<ToolTextResult title="Output XML" value={result} extension={'xml'} />
}
getGroups={({ values, updateField }) => [
{
title: 'Input CSV Format',

View File

@@ -60,7 +60,13 @@ export default function MinifyJson({ title }: ToolComponentProps) {
inputComponent={
<ToolTextInput title="Input JSON" value={input} onChange={setInput} />
}
resultComponent={<ToolTextResult title="Minified JSON" value={result} />}
resultComponent={
<ToolTextResult
title="Minified JSON"
value={result}
extension={'json'}
/>
}
initialValues={initialValues}
getGroups={null}
toolInfo={{

View File

@@ -130,7 +130,13 @@ export default function PrettifyJson({ title }: ToolComponentProps) {
inputComponent={
<ToolTextInput title={'Input JSON'} value={input} onChange={setInput} />
}
resultComponent={<ToolTextResult title={'Pretty JSON'} value={result} />}
resultComponent={
<ToolTextResult
title={'Pretty JSON'}
value={result}
extension={'json'}
/>
}
initialValues={initialValues}
getGroups={({ values, updateField }) => [
{

View File

@@ -109,7 +109,9 @@ export default function StringifyJson({ title }: ToolComponentProps) {
onChange={setInput}
/>
}
resultComponent={<ToolTextResult title="JSON String" value={result} />}
resultComponent={
<ToolTextResult title="JSON String" value={result} extension={'json'} />
}
getGroups={({ values, updateField }) => [
{
title: 'Indentation',

View File

@@ -6,7 +6,7 @@ export const meta = defineTool('pdf', {
shortDescription: 'Extract specific pages from a PDF file',
description:
'Extract specific pages from a PDF file using page numbers or ranges (e.g., 1,5-8)',
icon: 'mdi:file-pdf-box',
icon: 'material-symbols-light:call-split-rounded',
component: lazy(() => import('./index')),
keywords: ['pdf', 'split', 'extract', 'pages', 'range', 'document'],
path: 'split-pdf'