From 50ae8153894b1fd0209ca8cdf4afc855a66cc2a8 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 17 Nov 2023 09:24:50 -0500 Subject: [PATCH] Add notice on errored file operations in self-hosted --- .../Settings/components/FileOperationListItem.tsx | 12 +++++++++++- shared/i18n/locales/en_US/translation.json | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/scenes/Settings/components/FileOperationListItem.tsx b/app/scenes/Settings/components/FileOperationListItem.tsx index 87729bab4..d5ee548a5 100644 --- a/app/scenes/Settings/components/FileOperationListItem.tsx +++ b/app/scenes/Settings/components/FileOperationListItem.tsx @@ -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 ( { subtitle={ <> {stateMapping[fileOperation.state]} •  - {fileOperation.error && <>{fileOperation.error} • } + {fileOperation.error && ( + <> + {fileOperation.error} + {selfHostedHelp} •  + + )} {t(`{{userName}} requested`, { userName: user.id === fileOperation.user.id diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index 8b4fe439d..06232a1aa 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -750,6 +750,7 @@ "Are you sure you want to delete this import?": "Are you sure you want to delete this import?", "I’m sure": "I’m 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",