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