From 71fd8068227f02f01dd32efbce4ada93473eb5ee Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 21 Aug 2024 23:15:54 +0300 Subject: [PATCH 1/4] Shared: SettingsStore: add license url --- packages/shared/store/SettingsStore.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/shared/store/SettingsStore.ts b/packages/shared/store/SettingsStore.ts index f624db9937..7b43a14374 100644 --- a/packages/shared/store/SettingsStore.ts +++ b/packages/shared/store/SettingsStore.ts @@ -257,6 +257,8 @@ class SettingsStore { apiDocsLink = null; + licenseUrl = null; + bookTrainingEmail = null; hotkeyPanelVisible = false; From c37e297ca4c64fb0d67d9e38796dbeb16d07da09 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 21 Aug 2024 23:16:01 +0300 Subject: [PATCH 2/4] Web: add translate --- public/locales/en/Common.json | 1 + 1 file changed, 1 insertion(+) diff --git a/public/locales/en/Common.json b/public/locales/en/Common.json index 0c7b883011..5fa9369ab3 100644 --- a/public/locales/en/Common.json +++ b/public/locales/en/Common.json @@ -52,6 +52,7 @@ "ComingSoon": "Coming soon", "Comment": "Comment", "Comments": "Comments", + "Commercial": "Commercial", "Common": "Common", "CommonFiles": "Common files", "CompanyName": "Company name", From f8e36e3b5febe589bfe571f725cb717ed5cd96f2 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 21 Aug 2024 23:16:41 +0300 Subject: [PATCH 3/4] Client: About: add commercial license url --- .../client/src/pages/About/AboutContent.js | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/packages/client/src/pages/About/AboutContent.js b/packages/client/src/pages/About/AboutContent.js index eb462d49c1..99cbe948ab 100644 --- a/packages/client/src/pages/About/AboutContent.js +++ b/packages/client/src/pages/About/AboutContent.js @@ -100,10 +100,17 @@ const StyledAboutBody = styled.div` `; const AboutContent = (props) => { - const { buildVersionInfo, theme, companyInfoSettingsData, previewData } = - props; - const { t } = useTranslation("About"); - const license = "AGPL-3.0"; + const { + buildVersionInfo, + theme, + companyInfoSettingsData, + previewData, + standalone, + licenseUrl, + } = props; + const { t } = useTranslation(["About", "Common"]); + const isCommercial = !standalone; + const license = isCommercial ? t("Common:Commercial") : "AGPL-3.0"; const linkRepo = "https://github.com/ONLYOFFICE/DocSpace"; const linkDocs = "https://github.com/ONLYOFFICE/DocumentServer"; @@ -198,9 +205,25 @@ const AboutContent = (props) => { {t("SoftwareLicense")}:{" "} - -  {license} - + {isCommercial ? ( + +  {license} + + ) : ( + +  {license} + + )} @@ -269,10 +292,13 @@ const AboutContent = (props) => { }; export default inject(({ settingsStore }) => { - const { theme, companyInfoSettingsData } = settingsStore; + const { theme, companyInfoSettingsData, standalone, licenseUrl } = + settingsStore; return { theme, companyInfoSettingsData, + standalone, + licenseUrl, }; })(observer(AboutContent)); From d925b01a55682369a1910771636c52365acd7b30 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Thu, 22 Aug 2024 13:21:19 +0300 Subject: [PATCH 4/4] Client: About: fix --- packages/client/src/pages/About/AboutContent.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/client/src/pages/About/AboutContent.js b/packages/client/src/pages/About/AboutContent.js index 99cbe948ab..839c521904 100644 --- a/packages/client/src/pages/About/AboutContent.js +++ b/packages/client/src/pages/About/AboutContent.js @@ -107,9 +107,10 @@ const AboutContent = (props) => { previewData, standalone, licenseUrl, + isEnterprise, } = props; const { t } = useTranslation(["About", "Common"]); - const isCommercial = !standalone; + const isCommercial = !standalone || isEnterprise; const license = isCommercial ? t("Common:Commercial") : "AGPL-3.0"; const linkRepo = "https://github.com/ONLYOFFICE/DocSpace"; const linkDocs = "https://github.com/ONLYOFFICE/DocumentServer"; @@ -291,14 +292,16 @@ const AboutContent = (props) => { ); }; -export default inject(({ settingsStore }) => { +export default inject(({ settingsStore, currentTariffStatusStore }) => { const { theme, companyInfoSettingsData, standalone, licenseUrl } = settingsStore; + const { isEnterprise } = currentTariffStatusStore; return { theme, companyInfoSettingsData, standalone, licenseUrl, + isEnterprise, }; })(observer(AboutContent));