mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-19 22:19:36 +02:00
chore: hideCopy if video or audio
This commit is contained in:
@@ -7,11 +7,13 @@ import React from 'react';
|
|||||||
export default function ResultFooter({
|
export default function ResultFooter({
|
||||||
handleDownload,
|
handleDownload,
|
||||||
handleCopy,
|
handleCopy,
|
||||||
disabled
|
disabled,
|
||||||
|
hideCopy
|
||||||
}: {
|
}: {
|
||||||
handleDownload: () => void;
|
handleDownload: () => void;
|
||||||
handleCopy: () => void;
|
handleCopy: () => void;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
hideCopy?: boolean;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Stack mt={1} direction={'row'} spacing={2}>
|
<Stack mt={1} direction={'row'} spacing={2}>
|
||||||
@@ -22,13 +24,15 @@ export default function ResultFooter({
|
|||||||
>
|
>
|
||||||
Save as
|
Save as
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{!hideCopy && (
|
||||||
disabled={disabled}
|
<Button
|
||||||
onClick={handleCopy}
|
disabled={disabled}
|
||||||
startIcon={<ContentPasteIcon />}
|
onClick={handleCopy}
|
||||||
>
|
startIcon={<ContentPasteIcon />}
|
||||||
Copy to clipboard
|
>
|
||||||
</Button>
|
Copy to clipboard
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -173,6 +173,7 @@ export default function ToolFileResult({
|
|||||||
disabled={!value}
|
disabled={!value}
|
||||||
handleCopy={handleCopy}
|
handleCopy={handleCopy}
|
||||||
handleDownload={handleDownload}
|
handleDownload={handleDownload}
|
||||||
|
hideCopy={fileType === 'video' || fileType === 'audio'}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -17,9 +17,9 @@ const toolCategoriesOrder: ToolCategory[] = [
|
|||||||
'string',
|
'string',
|
||||||
'json',
|
'json',
|
||||||
'pdf',
|
'pdf',
|
||||||
|
'video',
|
||||||
'list',
|
'list',
|
||||||
'csv',
|
'csv',
|
||||||
'video',
|
|
||||||
'number',
|
'number',
|
||||||
'png',
|
'png',
|
||||||
'time',
|
'time',
|
||||||
|
Reference in New Issue
Block a user