Fix bug 63605 - Paid portal is not added to the list of connected ones if the payment is overdue on it.

This commit is contained in:
Tatiana Lopaeva 2023-08-11 18:20:58 +03:00
parent d045d0d303
commit 012cc69ce0
3 changed files with 54 additions and 5 deletions

View File

@ -175,7 +175,6 @@ class FilesContent extends React.Component {
const pathname = window.location.pathname.toLowerCase();
this.isEditor = pathname.indexOf("doceditor") !== -1;
this.isDesktopInit = false;
}
componentDidMount() {
@ -205,10 +204,13 @@ class FilesContent extends React.Component {
setEncryptionKeys,
isLoaded,
isDesktop,
isDesktopClientInit,
setIsDesktopClientInit,
} = this.props;
// console.log("componentDidUpdate: ", this.props);
if (isAuthenticated && !this.isDesktopInit && isDesktop && isLoaded) {
this.isDesktopInit = true;
if (isAuthenticated && !isDesktopClientInit && isDesktop && isLoaded) {
setIsDesktopClientInit(true);
regDesktop(
user,
isEncryption,
@ -255,6 +257,8 @@ const Files = inject(({ auth, filesStore }) => {
encryptionKeys,
setEncryptionKeys,
isEncryptionSupport,
isDesktopClientInit,
setIsDesktopClientInit,
} = auth.settingsStore;
const { isVisitor } = auth.userStore.user;
@ -263,6 +267,8 @@ const Files = inject(({ auth, filesStore }) => {
return {
isDesktop: isDesktopClient,
isDesktopClientInit,
setIsDesktopClientInit,
isFrame,
showMenu: frameConfig?.showMenu,
user: auth.userStore.user,

View File

@ -4,6 +4,7 @@ import { inject, observer } from "mobx-react";
import moment from "moment";
import { useTranslation } from "react-i18next";
import { regDesktop } from "@docspace/common/desktop";
import Loaders from "@docspace/common/components/Loaders";
import { setDocumentTitle } from "@docspace/client/src/helpers/filesUtils";
@ -18,11 +19,32 @@ const SaaSPage = ({
isUpdatingTariff,
isUpdatingBasicSettings,
resetTariffContainerToBasic,
user,
encryptionKeys,
isEncryption,
setEncryptionKeys,
isDesktop,
isDesktopClientInit,
setIsDesktopClientInit,
}) => {
const { t, ready } = useTranslation(["Payments", "Common", "Settings"]);
useEffect(() => {
moment.locale(language);
if (isDesktop && !isDesktopClientInit) {
setIsDesktopClientInit(true);
regDesktop(
user,
isEncryption,
encryptionKeys,
setEncryptionKeys,
false,
null,
t
);
}
return () => resetTariffContainerToBasic();
}, []);
@ -52,8 +74,10 @@ export default inject(({ auth, payments }) => {
currentQuotaStore,
currentTariffStatusStore,
isUpdatingTariff,
userStore,
settingsStore,
} = auth;
const { user } = userStore;
const { isLoaded: isLoadedCurrentQuota } = currentQuotaStore;
const { isLoaded: isLoadedTariffStatus } = currentTariffStatusStore;
const {
@ -62,8 +86,22 @@ export default inject(({ auth, payments }) => {
isUpdatingBasicSettings,
resetTariffContainerToBasic,
} = payments;
const {
isEncryptionSupport,
setEncryptionKeys,
encryptionKeys,
isDesktopClient,
isDesktopClientInit,
setIsDesktopClientInit,
} = settingsStore;
return {
isDesktopClientInit,
setIsDesktopClientInit,
isDesktop: isDesktopClient,
user,
encryptionKeys,
isEncryption: isEncryptionSupport,
setEncryptionKeys,
resetTariffContainerToBasic,
isUpdatingTariff,
init,

View File

@ -79,6 +79,7 @@ class SettingsStore {
logoUrl = "";
isDesktopClient = isDesktopEditors;
isDesktopClientInit = false;
//isDesktopEncryption: desktopEncryption;
isEncryptionSupport = false;
encryptionKeys = null;
@ -301,6 +302,10 @@ class SettingsStore {
return this.isLoaded && !this.wizardToken;
}
setIsDesktopClientInit = (isDesktopClientInit) => {
this.isDesktopClientInit = isDesktopClientInit;
};
setMainBarVisible = (visible) => {
this.mainBarVisible = visible;
};