Add notice on errored file operations in self-hosted
This commit is contained in:
@@ -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]} •
|
{stateMapping[fileOperation.state]} •
|
||||||
{fileOperation.error && <>{fileOperation.error} • </>}
|
{fileOperation.error && (
|
||||||
|
<>
|
||||||
|
{fileOperation.error}
|
||||||
|
{selfHostedHelp} •
|
||||||
|
</>
|
||||||
|
)}
|
||||||
{t(`{{userName}} requested`, {
|
{t(`{{userName}} requested`, {
|
||||||
userName:
|
userName:
|
||||||
user.id === fileOperation.user.id
|
user.id === fileOperation.user.id
|
||||||
|
|||||||
@@ -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?",
|
||||||
"I’m sure": "I’m sure",
|
"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.",
|
"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",
|
||||||
|
|||||||
Reference in New Issue
Block a user