Web: Client: Data Import: restored

This commit is contained in:
Elyor Djalilov 2024-07-30 15:56:52 +05:00
parent c89d0a6368
commit f79c316f6f
25 changed files with 16 additions and 17 deletions

View File

@ -51,11 +51,7 @@ const GoogleWorkspace = (props: WorkspaceProps) => {
"Common, SMTPSettings, Settings",
]);
const StepsData = getStepsData(
t,
filteredUsers.length === 0,
t("Common:OrganizationName"),
);
const StepsData = getStepsData(t, filteredUsers.length === 0);
useLayoutEffect(() => {
if (migratingWorkspace === "GoogleWorkspace" && !isMigrationInit) {
@ -68,6 +64,7 @@ const GoogleWorkspace = (props: WorkspaceProps) => {
}
setIsMigrationInit(true);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
if (!ready) return <SelectFileLoader />;
@ -81,7 +78,6 @@ const GoogleWorkspace = (props: WorkspaceProps) => {
title={StepsData[step - 1].title}
description={StepsData[step - 1].description}
component={StepsData[step - 1].component}
organizationName={t("Common:OrganizationName")}
/>
);
};

View File

@ -64,6 +64,7 @@ const NextcloudWorkspace = (props: WorkspaceProps) => {
}
setIsMigrationInit(true);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
if (!ready) return <SelectFileLoader />;

View File

@ -64,6 +64,7 @@ const OnlyofficeWorkspace = (props: WorkspaceProps) => {
}
setIsMigrationInit(true);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
if (!ready) return <SelectFileLoader />;

View File

@ -24,7 +24,7 @@
// 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 styled, { css } from "styled-components";
import styled from "styled-components";
import { tablet, mobile } from "@docspace/shared/utils/device";
import { TableContainer } from "@docspace/shared/components/table";

View File

@ -180,6 +180,7 @@ const ImportStep = (props: ImportStepProps) => {
workspace: t("Common:ProductName"),
sectionIcon: RoomsIcon,
}}
isDisabled={false}
/>
<ImportSection
isChecked={importOptions.importCommonFiles}

View File

@ -196,9 +196,12 @@ const SelectUsersStep = (props: SelectUsersStepProps) => {
)}
</>
) : (
<Text fontWeight={600} lineHeight="20px" className="mb-17">
{t("Settings:AddEmailsWarning")}
</Text>
<>
<Text fontWeight={600} lineHeight="20px" className="mb-17">
{t("Settings:AddEmailsWarning")}
</Text>
{Buttons}
</>
)}
{filteredAccounts.length > 0 && Buttons}

View File

@ -26,7 +26,7 @@
import { inject, observer } from "mobx-react";
import { tablet } from "@docspace/shared/utils/device";
import styled, { css } from "styled-components";
import styled from "styled-components";
import { EmptyScreenContainer } from "@docspace/shared/components/empty-screen-container";
import { IconButton } from "@docspace/shared/components/icon-button";

View File

@ -27,9 +27,9 @@
import { useEffect, useCallback } from "react";
import { inject, observer } from "mobx-react";
import { useTranslation } from "react-i18next";
import useViewEffect from "SRC_DIR/Hooks/useViewEffect";
import { setDocumentTitle } from "SRC_DIR/helpers/utils";
import { toastr } from "@docspace/shared/components/toast";
import { setDocumentTitle } from "SRC_DIR/helpers/utils";
import useViewEffect from "SRC_DIR/Hooks/useViewEffect";
import { DataImportProps, InjectedDataImportProps } from "./types";
@ -140,7 +140,7 @@ const DataImport = (props: DataImportProps) => {
};
export default inject<TStore>(
({ authStore, settingsStore, setup, importAccountsStore }) => {
({ settingsStore, setup, importAccountsStore }) => {
const {
getMigrationStatus,
isMigrationInit,

View File

@ -76,7 +76,6 @@ export interface InjectedSelectFileStepProps extends SelectFileStepProps {
export interface DataImportProps {}
export interface InjectedDataImportProps extends DataImportProps {
setDocumentTitle: TStore["authStore"]["setDocumentTitle"];
getMigrationStatus: TStore["importAccountsStore"]["getMigrationStatus"];
viewAs: TStore["setup"]["viewAs"];
setViewAs: TStore["setup"]["setViewAs"];
@ -102,8 +101,6 @@ export interface InjectedWorkspaceProps extends WorkspaceProps {
migrationPhase: TStore["importAccountsStore"]["migrationPhase"];
isMigrationInit: TStore["importAccountsStore"]["isMigrationInit"];
setIsMigrationInit: TStore["importAccountsStore"]["setIsMigrationInit"];
setDocumentTitle: TStore["authStore"]["setDocumentTitle"];
}
export interface LayoutProps {