Merge branch 'release/v2.6.0' of https://github.com/ONLYOFFICE/DocSpace-client into release/v2.6.0

This commit is contained in:
Nikita Gopienko 2024-07-22 15:12:13 +03:00
commit 1cd82dc5a4
6 changed files with 32 additions and 11 deletions

View File

@ -179,6 +179,7 @@ const WhiteLabel = (props) => {
options.fontSize,
isDocsEditorName ? "#fff" : "#000",
options.alignCenter,
options.isEditor,
);
const logoDark = generateLogo(
options.width,
@ -187,6 +188,7 @@ const WhiteLabel = (props) => {
options.fontSize,
"#fff",
options.alignCenter,
options.isEditor,
);
newLogos[i].path.light = logoLight;
newLogos[i].path.dark = logoDark;

View File

@ -34,14 +34,16 @@ export const generateLogo = (
text,
fontSize = 18,
fontColor = "#000",
alignCenter,
alignCenter = false,
isEditor = false,
) => {
const canvas = document.createElement("canvas");
canvas.width = width;
canvas.height = height;
console.log("isEditor", isEditor);
const ctx = canvas.getContext("2d");
const x = alignCenter ? width / 2 : 0;
const x = alignCenter ? width / 2 : isEditor ? 10 : 0;
const y = (height - fontSize) / 2;
ctx.fillStyle = "transparent";
ctx.clearRect(0, 0, width, height);
@ -87,6 +89,8 @@ export const getLogoOptions = (index, text, width, height) => {
text,
width,
height,
alignCenter: false,
isEditor: true,
};
case 4:
return {
@ -94,6 +98,8 @@ export const getLogoOptions = (index, text, width, height) => {
text,
width,
height,
alignCenter: false,
isEditor: true,
};
case 5:
return {

View File

@ -707,6 +707,14 @@ class UploadDataStore {
};
startUpload = (uploadFiles, folderId, t) => {
const withoutHiddenFiles = Object.values(uploadFiles).filter((f) => {
const isHidden = /(^|\/)\.[^\/\.]/g.test(f.name);
return !isHidden;
});
console.log("startUpload", { withoutHiddenFiles, uploadFiles });
const { canConvert } = this.filesSettingsStore;
const toFolderId = folderId ? folderId : this.selectedFolderStore.id;
@ -728,10 +736,10 @@ class UploadDataStore {
let filesSize = 0;
let convertSize = 0;
const uploadFilesArray = Object.keys(uploadFiles);
const uploadFilesArray = Object.keys(withoutHiddenFiles);
const hasFolder =
uploadFilesArray.findIndex((_, ind) => {
const file = uploadFiles[ind];
const file = withoutHiddenFiles[ind];
const filePath = file.path
? file.path
@ -746,13 +754,13 @@ class UploadDataStore {
if (this.uploaded) {
this.isParallel = false;
} else if (this.isParallel) {
this.tempFiles.push({ uploadFiles, folderId, t });
this.tempFiles.push({ withoutHiddenFiles, folderId, t });
return;
}
}
for (let index of uploadFilesArray) {
const file = uploadFiles[index];
const file = withoutHiddenFiles[index];
const parts = file.name.split(".");
const ext = parts.length > 1 ? "." + parts.pop() : "";

View File

@ -1,4 +1,3 @@
import { ConflictStateType } from "./../../types/index";
// (c) Copyright Ascensio System SIA 2009-2024
//
// This program is a free software product.
@ -24,5 +23,6 @@ import { ConflictStateType } from "./../../types/index";
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// 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 { ConflictStateType } from "./../../types/index";
export interface ConflictResolveProps extends ConflictStateType {}

View File

@ -43,16 +43,19 @@ export const CompletedFormLayout = styled.section<CompletedFormLayoutProps>`
}
width: 100%;
height: 100%;
padding: 100px 16px 0px;
height: 100dvh;
padding: 100px 16px 16px;
overflow-y: auto;
background-image: ${(props) => props.bgPattern};
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background-position: center;
picture {
margin-bottom: 125px;
margin-bottom: clamp(40px, 10vh, 125px);
}
.link {

View File

@ -140,7 +140,9 @@ export const CompletedForm = ({
};
const copyLinkFile = async () => {
const url = getFolderUrl(completedForm.folderId, false);
const origin = window.location.origin;
const url = `${origin}/doceditor?fileId=${completedForm.id}`;
await copyShareLink(url);
toastr.success(t("Common:LinkCopySuccess"));