Fix dodgy merge

This commit is contained in:
Reece Browne 2025-08-26 12:40:11 +01:00
parent 07313a0d04
commit 6700822ca0

View File

@ -57,36 +57,70 @@ const FileStatusIndicator = ({
// Check if there are no files in the workbench // Check if there are no files in the workbench
if (workbenchFiles.length === 0) { if (workbenchFiles.length === 0) {
return ( // If no recent files, show upload button
<Text size="sm" c="dimmed"> if (!hasRecentFiles) {
{t("files.noFiles", "No files uploaded. ")}{" "} return (
<Anchor <Text size="sm" c="dimmed">
size="sm" <Anchor
onClick={openFilesModal} size="sm"
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '4px' }} onClick={handleNativeUpload}
> style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
<FolderIcon style={{ fontSize: '14px' }} /> >
{t("files.addFiles", "Add files")} <UploadIcon style={{ fontSize: '0.875rem' }} />
</Anchor> {t("files.upload", "Upload")}
</Text> </Anchor>
); </Text>
);
} else {
// If there are recent files, show add files button
return (
<Text size="sm" c="dimmed">
<Anchor
size="sm"
onClick={openFilesModal}
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
>
<FolderIcon style={{ fontSize: '0.875rem' }} />
{t("files.addFiles", "Add files")}
</Anchor>
</Text>
);
}
} }
// Show selection status when there are files in workbench // Show selection status when there are files in workbench
if (selectedFiles.length === 0) { if (selectedFiles.length === 0) {
return ( // If no recent files, show upload option
<Text size="sm" c="dimmed"> if (!hasRecentFiles) {
{t("files.selectFromWorkbench", "Select files from the workbench or ") + " "} return (
<Anchor <Text size="sm" c="dimmed">
size="sm" {t("files.selectFromWorkbench", "Select files from the workbench or ") + " "}
onClick={openFilesModal} <Anchor
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '4px' }} size="sm"
> onClick={handleNativeUpload}
<FolderIcon style={{ fontSize: '14px' }} /> style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
{t("files.addFiles", "Add files")} >
</Anchor> <UploadIcon style={{ fontSize: '0.875rem' }} />
</Text> {t("files.upload", "Upload")}
); </Anchor>
</Text>
);
} else {
// If there are recent files, show add files option
return (
<Text size="sm" c="dimmed">
{t("files.selectFromWorkbench", "Select files from the workbench or ") + " "}
<Anchor
size="sm"
onClick={openFilesModal}
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
>
<FolderIcon style={{ fontSize: '0.875rem' }} />
{t("files.addFiles", "Add files")}
</Anchor>
</Text>
);
}
} }
return ( return (