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

This commit is contained in:
Alexey Safronov 2024-07-22 17:23:04 +04:00
commit 58eee4ddaf
3 changed files with 68 additions and 53 deletions

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

@ -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 };