Client: About: add commercial license url

This commit is contained in:
Viktor Fomin 2024-08-21 23:16:41 +03:00
parent c37e297ca4
commit f8e36e3b5f

View File

@ -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) => {
<Text className="row-el" fontSize="13px">
{t("SoftwareLicense")}:{" "}
</Text>
{isCommercial ? (
<ColorTheme
{...props}
tag="a"
themeId={ThemeId.Link}
className="row-el"
fontSize="13px"
fontWeight="600"
href={licenseUrl}
target="_blank"
enableUserSelect
>
&nbsp;{license}
</ColorTheme>
) : (
<Text className="row-el" fontSize="13px" fontWeight="600">
&nbsp;{license}
</Text>
)}
</div>
<Text className="copyright" fontSize="14px" fontWeight="600">
@ -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));