Merge branch 'develop' into feature/ssr-confirm

This commit is contained in:
Darya Umrikhina 2024-08-16 02:26:23 +04:00
commit aa06f53703
15 changed files with 89 additions and 42 deletions

View File

@ -219,8 +219,8 @@ const StyledProperties = styled.div`
grid-template-columns: 120px 1fr;
grid-column-gap: 24px;
-webkit-box-align: center;
align-items: center;
-webkit-box-align: baseline;
align-items: baseline;
.property-title {
font-size: 13px;

View File

@ -138,15 +138,8 @@ class InsideGroupTableHeader extends React.Component {
newFilter.sortBy = sortBy;
if (sortBy === "AZ") {
if (
newFilter.sortBy !== "lastname" &&
newFilter.sortBy !== "firstname"
) {
newFilter.sortBy = "firstname";
} else if (newFilter.sortBy === "lastname") {
newFilter.sortBy = "firstname";
} else {
newFilter.sortBy = "lastname";
if (newFilter.sortBy !== "displayname") {
newFilter.sortBy = "displayname";
}
newFilter.sortOrder =
newFilter.sortOrder === "ascending" ? "descending" : "ascending";
@ -176,10 +169,7 @@ class InsideGroupTableHeader extends React.Component {
} = this.props;
const { sortOrder } = filter;
const sortBy =
filter.sortBy === "firstname" || filter.sortBy === "lastname"
? "AZ"
: filter.sortBy;
const sortBy = filter.sortBy === "displayname" ? "AZ" : filter.sortBy;
return (
<TableHeader

View File

@ -143,7 +143,7 @@ class PeopleTableHeader extends React.Component {
if (
newFilter.sortBy === sortBy ||
(sortBy === "AZ" && newFilter.sortBy === "firstname")
(sortBy === "AZ" && newFilter.sortBy === "displayname")
) {
newFilter.sortOrder =
newFilter.sortOrder === "ascending" ? "descending" : "ascending";
@ -151,7 +151,7 @@ class PeopleTableHeader extends React.Component {
newFilter.sortBy = sortBy;
if (sortBy === "AZ") {
newFilter.sortBy = "firstname";
newFilter.sortBy = "displayname";
}
}
@ -178,10 +178,7 @@ class PeopleTableHeader extends React.Component {
} = this.props;
const { sortOrder } = filter;
const sortBy =
filter.sortBy === "firstname" || filter.sortBy === "lastname"
? "AZ"
: filter.sortBy;
const sortBy = filter.sortBy === "displayname" ? "AZ" : filter.sortBy;
return (
<TableHeader

View File

@ -1961,16 +1961,9 @@ const SectionFilterContent = ({
const options = [];
const firstName = {
id: "sort-by_first-name",
key: "firstname",
label: t("Common:FirstName"),
default: true,
};
const lastName = {
id: "sort-by_last-name",
key: "lastname",
label: t("Common:LastName"),
id: "sort-by_displayname",
key: "displayname",
label: t("Common:Name"),
default: true,
};
@ -2012,7 +2005,7 @@ const SectionFilterContent = ({
hideableColumns.Storage = storage;
}
options.push(firstName, lastName, type, department, email);
options.push(firstName, type, department, email);
if (showStorageInfo) options.push(storage);
return options;

View File

@ -489,7 +489,7 @@ class LdapFormStore {
completed: true,
percents: 100,
certificateConfirmRequest: null,
error: "",
error: t("Common:UnexpectedError"),
};
}

View File

@ -347,7 +347,7 @@ class ProfileActionsStore {
let bookTraining = null;
if (!isMobile && this.isTeamTrainingAlertAvailable) {
if (!isMobile && this.authStore.isTeamTrainingAlertAvailable) {
bookTraining = {
key: "user-menu-book-training",
icon: BookTrainingReactSvgUrl,

View File

@ -30,6 +30,59 @@ import styled from "styled-components";
import { mobile, tablet } from "@docspace/shared/utils";
const DESKTOP_WIDTH = 384;
const TABLET_WIDTH = 480;
export const StyledCreateUserContent = styled.div`
margin: 88px auto;
@media ${mobile} {
margin-top: 0px;
}
`;
export const GreetingContainer = styled.div`
display: flex;
flex-direction: column;
height: 100%;
width: ${DESKTOP_WIDTH}px;
margin-bottom: 32px;
@media ${tablet} {
width: 100%;
max-width: ${TABLET_WIDTH}px;
}
.tooltip {
.invitation-text {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
@media ${mobile} {
padding: 0 25px;
}
}
.portal-logo {
width: 100%;
max-width: 386px;
height: 44px;
margin: 0 auto;
padding-bottom: 16px;
display: flex;
align-items: center;
justify-content: center;
.injected-svg {
height: 26.56px;
}
}
`;
export const RegisterContainer = styled.div<{
registrationForm?: boolean;
}>`

View File

@ -29,7 +29,7 @@ import { getObjectByLocation, toUrlParams } from "../../utils/common";
const DEFAULT_PAGE = 0;
const DEFAULT_PAGE_COUNT = 25;
const DEFAULT_TOTAL = 0;
const DEFAULT_SORT_BY = "firstname";
const DEFAULT_SORT_BY = "displayname";
const DEFAULT_SORT_ORDER = "ascending";
const DEFAULT_EMPLOYEE_STATUS = null;
const DEFAULT_ACTIVATION_STATUS = null;

View File

@ -42,7 +42,7 @@ const StyledErrorContainer = styled.div<{ isEditor: boolean }>`
css`
position: absolute;
`}
overflow-x: hidden;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;

View File

@ -996,6 +996,7 @@ export const ImageViewer = ({
onDoubleClick={handleDoubleTapOrClick}
onLoad={imageLoaded}
onError={onError}
onContextMenu={(event) => event.preventDefault()}
/>
</ImageWrapper>
</ImageViewerContainer>

View File

@ -36,7 +36,9 @@ export const PlayerBigPlayButton = ({
if (!visible) return;
return (
<WrapperPlayerBigPlayButton>
<WrapperPlayerBigPlayButton
onContextMenu={(event) => event.preventDefault()}
>
<BigIconPlay onClick={onClick} />
</WrapperPlayerBigPlayButton>
);

View File

@ -406,6 +406,10 @@ export const ViewerPlayer = ({
const percent = Number(event.target.value);
const newCurrentTime = (percent / 100) * videoRef.current.duration;
const videoCurrentTime = videoRef.current.currentTime;
if (Math.abs(newCurrentTime - videoCurrentTime) <= 0.1) return;
handleProgress();
setTimeline(percent);
setCurrentTime(newCurrentTime);
@ -653,6 +657,7 @@ export const ViewerPlayer = ({
onDurationChange={handleDurationChange}
onLoadedMetadata={handleLoadedMetaDataVideo}
onPlay={() => setIsPlaying(true)}
onContextMenu={(event) => event.preventDefault()}
/>
<PlayerBigPlayButton
onClick={handleBigPlayButtonClick}

View File

@ -79,7 +79,8 @@ const ControlButtons = ({
onClick={onNavigationButtonClick}
/>
) : null;
const children = tariffBar ? React.cloneElement(tariffBar, { title }) : null;
const children =
tariffBar && !isFrame ? React.cloneElement(tariffBar, { title }) : null;
const isTabletView = isTablet();
const contextOptionsFolder = getContextOptionsFolder();

View File

@ -237,10 +237,12 @@ class AxiosClient {
}
const loginURL = combineUrl(proxyURL, "/login");
if (!this.isSSR) {
switch (error.response?.status) {
case 401: {
if (options.skipUnauthorized) return Promise.resolve();
if (options.skipUnauthorized || window?.ClientConfig?.isFrame)
return Promise.resolve();
if (options.skipLogout) return Promise.reject(error);
const opt: AxiosRequestConfig = {
@ -261,14 +263,13 @@ class AxiosClient {
break;
case 403: {
const pathname = window.location.pathname;
const isFrame = window?.ClientConfig?.isFrame;
const isArchived = pathname.indexOf("/rooms/archived") !== -1;
const isRooms =
pathname.indexOf("/rooms/shared") !== -1 || isArchived;
if (isRooms && !skipRedirect && !isFrame) {
if (isRooms && !skipRedirect && !window?.ClientConfig?.isFrame) {
setTimeout(() => {
window.DocSpace.navigate(isArchived ? "/archived" : "/");
}, 1000);

View File

@ -98,6 +98,7 @@
onSignOut: null,
onDownload: null,
onNoAccess: null,
onContentReady: null,
},
};
@ -814,7 +815,10 @@
targetFrame.style.height = this.config.height;
targetFrame.parentNode.style.height = "inherit";
if (loader) loader.remove();
if (loader) {
loader.remove();
this.config.events.onContentReady();
}
}
}