Merge branch 'hotfix/v2.6.1' of github.com:ONLYOFFICE/DocSpace-client into hotfix/v2.6.1

This commit is contained in:
Akmal Isomadinov 2024-08-28 16:09:37 +05:00
commit 3b6efea18f
10 changed files with 42 additions and 9 deletions

View File

@ -37,6 +37,7 @@ import {
ConflictResolveDialogProps,
TActiveItem,
} from "./ConflictResolveDialog.types";
import { Text } from "@docspace/shared/components/text";
const ConflictResolveDialog = (props: ConflictResolveDialogProps) => {
const {
@ -217,7 +218,7 @@ const ConflictResolveDialog = (props: ConflictResolveDialogProps) => {
ns="Common"
i18nKey="FileActionRequired"
values={{ fileName: items[0].title }}
components={{ 1: <span className="bold" /> }}
components={{ 1: <span className="bold truncate" /> }}
/>
);

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 React, { useEffect } from "react";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { Loader } from "@docspace/shared/components/loader";
import Section from "@docspace/shared/components/section";
@ -42,6 +42,8 @@ const Auth = (props) => {
let [searchParams, setSearchParams] = useSearchParams();
const { t } = useTranslation(["Common"]);
const [authorized, setAuthorized] = useState(false);
const referenceUrl = searchParams.get("referenceUrl");
const isFileHandler =
referenceUrl && referenceUrl.indexOf("filehandler.ashx") !== -1;
@ -63,6 +65,7 @@ const Auth = (props) => {
try {
new URL(referenceUrl);
if (isFileHandler && isExternalDownloading) {
setAuthorized(true);
return;
} else {
return window.location.replace(referenceUrl);
@ -86,6 +89,7 @@ const Auth = (props) => {
return isFileHandler && isExternalDownloading ? (
<OperationContainer
url={referenceUrl}
authorized={authorized}
title={t("DownloadOperationTitle")}
description={t("DownloadOperationDescription")}
/>

View File

@ -67,6 +67,15 @@ const StyledCertificatesTable = styled.div`
.column-row {
display: flex;
.description {
color: ${(props) =>
props.theme.client.settings.integration.sso.textColor};
}
.error-description {
color: ${(props) =>
props.theme.client.settings.integration.sso.errorColor};
}
}
}

View File

@ -30,12 +30,13 @@ import FileSvgUrl from "PUBLIC_DIR/images/icons/32/file.svg?url";
import React from "react";
import { inject, observer } from "mobx-react";
import { useTranslation } from "react-i18next";
import moment from "moment-timezone";
import { ReactSVG } from "react-svg";
import { Text } from "@docspace/shared/components/text";
import { ContextMenuButton } from "@docspace/shared/components/context-menu-button";
import StyledCertificatesTable from "../styled-containers/StyledCertificatesTable";
import { ReactSVG } from "react-svg";
const CertificatesTable = (props) => {
const { t } = useTranslation(["SingleSignOn", "Common"]);
@ -50,7 +51,6 @@ const CertificatesTable = (props) => {
} = props;
const renderRow = (certificate, index) => {
console.log(prefix, index);
const onEdit = () => {
prefix === "sp"
? setSpCertificate(certificate, index, true)
@ -86,6 +86,8 @@ const CertificatesTable = (props) => {
return `${new Date(date).toLocaleDateString()}`;
};
const isExpired = moment().isAfter(moment(certificate.expiredDate));
return (
<div key={`certificate-${index}`} className="row">
<ReactSVG src={FileSvgUrl} />
@ -97,7 +99,7 @@ const CertificatesTable = (props) => {
</div>
<div className="column-row">
<Text
color="#a3a9ae"
className={isExpired ? "error-description" : "description"}
fontSize="12px"
fontWeight={600}
lineHeight="16px"

View File

@ -26,6 +26,7 @@
export interface IOperationContainer {
url?: string;
authorized: boolean;
title: string;
description: string;
}

View File

@ -35,7 +35,7 @@ import { Text } from "../text";
import PortalLogo from "../portal-logo/PortalLogo";
const OperationContainer = (props: IOperationContainer) => {
const { url, title, description } = props;
const { url, authorized, title, description } = props;
const theme = useTheme();
@ -46,8 +46,8 @@ const OperationContainer = (props: IOperationContainer) => {
);
useEffect(() => {
if (url) window.location.replace(url);
}, [url]);
if (url && authorized) window.location.replace(url);
}, [url, authorized]);
return (
<StyledOperationContainer>

View File

@ -39,6 +39,12 @@ const StyledModalDialog = styled(ModalDialog)`
.bold {
font-weight: 600;
}
.truncate {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.select-action {
@ -76,6 +82,10 @@ const StyledModalDialog = styled(ModalDialog)`
color: #a3a9ae;
}
}
.conflict-resolve_file-name {
display: flex;
}
`;
export default StyledModalDialog;

View File

@ -115,7 +115,9 @@ const ConflictResolve = (props: ConflictResolveProps) => {
>
<ModalDialog.Header>{headerLabel}</ModalDialog.Header>
<ModalDialog.Body>
<Text className="message">{messageText}</Text>
<Text truncate className="message conflict-resolve_file-name ">
{messageText}
</Text>
<Text className="select-action">{selectActionText}</Text>
<RadioButtonGroup
className="conflict-resolve-radio-button"

View File

@ -3064,6 +3064,8 @@ export const getBaseTheme = () => {
linkColor: link,
sso: {
textColor: gray,
errorColor: lightErrorStatus,
toggleContentBackground: grayLight,
iconButton: black,
iconButtonDisabled: gray,

View File

@ -3043,6 +3043,8 @@ const Dark: TTheme = {
linkColor: "#E06A1B",
sso: {
textColor: grayDark,
errorColor: darkErrorStatus,
toggleContentBackground: "#474747",
iconButton: white,
iconButtonDisabled: "#333",