Merge branch 'release/v1.2' of github.com:ONLYOFFICE/AppServer into release/v1.2
This commit is contained in:
commit
f54fd4ef71
@ -157,7 +157,7 @@ const ControlButtons = ({
|
||||
) : isRecycleBinFolder && !isEmptyFilesList ? (
|
||||
<>
|
||||
<IconButton
|
||||
iconName="images/clear.active.react.svg"
|
||||
iconName="images/clear.trash.react.svg"
|
||||
size={15}
|
||||
isFill={true}
|
||||
onClick={clearTrash}
|
||||
|
@ -106,6 +106,7 @@ class ComboBox extends React.Component {
|
||||
fillIcon,
|
||||
isExternalLink,
|
||||
isPersonal,
|
||||
offsetLeft,
|
||||
} = this.props;
|
||||
const { isOpen, selectedOption } = this.state;
|
||||
|
||||
@ -173,6 +174,7 @@ class ComboBox extends React.Component {
|
||||
withBlur={withBlur}
|
||||
isExternalLink={isExternalLink}
|
||||
isPersonal={isPersonal}
|
||||
offsetLeft={offsetLeft}
|
||||
>
|
||||
{advancedOptions
|
||||
? advancedOptions
|
||||
@ -262,6 +264,8 @@ ComboBox.propTypes = {
|
||||
fillIcon: PropTypes.bool,
|
||||
isExternalLink: PropTypes.bool,
|
||||
isPersonal: PropTypes.bool,
|
||||
|
||||
offsetLeft: PropTypes.number,
|
||||
};
|
||||
|
||||
ComboBox.defaultProps = {
|
||||
|
@ -19,6 +19,7 @@ const DropDownItem = (props) => {
|
||||
isSubMenu,
|
||||
isActive,
|
||||
withoutIcon,
|
||||
noHover,
|
||||
} = props;
|
||||
|
||||
const onClickAction = (e) => {
|
||||
@ -28,6 +29,7 @@ const DropDownItem = (props) => {
|
||||
return (
|
||||
<StyledDropdownItem
|
||||
{...props}
|
||||
noHover={noHover}
|
||||
className={className}
|
||||
onClick={onClickAction}
|
||||
disabled={disabled}
|
||||
@ -35,15 +37,15 @@ const DropDownItem = (props) => {
|
||||
>
|
||||
{icon && (
|
||||
<IconWrapper>
|
||||
<ReactSVG
|
||||
src={icon}
|
||||
className={fillIcon ? "drop-down-item_icon" : ""}
|
||||
/>
|
||||
{!withoutIcon && (
|
||||
<ReactSVG
|
||||
src={icon}
|
||||
className={fillIcon ? "drop-down-item_icon" : ""}
|
||||
/>
|
||||
)}
|
||||
</IconWrapper>
|
||||
)}
|
||||
|
||||
{withoutIcon && <IconWrapper />}
|
||||
|
||||
{isSeparator ? "\u00A0" : label ? label : children && children}
|
||||
|
||||
{isSubMenu && (
|
||||
|
@ -190,7 +190,7 @@ class DropDown extends React.PureComponent {
|
||||
this.dropDownRef.current.style.left =
|
||||
rects.right - this.dropDownRef.current.clientWidth + "px";
|
||||
} else {
|
||||
this.dropDownRef.current.style.left = left + "px";
|
||||
this.dropDownRef.current.style.left = left + this.props.offsetLeft + "px";
|
||||
}
|
||||
|
||||
this.dropDownRef.current.style.top = this.props.top || bottom + "px";
|
||||
@ -366,6 +366,8 @@ DropDownContainer.propTypes = {
|
||||
fixedDirection: PropTypes.bool,
|
||||
/**Enable blur for backdrop */
|
||||
withBlur: PropTypes.bool,
|
||||
|
||||
offsetLeft: PropTypes.number,
|
||||
};
|
||||
|
||||
DropDownContainer.defaultProps = {
|
||||
|
@ -25,6 +25,8 @@ import styled from "styled-components";
|
||||
import ButtonAlertIcon from "../../../public/images/main-button.alert.react.svg";
|
||||
import commonIconsStyles from "../utils/common-icons-style";
|
||||
|
||||
import { isMobileOnly } from "react-device-detect";
|
||||
|
||||
const StyledButtonAlertIcon = styled(ButtonAlertIcon)`
|
||||
${commonIconsStyles}
|
||||
`;
|
||||
@ -221,6 +223,8 @@ const MainButtonMobile = (props) => {
|
||||
}
|
||||
}, [progressOptions]);
|
||||
|
||||
const noHover = isMobileOnly ? true : false;
|
||||
|
||||
const renderItems = () => {
|
||||
return (
|
||||
<StyledRenderItem ref={divRef}>
|
||||
@ -249,6 +253,7 @@ const MainButtonMobile = (props) => {
|
||||
action={option.action}
|
||||
isActive={isOpenSubMenu}
|
||||
isSubMenu={true}
|
||||
noHover={noHover}
|
||||
/>
|
||||
{isOpenSubMenu &&
|
||||
option.items.map((item) => {
|
||||
@ -266,7 +271,8 @@ const MainButtonMobile = (props) => {
|
||||
onClick={subMenuOnClickAction}
|
||||
icon={item.icon ? item.icon : ""}
|
||||
action={item.action}
|
||||
withoutIcon={true}
|
||||
withoutIcon={item.withoutIcon}
|
||||
noHover={noHover}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
@ -283,6 +289,7 @@ const MainButtonMobile = (props) => {
|
||||
onClick={optionOnClickAction}
|
||||
icon={option.icon ? option.icon : ""}
|
||||
action={option.action}
|
||||
noHover={noHover}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -134,7 +134,9 @@ const StyledDropDown = styled(DropDown)`
|
||||
|
||||
&:hover {
|
||||
background-color: ${(props) =>
|
||||
props.theme.mainButtonMobile.dropDown.hoverButtonColor};
|
||||
isMobileOnly
|
||||
? props.theme.mainButtonMobile.buttonOptions.backgroundColor
|
||||
: props.theme.mainButtonMobile.dropDown.hoverButtonColor};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_26408_15469)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 1C0.895431 1 0 1.89543 0 3V13C0 14.1046 0.89543 15 2 15H5V13H2V3L6.58579 3L9 5.41421C9.37507 5.78929 9.88378 6 10.4142 6H14V13H11V15H14C15.1046 15 16 14.1046 16 13V6C16 4.89543 15.1046 4 14 4H10.4142L8 1.58579C7.62493 1.21071 7.11622 1 6.58579 1H2ZM5.70711 11.7071L7 10.4142V15H9V10.4142L10.2929 11.7071L11.7071 10.2929L8.70711 7.29289C8.51957 7.10536 8.26522 7 8 7C7.73478 7 7.48043 7.10536 7.29289 7.29289L4.29289 10.2929L5.70711 11.7071Z" fill="#333333"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_26408_15469">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 764 B |
@ -14,5 +14,5 @@
|
||||
"ShareEmailBody": "Вам предоставлен доступ к документу {{itemName}}. Нажмите на ссылку ниже, чтобы открыть документ прямо сейчас: {{shareLink}}",
|
||||
"ShareEmailSubject": "Вам предоставлен доступ к документу {{itemName}}",
|
||||
"ShareVia": "Отправить по",
|
||||
"SharingSettingsTitle": "Настройки совместного доступа"
|
||||
"SharingSettingsTitle": "Настройки доступа"
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import { inject, observer } from "mobx-react";
|
||||
import MainButton from "@appserver/components/main-button";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import { isMobile } from "react-device-detect";
|
||||
import { isTablet as isTabletUtils } from "@appserver/components/utils/device";
|
||||
import Loaders from "@appserver/common/components/Loaders";
|
||||
import { AppServerConfig, FileAction } from "@appserver/common/constants";
|
||||
import { encryptionUploadDialog } from "../../../helpers/desktop";
|
||||
@ -44,7 +43,6 @@ const ArticleMainButtonContent = (props) => {
|
||||
const [actions, setActions] = React.useState([]);
|
||||
const [uploadActions, setUploadActions] = React.useState([]);
|
||||
const [model, setModel] = React.useState([]);
|
||||
const [isTablet, setIsTablet] = React.useState(isTabletUtils());
|
||||
|
||||
const onCreate = React.useCallback(
|
||||
(e) => {
|
||||
@ -102,14 +100,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const onResize = React.useCallback(() => {
|
||||
const isTabletView = isTabletUtils();
|
||||
setIsTablet(isTabletView);
|
||||
}, []);
|
||||
|
||||
React.useEffect(() => {
|
||||
window.addEventListener("resize", onResize);
|
||||
|
||||
const folderUpload = !isMobile
|
||||
? [
|
||||
{
|
||||
@ -133,30 +124,30 @@ const ArticleMainButtonContent = (props) => {
|
||||
items: [
|
||||
{
|
||||
className: "main-button_drop-down_sub",
|
||||
icon: !isMobile && "images/form.react.svg",
|
||||
icon: "images/form.react.svg",
|
||||
label: t("Translations:SubNewForm"),
|
||||
onClick: onCreate,
|
||||
action: "docxf",
|
||||
key: "docxf",
|
||||
withoutIcon: isMobile,
|
||||
withoutIcon: true,
|
||||
},
|
||||
{
|
||||
className: "main-button_drop-down_sub",
|
||||
icon: !isMobile && "images/form.file.react.svg",
|
||||
icon: "images/form.file.react.svg",
|
||||
label: t("Translations:SubNewFormFile"),
|
||||
onClick: onShowSelectFileDialog,
|
||||
disabled: isPrivacy,
|
||||
key: "form-file",
|
||||
withoutIcon: isMobile,
|
||||
withoutIcon: true,
|
||||
},
|
||||
{
|
||||
className: "main-button_drop-down_sub",
|
||||
icon: !isMobile && "images/form.react.svg",
|
||||
icon: "images/form.react.svg",
|
||||
label: t("Common:OFORMsGallery"),
|
||||
onClick: onShowGallery,
|
||||
disabled: isPrivacy,
|
||||
key: "form-gallery",
|
||||
withoutIcon: isMobile,
|
||||
withoutIcon: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -225,20 +216,14 @@ const ArticleMainButtonContent = (props) => {
|
||||
setModel(menuModel);
|
||||
setActions(actions);
|
||||
setUploadActions(uploadActions);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("resize", onResize);
|
||||
};
|
||||
}, [
|
||||
t,
|
||||
isPrivacy,
|
||||
currentFolderId,
|
||||
isTablet,
|
||||
onCreate,
|
||||
onShowSelectFileDialog,
|
||||
onUploadFileClick,
|
||||
onUploadFolderClick,
|
||||
onResize,
|
||||
]);
|
||||
|
||||
return (
|
||||
|
@ -52,6 +52,7 @@ const FilesTileContainer = ({ filesList, t, sectionWidth }) => {
|
||||
}, [firstRef, filesList]);
|
||||
|
||||
const onResize = useCallback(() => {
|
||||
if (!firstRef?.current) return;
|
||||
const { width } = firstRef.current.getBoundingClientRect();
|
||||
|
||||
const size = getThumbSize(width);
|
||||
|
@ -164,6 +164,10 @@ const StyledTile = styled.div`
|
||||
}
|
||||
`}
|
||||
}
|
||||
|
||||
.new-items {
|
||||
min-width: 16px;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledFileTileTop = styled.div`
|
||||
@ -503,6 +507,7 @@ class Tile extends React.PureComponent {
|
||||
isFolder={(isFolder && !fileExst) || (!fileExst && id === -1)}
|
||||
>
|
||||
{FilesTileContent}
|
||||
{badges}
|
||||
</StyledContent>
|
||||
<StyledOptionButton spacerWidth={contextButtonSpacerWidth}>
|
||||
{renderContext ? (
|
||||
|
@ -113,13 +113,13 @@ class SectionHeaderContent extends React.Component {
|
||||
items: [
|
||||
{
|
||||
key: "new-form",
|
||||
label: t("Translations:NewForm"),
|
||||
label: t("Translations:SubNewForm"),
|
||||
icon: "images/form.react.svg",
|
||||
onClick: this.createForm,
|
||||
},
|
||||
{
|
||||
key: "new-form-file",
|
||||
label: t("Translations:NewFormFile"),
|
||||
label: t("Translations:SubNewFormFile"),
|
||||
onClick: this.createFormFromFile,
|
||||
disabled: isPrivacyFolder,
|
||||
icon: "images/form.file.react.svg",
|
||||
|
@ -548,7 +548,7 @@ class ContextOptionsStore {
|
||||
{
|
||||
key: "open-location",
|
||||
label: t("OpenLocation"),
|
||||
icon: "images/download-as.react.svg",
|
||||
icon: "images/folder.location.react.svg",
|
||||
onClick: () => this.onOpenLocation(item),
|
||||
disabled: false,
|
||||
},
|
||||
|
@ -534,7 +534,12 @@ class FilesActionStore {
|
||||
setHotkeyCaret(null);
|
||||
setHotkeyCaretStart(null);
|
||||
}
|
||||
} else if (isSelected && !isContextItem && !isSingleMenu) {
|
||||
} else if (
|
||||
isSelected &&
|
||||
selection.length > 1 &&
|
||||
!isContextItem &&
|
||||
!isSingleMenu
|
||||
) {
|
||||
setHotkeyCaret(null);
|
||||
setHotkeyCaretStart(null);
|
||||
} else {
|
||||
|
@ -406,6 +406,7 @@ class ProfileInfo extends React.PureComponent {
|
||||
isDefaultMode={!isMobileOnly}
|
||||
withBlur={isMobileOnly}
|
||||
fillIcon={false}
|
||||
offsetLeft={-16}
|
||||
/>
|
||||
<HelpButton
|
||||
place="bottom"
|
||||
|
@ -1,6 +1,8 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import styled from "styled-components";
|
||||
import styled, { css } from "styled-components";
|
||||
import { isMobileOnly } from "react-device-detect";
|
||||
|
||||
import Avatar from "@appserver/components/avatar";
|
||||
import DropDownItem from "@appserver/components/drop-down-item";
|
||||
import Link from "@appserver/components/link";
|
||||
@ -13,6 +15,16 @@ import Button from "@appserver/components/button";
|
||||
const StyledDiv = styled.div`
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
||||
${isMobileOnly &&
|
||||
css`
|
||||
@media (min-width: 428px) {
|
||||
.backdrop-active {
|
||||
background-color: unset;
|
||||
backdrop-filter: unset;
|
||||
}
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
||||
const StyledButtonWrapper = styled.div`
|
||||
|
Loading…
Reference in New Issue
Block a user