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,37 +57,71 @@ 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) {
// If no recent files, show upload button
if (!hasRecentFiles) {
return (
<Text size="sm" c="dimmed">
<Anchor
size="sm"
onClick={handleNativeUpload}
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
>
<UploadIcon style={{ fontSize: '0.875rem' }} />
{t("files.upload", "Upload")}
</Anchor>
</Text>
);
} else {
// If there are recent files, show add files button
return ( return (
<Text size="sm" c="dimmed"> <Text size="sm" c="dimmed">
{t("files.noFiles", "No files uploaded. ")}{" "}
<Anchor <Anchor
size="sm" size="sm"
onClick={openFilesModal} onClick={openFilesModal}
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '4px' }} style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
> >
<FolderIcon style={{ fontSize: '14px' }} /> <FolderIcon style={{ fontSize: '0.875rem' }} />
{t("files.addFiles", "Add files")} {t("files.addFiles", "Add files")}
</Anchor> </Anchor>
</Text> </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) {
// If no recent files, show upload option
if (!hasRecentFiles) {
return (
<Text size="sm" c="dimmed">
{t("files.selectFromWorkbench", "Select files from the workbench or ") + " "}
<Anchor
size="sm"
onClick={handleNativeUpload}
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
>
<UploadIcon style={{ fontSize: '0.875rem' }} />
{t("files.upload", "Upload")}
</Anchor>
</Text>
);
} else {
// If there are recent files, show add files option
return ( return (
<Text size="sm" c="dimmed"> <Text size="sm" c="dimmed">
{t("files.selectFromWorkbench", "Select files from the workbench or ") + " "} {t("files.selectFromWorkbench", "Select files from the workbench or ") + " "}
<Anchor <Anchor
size="sm" size="sm"
onClick={openFilesModal} onClick={openFilesModal}
style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '4px' }} style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: '0.25rem' }}
> >
<FolderIcon style={{ fontSize: '14px' }} /> <FolderIcon style={{ fontSize: '0.875rem' }} />
{t("files.addFiles", "Add files")} {t("files.addFiles", "Add files")}
</Anchor> </Anchor>
</Text> </Text>
); );
} }
}
return ( return (
<Text size="sm" c="dimmed" style={{ wordBreak: 'break-word', whiteSpace: 'normal' }}> <Text size="sm" c="dimmed" style={{ wordBreak: 'break-word', whiteSpace: 'normal' }}>