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

This commit is contained in:
Akmal Isomadinov 2024-07-22 18:56:48 +05:00
commit c0341ddb8b
7 changed files with 95 additions and 61 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

@ -84,7 +84,7 @@ const MainContainer = styled.div`
.download-text {
font-size: 13px;
padding: 24px 0;
padding: 16px 0 24px 0;
}
.storage-label {
@ -326,6 +326,9 @@ const HistoryMainContent = (props) => {
<Text fontSize="13px" className="login-history-description">
{subHeader}
</Text>
{/*
// This part is commented out because it is not used in the current version of the application
<Text className="latest-text settings_unavailable">{latestText} </Text>
<label
@ -380,7 +383,7 @@ const HistoryMainContent = (props) => {
isDisabled={isSettingNotPaid}
/>
</>
)}
)} */}
<Text className="download-text settings_unavailable">
{downloadText}
</Text>

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

@ -46,6 +46,7 @@ class SettingsSetupStore {
settingsStore = null;
tfaStore = null;
thirdPartyStore = null;
filesSettingsStore = null;
isInit = false;
logoutDialogVisible = false;
logoutAllDialogVisible = false;
@ -111,12 +112,19 @@ class SettingsSetupStore {
currentSession = [];
platformModalData = {};
constructor(tfaStore, authStore, settingsStore, thirdPartyStore) {
constructor(
tfaStore,
authStore,
settingsStore,
thirdPartyStore,
filesSettingsStore,
) {
this.selectionStore = new SelectionStore(this);
this.authStore = authStore;
this.tfaStore = tfaStore;
this.settingsStore = settingsStore;
this.thirdPartyStore = thirdPartyStore;
this.filesSettingsStore = filesSettingsStore;
makeAutoObservable(this);
}
@ -433,16 +441,21 @@ class SettingsSetupStore {
};
getLoginHistoryReport = async () => {
const { openOnNewPage } = this.filesSettingsStore;
const res = await api.settings.getLoginHistoryReport();
setTimeout(() => window.open(res), 100); //hack for ios
setTimeout(() => window.open(res, openOnNewPage ? "_blank" : "_self"), 100); //hack for ios
return this.setAuditTrailReport(res);
};
getAuditTrailReport = async () => {
const { openOnNewPage } = this.filesSettingsStore;
try {
this.setIsLoadingDownloadReport(true);
const res = await api.settings.getAuditTrailReport();
setTimeout(() => window.open(res), 100); //hack for ios
setTimeout(
() => window.open(res, openOnNewPage ? "_blank" : "_self"),
100,
); //hack for ios
return this.setAuditTrailReport(res);
} catch (error) {
console.error(error);

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

@ -96,12 +96,6 @@ const paymentStore = new PaymentStore(
paymentQuotasStore,
);
const wizardStore = new WizardStore();
const setupStore = new SettingsSetupStore(
tfaStore,
authStore,
settingsStore,
thirdPartyStore,
);
const confirmStore = new ConfirmStore();
const backupStore = new BackupStore();
const commonStore = new CommonStore(settingsStore);
@ -131,6 +125,14 @@ const filesSettingsStore = new FilesSettingsStore(
settingsStore,
);
const setupStore = new SettingsSetupStore(
tfaStore,
authStore,
settingsStore,
thirdPartyStore,
filesSettingsStore,
);
const accessRightsStore = new AccessRightsStore(
authStore,
selectedFolderStore,

View File

@ -41,53 +41,53 @@ const StyledCircle = styled.div<{
isAnimation?: boolean;
inConversion?: boolean;
}>`
.circle__mask,
.circle__fill {
width: 16px;
height: 16px;
position: absolute;
border-radius: 50%;
}
${(props) =>
props.percent === 0 || (props.isAnimation && props.inConversion)
? css`
.circle__fill {
animation: ${rotate360} 2s linear infinite;
transform: translate(0);
}
`
: css`
.circle__mask {
clip: rect(0px, 16px, 16px, 8px);
}
.circle__mask,
.circle__fill {
width: 16px;
height: 16px;
position: absolute;
border-radius: 50%;
}
.circle__fill {
animation: fill-rotate ease-in-out none;
transform: rotate(${props.percent * 1.8}deg);
}
`}
.circle__mask .circle__fill {
clip: rect(0px, 8px, 16px, 0px);
background-color: ${(props) =>
props.theme.filesPanels.upload.loadingButton.color};
${(props) =>
props.percent === 0 || (props.isAnimation && props.inConversion)
? css`
.circle__fill {
animation: ${rotate360} 2s linear infinite;
transform: translate(0);
}
`
: css`
.circle__mask {
clip: rect(0px, 16px, 16px, 8px);
}
.circle__fill {
animation: fill-rotate ease-in-out none;
transform: rotate(${props.percent * 1.8}deg);
}
`}
.circle__mask .circle__fill {
clip: rect(0px, 8px, 16px, 0px);
background-color: ${(props) =>
props.theme.filesPanels.upload.loadingButton.color};
}
.circle__mask.circle__full {
animation: fill-rotate ease-in-out none;
transform: rotate(${(props) => props.percent * 1.8}deg);
}
@keyframes fill-rotate {
0% {
transform: rotate(0deg);
}
.circle__mask.circle__full {
animation: fill-rotate ease-in-out none;
= transform: rotate(${(props) => props.percent * 1.8}deg);
100% {
transform: rotate(${(props) => props.percent * 1.8}deg);
}
@keyframes fill-rotate {
0% {
transform: rotate(0deg);
}
100% {
= transform: rotate(${(props) => props.percent * 1.8}deg);
}
}
`;
}
`;
StyledCircle.defaultProps = { theme: Base };