From d92d72061c0570f1c2b17a837cdc84c36182751c Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 7 Aug 2024 12:46:30 +0300 Subject: [PATCH] Fixed Bug 69551 - Files.Info.History: Fixed "Documents" type in info panel --- packages/client/public/locales/en/InfoPanel.json | 1 + .../History/HistoryBlockContent/MainTextFolderInfo.tsx | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/client/public/locales/en/InfoPanel.json b/packages/client/public/locales/en/InfoPanel.json index 105dbdb5c1..f295708b17 100644 --- a/packages/client/public/locales/en/InfoPanel.json +++ b/packages/client/public/locales/en/InfoPanel.json @@ -12,6 +12,7 @@ "FeedLocationLabel": "Folder «{{folderTitle}}»", "FeedLocationLabelFrom": "from «{{folderTitle}}»", "FeedLocationRoomLabel": "Room «{{folderTitle}}»", + "FeedLocationSectionLabel": "Section «{{folderTitle}}»", "FileConverted": "File converted.", "FileCopied": "Files copied.", "FileCopiedTo": "Files copied to «{{folderTitle}}»", diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx b/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx index 05a4f70a4d..2355bca26a 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx @@ -27,6 +27,7 @@ import { withTranslation } from "react-i18next"; import { inject, observer } from "mobx-react"; import { TTranslation } from "@docspace/shared/types"; +import { FolderType } from "@docspace/shared/enums"; import { StyledHistoryBlockMessage } from "../../../styles/history"; type HistoryMainTextFolderInfoProps = { @@ -54,12 +55,15 @@ const HistoryMainTextFolderInfo = ({ if (!parentTitle) return null; - const isFolder = parentType === 0; - const isFromFolder = fromParentType === 0; + const isSection = parentType === FolderType.USER; + const isFolder = parentType === FolderType.DEFAULT; + const isFromFolder = fromParentType === FolderType.DEFAULT; const destination = isFolder ? t("FeedLocationLabel", { folderTitle: parentTitle }) - : t("FeedLocationRoomLabel", { folderTitle: parentTitle }); + : isSection + ? t("FeedLocationSectionLabel", { folderTitle: parentTitle }) + : t("FeedLocationRoomLabel", { folderTitle: parentTitle }); const sourceDestination = isFromFolder ? t("FeedLocationLabelFrom", { folderTitle: fromParentTitle })