Merge branch 'release/v1.2' of github.com:ONLYOFFICE/AppServer into release/v1.2

This commit is contained in:
Timofey Boyko 2022-05-04 15:16:14 +03:00
commit a462143de2
14 changed files with 74 additions and 46 deletions

View File

@ -114,7 +114,7 @@ const Selector = (props) => {
if (groups.length === 1) return setGroupHeader(newGroupList[0]);
selectedOptions.forEach((option) => {
option.groups.forEach((group) => {
option?.groups?.forEach((group) => {
const groupIndex = newGroupList.findIndex(
(newGroup) => group === newGroup.id
);

View File

@ -105,6 +105,7 @@ const ControlButtons = ({
<>
{!isMobile && (
<ContextMenuButton
zIndex={402}
className="add-button"
directionX="right"
iconName="images/plus.svg"
@ -146,6 +147,7 @@ const ControlButtons = ({
<>
{!isMobile && (
<ContextMenuButton
zIndex={402}
className="add-button"
directionX="right"
iconName="images/plus.svg"

View File

@ -164,6 +164,7 @@ class ContextMenuButton extends React.Component {
asideHeader, // eslint-disable-line react/prop-types
isNew,
title,
zIndex,
} = this.props;
const { isOpen, displayType, offsetX, offsetY } = this.state;
@ -202,6 +203,7 @@ class ContextMenuButton extends React.Component {
clickOutsideAction={this.clickOutsideAction}
columnCount={columnCount}
withBackdrop={!!isMobile}
zIndex={zIndex}
>
{this.state.data.map(
(item, index) =>

View File

@ -176,6 +176,7 @@ const SubMenu = (props) => {
return (
<li
id={item.id}
key={item.key}
role="none"
className={className}

View File

@ -35,7 +35,8 @@ const StyledDropdown = styled.div`
css`
left: ${(props) => (props.manualX ? props.manualX : "0px")};
`}
z-index: ${(props) => props.theme.dropDown.zIndex};
z-index: ${(props) =>
props.zIndex ? props.zIndex : props.theme.dropDown.zIndex};
display: ${(props) =>
props.open ? (props.columnCount ? "block" : "table") : "none"};
background: ${(props) => props.theme.dropDown.background};

View File

@ -51,14 +51,6 @@ StyledContent.defaultProps = { theme: Base };
const StyledCheckbox = styled.div`
flex: 0 0 16px;
.checkbox {
padding: 7px 0;
@media ${tablet} {
padding: 10px 0;
}
}
`;
const StyledElement = styled.div`

View File

@ -87,7 +87,7 @@ const FilesSection = React.memo(() => {
return (
<Switch>
<PrivateRoute exact path={SETTINGS_URL} component={Settings} />
<PrivateRoute exact path={HISTORY_URL} component={VersionHistory} />
{/*<PrivateRoute exact path={HISTORY_URL} component={VersionHistory} />*/}
<PrivateRoute path={PRIVATE_ROOMS_URL} component={PrivateRoomsPage} />
<PrivateRoute exact path={HOME_URL} component={Home} />
<PrivateRoute path={FILTER_URL} component={Home} />

View File

@ -23,15 +23,8 @@ export default function withBadges(WrappedComponent) {
isTrashFolder,
} = this.props;
if (isTrashFolder) return;
if (!isTabletView) {
fetchFileVersions(item.id + "");
setIsVerHistoryPanel(true);
} else {
history.push(
combineUrl(AppServerConfig.proxyURL, homepage, `/${item.id}/history`)
);
}
fetchFileVersions(item.id + "");
setIsVerHistoryPanel(true);
};
onBadgeClick = () => {

View File

@ -109,6 +109,7 @@ const ArticleMainButtonContent = (props) => {
const folderUpload = !isMobile
? [
{
id: "main-button_upload-folders",
className: "main-button_drop-down",
icon: "images/actions.upload.react.svg",
label: t("UploadFolder"),
@ -184,6 +185,7 @@ const ArticleMainButtonContent = (props) => {
const actions = [
{
id: "main-button_new-document",
className: "main-button_drop-down",
icon: "images/actions.documents.react.svg",
label: t("NewDocument"),
@ -192,6 +194,7 @@ const ArticleMainButtonContent = (props) => {
key: "docx",
},
{
id: "main-button_new-spreadsheet",
className: "main-button_drop-down",
icon: "images/spreadsheet.react.svg",
label: t("NewSpreadsheet"),
@ -200,6 +203,7 @@ const ArticleMainButtonContent = (props) => {
key: "xlsx",
},
{
id: "main-button_new-presentation",
className: "main-button_drop-down",
icon: "images/actions.presentation.react.svg",
label: t("NewPresentation"),
@ -209,6 +213,7 @@ const ArticleMainButtonContent = (props) => {
},
...formActions,
{
id: "main-button_new-folder",
className: "main-button_drop-down",
icon: "images/catalog.folder.react.svg",
label: t("NewFolder"),
@ -219,6 +224,7 @@ const ArticleMainButtonContent = (props) => {
const uploadActions = [
{
id: "main-button_upload-files",
className: "main-button_drop-down",
icon: "images/actions.upload.react.svg",
label: t("UploadFiles"),
@ -272,6 +278,7 @@ const ArticleMainButtonContent = (props) => {
</>
) : (
<MainButton
id="files_main-button"
isDisabled={isDisabled ? isDisabled : !canCreate}
isDropdown={true}
text={t("Common:Actions")}

View File

@ -117,14 +117,34 @@ StyledAsidePanel.defaultProps = { theme: Base };
const StyledVersionHistoryPanel = styled.div`
${PanelStyles}
.version-history-modal-dialog {
transform: translateX(${(props) => (props.visible ? "0" : "720px")});
width: 500px;
transition: unset;
transform: translateX(${(props) => (props.visible ? "0" : "480px")});
width: 480px;
max-width: 480px;
overflow-y: hidden;
}
.version-history-aside-panel {
transform: translateX(${(props) => (props.visible ? "0" : "720px")});
width: 500px;
transition: unset;
transform: translateX(${(props) => (props.visible ? "0" : "480px")});
width: 480px;
max-width: 480px;
overflow-y: hidden;
@media (max-width: 500px) {
position: fixed;
top: 64px;
bottom: 0;
right: 0;
width: 100%;
height: calc(100% - 64px);
}
}
.version-history-panel-header {
height: 53px;
margin-left: 0px;
@ -134,6 +154,7 @@ const StyledVersionHistoryPanel = styled.div`
margin-top: 12px;
}
}
.version-history-panel-body {
padding-top: ${(props) => (props.isLoading ? "16px" : null)};
padding-bottom: ${(props) => (props.isLoading ? "0px" : null)};
@ -146,6 +167,7 @@ const StyledVersionHistoryPanel = styled.div`
.version-comment-wrapper {
margin-left: 79px;
}
.version_edit-comment {
padding-left: 2px;
}

View File

@ -94,7 +94,7 @@ const SectionBodyContent = ({
<Error403 />
) : isErrorSettings ? (
<Error520 />
) : (
) : !isPersonal ? (
<div>
<TabsContainer
elements={elements}
@ -102,6 +102,8 @@ const SectionBodyContent = ({
selectedItem={selectedTab()}
/>
</div>
) : (
<div>{elements[0].content}</div>
);
};

View File

@ -19,6 +19,7 @@ const PureSettings = ({
setFirstLoad,
capabilities,
tReady,
isPersonal,
}) => {
const [title, setTitle] = useState("");
const { setting } = match.params;
@ -28,7 +29,9 @@ const PureSettings = ({
}, [setFirstLoad]);
useEffect(() => {
setTitle(t("Common:Settings"));
isPersonal
? setTitle(t("ThirdPartySettings"))
: setTitle(t("Common:Settings"));
}, [t, tReady]);
useEffect(() => {
@ -80,22 +83,25 @@ const PureSettings = ({
const Settings = withTranslation(["Settings", "Common"])(PureSettings);
export default inject(({ filesStore, settingsStore, treeFoldersStore }) => {
const { setFirstLoad, isLoading } = filesStore;
const { setSelectedNode } = treeFoldersStore;
const {
getFilesSettings,
isLoadedSettingsTree,
thirdPartyStore,
} = settingsStore;
const { capabilities } = thirdPartyStore;
export default inject(
({ auth, filesStore, settingsStore, treeFoldersStore }) => {
const { setFirstLoad, isLoading } = filesStore;
const { setSelectedNode } = treeFoldersStore;
const {
getFilesSettings,
isLoadedSettingsTree,
thirdPartyStore,
} = settingsStore;
const { capabilities } = thirdPartyStore;
return {
isLoading,
isLoadedSettingsTree,
setFirstLoad,
setSelectedNode,
getFilesSettings,
capabilities,
};
})(withRouter(observer(Settings)));
return {
isLoading,
isLoadedSettingsTree,
setFirstLoad,
setSelectedNode,
getFilesSettings,
capabilities,
isPersonal: auth.settingsStore.personal,
};
}
)(withRouter(observer(Settings)));

View File

@ -214,7 +214,7 @@ const StyledVersionRow = styled(Row)`
@media ${tablet} {
display: inline-block;
margin-left: 1px;
margin-left: -7px;
margin-top: 5px;
}
}

View File

@ -395,7 +395,7 @@ class SectionHeaderContent extends React.PureComponent {
{
key: "invite-again",
className: "header-context-menu_invite-again",
label: t("InviteAgainLbl"),
label: t("Profile:InviteAgainLbl"),
onClick: this.onInviteAgainClick,
},
!isMe &&