Add notice on errored file operations in self-hosted

This commit is contained in:
Tom Moor
2023-11-17 09:24:50 -05:00
parent f75bd7145b
commit 50ae815389
2 changed files with 12 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ import Time from "~/components/Time";
import useCurrentUser from "~/hooks/useCurrentUser";
import useStores from "~/hooks/useStores";
import FileOperationMenu from "~/menus/FileOperationMenu";
import isCloudHosted from "~/utils/isCloudHosted";
type Props = {
fileOperation: FileOperation;
@@ -97,6 +98,10 @@ const FileOperationListItem = ({ fileOperation }: Props) => {
fileOperation.state === FileOperationState.Complete) ||
fileOperation.type === FileOperationType.Import;
const selfHostedHelp = isCloudHosted
? ""
: `. ${t("Check server logs for more details.")}`;
return (
<ListItem
title={title}
@@ -104,7 +109,12 @@ const FileOperationListItem = ({ fileOperation }: Props) => {
subtitle={
<>
{stateMapping[fileOperation.state]}&nbsp;&nbsp;
{fileOperation.error && <>{fileOperation.error}&nbsp;&nbsp;</>}
{fileOperation.error && (
<>
{fileOperation.error}
{selfHostedHelp}&nbsp;&nbsp;
</>
)}
{t(`{{userName}} requested`, {
userName:
user.id === fileOperation.user.id

View File

@@ -750,6 +750,7 @@
"Are you sure you want to delete this import?": "Are you sure you want to delete this import?",
"Im sure": "Im sure",
"Deleting this import will also delete all collections and documents that were created from it. This cannot be undone.": "Deleting this import will also delete all collections and documents that were created from it. This cannot be undone.",
"Check server logs for more details.": "Check server logs for more details.",
"{{userName}} requested": "{{userName}} requested",
"Upload": "Upload",
"Drag and drop the zip file from the JSON export option in {{appName}}, or click to upload": "Drag and drop the zip file from the JSON export option in {{appName}}, or click to upload",