Fix Bug 69003 - Hide history display for rooms based on third-party storage.

This commit is contained in:
Tatiana Lopaeva 2024-07-08 13:00:54 +03:00
parent e508270a43
commit 0d7a02a7fc
5 changed files with 100 additions and 1 deletions

View File

@ -27,9 +27,11 @@
"GalleryEmptyScreenText": "See form template details here",
"GroupsEmptyScreenText": "See group details here",
"HistoryEmptyScreenText": "Activity history will be shown here",
"HistoryThirdParty": "History display is not available for public rooms with connected third-party storages",
"InfoBanner": "The list of invited users includes the owner and/or admins of this {{productName}} with full access to all rooms. The owner and/or administrator cannot be assigned other access rights. Once added to the room, they will be notified of all changes.",
"ItemsSelected": "Items selected",
"LastModifiedBy": "Last modified by",
"NoRecordsFound": "No records found",
"Properties": "Properties",
"RoomCreated": "<1>«{{roomTitle}}»</1> room created",
"RoomCreateUser": "Users added.",

View File

@ -0,0 +1,56 @@
// (c) Copyright Ascensio System SIA 2009-2024
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import React from "react";
import { useTranslation } from "react-i18next";
import styled, { useTheme } from "styled-components";
import { EmptyScreenContainer } from "@docspace/shared/components/empty-screen-container";
import EmptyCanceledLight from "PUBLIC_DIR/images/emptyview/empty.canceled.light.svg?url";
import EmptyCanceledDark from "PUBLIC_DIR/images/emptyview/empty.canceled.dark.svg?url";
const StyledEmptyScreenContainer = styled(EmptyScreenContainer)`
.ec-image {
width: 75px;
height: 75px;
}
`;
const ThirdPartyComponent = () => {
const { t } = useTranslation("InfoPanel");
const theme = useTheme();
return (
<StyledEmptyScreenContainer
imageSrc={theme.isBase ? EmptyCanceledLight : EmptyCanceledDark}
headerText={t("NoRecordsFound")}
descriptionText={t("HistoryThirdParty")}
imageAlt={t("NoRecordsFound")}
/>
);
};
export default ThirdPartyComponent;

View File

@ -34,6 +34,7 @@ import InfoPanelViewLoader from "@docspace/shared/skeletons/info-panel/body";
import { getRelativeDateDay } from "./../../helpers/HistoryHelper";
import HistoryBlock from "./HistoryBlock";
import NoHistory from "../NoItem/NoHistory";
import ThirdPartyComponent from "./HistoryBlockContent/ThirdParty";
const History = ({
t,
@ -54,6 +55,8 @@ const History = ({
const [isLoading, setIsLoading] = useState(false);
const [isShowLoader, setIsShowLoader] = useState(false);
const isThirdParty = infoPanelSelection?.providerType;
const getHistory = async (item) => {
if (!item?.id) return;
if (isLoading) {
@ -69,7 +72,8 @@ const History = ({
};
useEffect(() => {
if (!isMount.current) return;
if (!isMount.current || isThirdParty) return;
getHistory(infoPanelSelection);
}, [
infoPanelSelection.id,
@ -85,6 +89,8 @@ const History = ({
};
}, []);
if (isThirdParty) return <ThirdPartyComponent />;
if (!selectionHistory) {
if (isShowLoader) return <InfoPanelViewLoader view="history" />;
return null;

View File

@ -0,0 +1,14 @@
<svg width="75" height="75" viewBox="0 0 75 75" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 43.7044V64C8 65.996 9.75686 68 11.913 68H58.087C60.2359 68 62 66.3682 62 64.3654V61.6142V18.0602V5.72021V4.63456C62 2.63184 60.2359 1 58.087 1H22L8 15V43.7044Z" fill="#ADADAD"/>
<path d="M22.5 1C22.5 0.797769 22.3782 0.615451 22.1913 0.53806C22.0045 0.46067 21.7894 0.503448 21.6464 0.646447L14.6464 7.64645L7.64645 14.6464C7.50345 14.7894 7.46067 15.0045 7.53806 15.1913C7.61545 15.3782 7.79777 15.5 8 15.5H19C20.933 15.5 22.5 13.933 22.5 12V1Z" fill="#5C5C5C" stroke="#333333" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M61.0325 2.25185C60.6529 1.91005 60.2233 1.62857 59.7538 1.41746C59.1545 1.14603 58.4852 1.00529 57.7959 1.00529H22L7.99895 15V63.5C7.99895 64.4249 8.25868 65.2995 8.69822 66.0333C9.07782 66.6667 9.59728 67.1995 10.2066 67.6116C10.846 68.0339 10.3765 68.9185 9.71716 68.4862C8.95795 67.9937 8.31862 67.3302 7.84911 66.5561C7.30968 65.6614 7 64.6159 7 63.5V14.5898C13.3134 8.22635 15.2725 6.35344 21.5859 0L57.7859 0C58.625 0 59.4242 0.180952 60.1534 0.502645C60.7628 0.774074 61.3122 1.14603 61.7917 1.59841C62.3311 2.10106 61.6518 2.80476 61.0325 2.25185Z" fill="#333333"/>
<path d="M28 6.5H27.7929L27.6464 6.64645L13.9393 20.3536C13.658 20.6349 13.5 21.0164 13.5 21.4142V71C13.5 72.933 15.067 74.5 17 74.5H64C65.933 74.5 67.5 72.933 67.5 71L67.4999 9.99999C67.4999 8.067 65.9329 6.5 63.9999 6.5H28Z" fill="#333333"/>
<path d="M28 6.5H27.7929L27.6464 6.64645L13.9393 20.3536C13.658 20.6349 13.5 21.0164 13.5 21.4142V71C13.5 72.933 15.067 74.5 17 74.5H64C65.933 74.5 67.5 72.933 67.5 71L67.4999 9.99999C67.4999 8.067 65.9329 6.5 63.9999 6.5H28Z" fill="white" fill-opacity="0.88"/>
<path d="M28 6.5H27.7929L27.6464 6.64645L13.9393 20.3536C13.658 20.6349 13.5 21.0164 13.5 21.4142V71C13.5 72.933 15.067 74.5 17 74.5H64C65.933 74.5 67.5 72.933 67.5 71L67.4999 9.99999C67.4999 8.067 65.9329 6.5 63.9999 6.5H28Z" stroke="#333333"/>
<path d="M28.5 7C28.5 6.79777 28.3782 6.61545 28.1913 6.53806C28.0045 6.46067 27.7894 6.50345 27.6464 6.64645L20.6464 13.6464L13.6464 20.6464C13.5034 20.7894 13.4607 21.0045 13.5381 21.1913C13.6155 21.3782 13.7978 21.5 14 21.5H25C26.933 21.5 28.5 19.933 28.5 18V7Z" fill="#E07751" stroke="#333333" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.5 66C30.2831 66 22 57.7169 22 47.5C22 37.2831 30.2831 29 40.5 29C50.7169 29 59 37.2831 59 47.5C59.008 57.7169 50.7249 66 40.5 66Z" fill="#333333"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.5 65C30.8354 65 23 57.1646 23 47.5C23 37.8354 30.8354 30 40.5 30C50.1646 30 58 37.8354 58 47.5C58.0076 57.1646 50.1722 65 40.5 65Z" fill="#E07751"/>
<path d="M47.2784 37.2953L47.2532 37.2702L47.2248 37.2489C46.7923 36.9245 46.1472 36.8628 45.7146 37.2953L40.5001 42.5099L35.2856 37.2953C34.8531 36.8628 34.2079 36.9245 33.7754 37.2489L33.747 37.2702L33.7219 37.2953L30.2953 40.7218L30.2702 40.747L30.2489 40.7754C29.9245 41.2079 29.8628 41.8531 30.2953 42.2856L30.6489 41.932L30.2953 42.2856L35.5099 47.5001L30.2953 52.7146L30.2702 52.7397L30.2489 52.7682C29.9245 53.2007 29.8628 53.8458 30.2953 54.2784L33.7219 57.7049L33.747 57.73L33.7754 57.7513C34.2079 58.0757 34.8531 58.1374 35.2856 57.7049L40.5001 52.4903L45.7146 57.7049L45.7398 57.73L45.7682 57.7513C46.2007 58.0757 46.8458 58.1374 47.2784 57.7049L50.7049 54.2784L50.73 54.2532L50.7513 54.2248C51.0757 53.7923 51.1374 53.1471 50.7049 52.7146L45.4903 47.5001L50.7049 42.2856L50.73 42.2605L50.7513 42.232C51.0757 41.7995 51.1374 41.1544 50.7049 40.7218L47.2784 37.2953Z" fill="#333333"/>
<path d="M47.2784 37.2953L47.2532 37.2702L47.2248 37.2489C46.7923 36.9245 46.1472 36.8628 45.7146 37.2953L40.5001 42.5099L35.2856 37.2953C34.8531 36.8628 34.2079 36.9245 33.7754 37.2489L33.747 37.2702L33.7219 37.2953L30.2953 40.7218L30.2702 40.747L30.2489 40.7754C29.9245 41.2079 29.8628 41.8531 30.2953 42.2856L30.6489 41.932L30.2953 42.2856L35.5099 47.5001L30.2953 52.7146L30.2702 52.7397L30.2489 52.7682C29.9245 53.2007 29.8628 53.8458 30.2953 54.2784L33.7219 57.7049L33.747 57.73L33.7754 57.7513C34.2079 58.0757 34.8531 58.1374 35.2856 57.7049L40.5001 52.4903L45.7146 57.7049L45.7398 57.73L45.7682 57.7513C46.2007 58.0757 46.8458 58.1374 47.2784 57.7049L50.7049 54.2784L50.73 54.2532L50.7513 54.2248C51.0757 53.7923 51.1374 53.1471 50.7049 52.7146L45.4903 47.5001L50.7049 42.2856L50.73 42.2605L50.7513 42.232C51.0757 41.7995 51.1374 41.1544 50.7049 40.7218L47.2784 37.2953Z" fill="white" fill-opacity="0.88"/>
<path d="M47.2784 37.2953L47.2532 37.2702L47.2248 37.2489C46.7923 36.9245 46.1472 36.8628 45.7146 37.2953L40.5001 42.5099L35.2856 37.2953C34.8531 36.8628 34.2079 36.9245 33.7754 37.2489L33.747 37.2702L33.7219 37.2953L30.2953 40.7218L30.2702 40.747L30.2489 40.7754C29.9245 41.2079 29.8628 41.8531 30.2953 42.2856L30.6489 41.932L30.2953 42.2856L35.5099 47.5001L30.2953 52.7146L30.2702 52.7397L30.2489 52.7682C29.9245 53.2007 29.8628 53.8458 30.2953 54.2784L33.7219 57.7049L33.747 57.73L33.7754 57.7513C34.2079 58.0757 34.8531 58.1374 35.2856 57.7049L40.5001 52.4903L45.7146 57.7049L45.7398 57.73L45.7682 57.7513C46.2007 58.0757 46.8458 58.1374 47.2784 57.7049L50.7049 54.2784L50.73 54.2532L50.7513 54.2248C51.0757 53.7923 51.1374 53.1471 50.7049 52.7146L45.4903 47.5001L50.7049 42.2856L50.73 42.2605L50.7513 42.232C51.0757 41.7995 51.1374 41.1544 50.7049 40.7218L47.2784 37.2953Z" stroke="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,21 @@
<svg width="75" height="75" viewBox="0 0 75 75" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 43.7044V64C8 65.996 9.75686 68 11.913 68H58.087C60.2359 68 62 66.3682 62 64.3654V61.6142V18.0602V5.72021V4.63456C62 2.63184 60.2359 1 58.087 1H22L8 15V43.7044Z" fill="#EFEFEF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19 15C20.6569 15 22 13.6569 22 12V1L15 8L8 15H19Z" fill="#D9F4FF"/>
<path d="M22.5 1C22.5 0.797769 22.3782 0.615451 22.1913 0.53806C22.0045 0.46067 21.7894 0.503448 21.6464 0.646447L14.6464 7.64645L7.64645 14.6464C7.50345 14.7894 7.46067 15.0045 7.53806 15.1913C7.61545 15.3782 7.79777 15.5 8 15.5H19C20.933 15.5 22.5 13.933 22.5 12V1Z" stroke="#333333" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M61.0325 2.25185C60.6529 1.91005 60.2233 1.62857 59.7538 1.41746C59.1545 1.14603 58.4852 1.00529 57.7959 1.00529H22L7.99895 15V63.5C7.99895 64.4249 8.25868 65.2995 8.69822 66.0333C9.07782 66.6667 9.59728 67.1995 10.2066 67.6116C10.846 68.0339 10.3765 68.9185 9.71716 68.4862C8.95795 67.9937 8.31862 67.3302 7.84911 66.5561C7.30968 65.6614 7 64.6159 7 63.5V14.5898C13.3134 8.22635 15.2725 6.35344 21.5859 0L57.7859 0C58.625 0 59.4242 0.180952 60.1534 0.502645C60.7628 0.774074 61.3122 1.14603 61.7917 1.59841C62.3311 2.10106 61.6518 2.80476 61.0325 2.25185Z" fill="#333333"/>
<path d="M28 6.5H27.7929L27.6464 6.64645L13.9393 20.3536C13.658 20.6349 13.5 21.0164 13.5 21.4142V71C13.5 72.933 15.067 74.5 17 74.5H64C65.933 74.5 67.5 72.933 67.5 71L67.4999 9.99999C67.4999 8.067 65.9329 6.5 63.9999 6.5H28Z" fill="#FEFEFE" stroke="#333333"/>
<path d="M28.5 7C28.5 6.79777 28.3782 6.61545 28.1913 6.53806C28.0045 6.46067 27.7894 6.50345 27.6464 6.64645L20.6464 13.6464L13.6464 20.6464C13.5034 20.7894 13.4607 21.0045 13.5381 21.1913C13.6155 21.3782 13.7978 21.5 14 21.5H25C26.933 21.5 28.5 19.933 28.5 18V7Z" fill="url(#paint0_linear_6654_172960)" stroke="#333333" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.5 65C30.2831 65 22 56.7169 22 46.5C22 36.2831 30.2831 28 40.5 28C50.7169 28 59 36.2831 59 46.5C59.008 56.7169 50.7249 65 40.5 65Z" fill="#333333"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.5 64C30.8354 64 23 56.1646 23 46.5C23 36.8354 30.8354 29 40.5 29C50.1646 29 58 36.8354 58 46.5C58.0076 56.1646 50.1722 64 40.5 64Z" fill="url(#paint1_linear_6654_172960)"/>
<path d="M47.2784 36.2953L47.2532 36.2702L47.2248 36.2489C46.7923 35.9245 46.1472 35.8628 45.7146 36.2953L40.5001 41.5099L35.2856 36.2953C34.8531 35.8628 34.2079 35.9245 33.7754 36.2489L33.747 36.2702L33.7219 36.2953L30.2953 39.7218L30.2702 39.747L30.2489 39.7754C29.9245 40.2079 29.8628 40.8531 30.2953 41.2856L30.6489 40.932L30.2953 41.2856L35.5099 46.5001L30.2953 51.7146L30.2702 51.7397L30.2489 51.7682C29.9245 52.2007 29.8628 52.8458 30.2953 53.2784L33.7219 56.7049L33.747 56.73L33.7754 56.7513C34.2079 57.0757 34.8531 57.1374 35.2856 56.7049L40.5001 51.4903L45.7146 56.7049L45.7398 56.73L45.7682 56.7513C46.2007 57.0757 46.8458 57.1374 47.2784 56.7049L50.7049 53.2784L50.73 53.2532L50.7513 53.2248C51.0757 52.7923 51.1374 52.1471 50.7049 51.7146L45.4903 46.5001L50.7049 41.2856L50.73 41.2605L50.7513 41.232C51.0757 40.7995 51.1374 40.1544 50.7049 39.7218L47.2784 36.2953Z" fill="white" stroke="#333333"/>
<defs>
<linearGradient id="paint0_linear_6654_172960" x1="14" y1="6.45312" x2="28" y2="21" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF8E3D"/>
<stop offset="1" stop-color="#FF6F3D"/>
</linearGradient>
<linearGradient id="paint1_linear_6654_172960" x1="22.4747" y1="26.6372" x2="43.2222" y2="49.4899" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC671"/>
<stop offset="1" stop-color="#FF6F3D"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB