Fix bug 66939 - Settings: Spaces. "Resource cannot be found" after redirect to restore page.

This commit is contained in:
Tatiana Lopaeva 2024-03-20 14:27:20 +03:00
parent 8b5274a4a0
commit c8c8010029
8 changed files with 47 additions and 36 deletions

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-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
@ -29,7 +29,7 @@ import { ModalDialog } from "@docspace/shared/components/modal-dialog";
import { withTranslation, I18nextProvider } from "react-i18next";
import i18n from "./i18n";
import { inject, observer } from "mobx-react";
import PreparationPortal from "SRC_DIR/pages/PreparationPortal";
import PreparationPortal from "@docspace/shared/pages/PreparationPortal";
import StyledPreparationPortalDialog from "./StyledPreparationPortalDialog";
const PreparationPortalDialog = (props) => {
const { t, tReady, preparationPortalVisible, setVisible } = props;

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-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
@ -55,7 +55,7 @@ const PublicRoom = loadable(() =>
const About = loadable(() => componentLoader(() => import("../pages/About")));
const Wizard = loadable(() => componentLoader(() => import("../pages/Wizard")));
const PreparationPortal = loadable(() =>
componentLoader(() => import("../pages/PreparationPortal")),
componentLoader(() => import("@docspace/shared/pages/PreparationPortal")),
);
const PortalUnavailable = loadable(() =>
componentLoader(() => import("../pages/PortalUnavailable")),

View File

@ -105,7 +105,7 @@ const App = observer(() => {
<NavMenu hideProfileMenu customHeader={<SimpleHeader />} />
<Main isDesktop={false}>
<div className="main-container">
<MainLayout>
<MainLayout isPortalRestoring={settingsStore?.isPortalRestoring}>
<Outlet />
</MainLayout>
</div>

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-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
@ -32,12 +32,14 @@ import ArticleWrapper from "./Article";
type TLayoutProps = {
children: React.ReactNode;
isPortalRestoring: boolean | undefined;
};
const MainLayout = ({ children }: TLayoutProps) => {
const MainLayout = ({ children, isPortalRestoring }: TLayoutProps) => {
console.log("isPortalRestoring", isPortalRestoring);
return (
<>
<ArticleWrapper />
{!isPortalRestoring && <ArticleWrapper />}
<Section children={children} />
</>
);

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-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
@ -41,6 +41,7 @@ import Payments from "./categories/payments";
import ErrorBoundary from "./components/ErrorBoundaryWrapper";
import Error404 from "@docspace/shared/components/errors/Error404";
import PreparationPortal from "@docspace/shared/pages/PreparationPortal";
const routes = [
{
@ -94,6 +95,10 @@ const routes = [
path: "payments",
element: <Payments />,
},
{
path: "preparation-portal",
element: <PreparationPortal />,
},
],
},
];

View File

@ -23,17 +23,17 @@
// 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, { useEffect, useState } from "react";
import ErrorContainer from "@docspace/shared/components/error-container/ErrorContainer";
import { withTranslation } from "react-i18next";
import PropTypes from "prop-types";
import { observer, inject } from "mobx-react";
import ErrorContainer from "@docspace/shared/components/error-container/ErrorContainer";
import { StyledPreparationPortal } from "./StyledPreparationPortal";
import { Text } from "@docspace/shared/components/text";
import { getRestoreProgress } from "@docspace/shared/api/portal";
import { observer, inject } from "mobx-react";
import PropTypes from "prop-types";
import { ColorTheme, ThemeId } from "@docspace/shared/components/color-theme";
import { Text } from "../../components/text";
import { getRestoreProgress } from "../../api/portal";
import { ColorTheme, ThemeId } from "../../components/color-theme";
const baseSize = 1073741824; //number of bytes in one GB
const unSizeMultiplicationFactor = 3;

View File

@ -618,6 +618,10 @@ class SettingsStore {
return this.tenantStatus === TenantStatus.PortalDeactivate;
}
get isPortalRestoring() {
return this.tenantStatus === TenantStatus.PortalRestore;
}
init = async () => {
this.setIsLoading(true);
const requests = [];