Merge branch 'release/1.0.0' into bugfix/icons-blur
This commit is contained in:
commit
cece18f0e7
@ -89,6 +89,7 @@ class ComboBox extends React.Component {
|
||||
toggleAction,
|
||||
textOverflow,
|
||||
showDisabledItems,
|
||||
offsetDropDownY,
|
||||
} = this.props;
|
||||
const { isOpen, selectedOption } = this.state;
|
||||
|
||||
@ -138,7 +139,7 @@ class ComboBox extends React.Component {
|
||||
className="dropdown-container not-selectable"
|
||||
directionX={directionX}
|
||||
directionY={directionY}
|
||||
manualY="102%"
|
||||
manualY={offsetDropDownY}
|
||||
open={isOpen}
|
||||
clickOutsideAction={this.handleClickOutside}
|
||||
{...dropDownMaxHeightProp}
|
||||
@ -210,6 +211,8 @@ ComboBox.propTypes = {
|
||||
textOverflow: PropTypes.bool,
|
||||
/** Disables clicking on the icon */
|
||||
disableIconClick: PropTypes.bool,
|
||||
/** Y offset */
|
||||
offsetDropDownY: PropTypes.string,
|
||||
};
|
||||
|
||||
ComboBox.defaultProps = {
|
||||
@ -221,6 +224,7 @@ ComboBox.defaultProps = {
|
||||
size: "base",
|
||||
disableIconClick: true,
|
||||
showDisabledItems: false,
|
||||
offsetDropDownY: "102%",
|
||||
};
|
||||
|
||||
export default ComboBox;
|
||||
|
@ -105,9 +105,11 @@ class GroupButton extends React.Component {
|
||||
? { maxHeight: dropDownMaxHeight }
|
||||
: {};
|
||||
const offsetSelectDropDown = isSelect
|
||||
? { manualX: window.innerWidth <= 1024 ? "16px" : "24px" }
|
||||
? { manualX: window.innerWidth <= 1024 ? "44px" : "50px" }
|
||||
: {};
|
||||
|
||||
const manualY = window.innerWidth <= 1024 ? "60px" : "53px";
|
||||
|
||||
return (
|
||||
<StyledGroupButton
|
||||
ref={this.ref}
|
||||
@ -140,7 +142,7 @@ class GroupButton extends React.Component {
|
||||
<DropDown
|
||||
{...dropDownMaxHeightProp}
|
||||
{...offsetSelectDropDown}
|
||||
manualY="72px"
|
||||
manualY={manualY}
|
||||
open={this.state.isOpen}
|
||||
clickOutsideAction={this.clickOutsideAction}
|
||||
showDisabledItems={true}
|
||||
|
@ -51,6 +51,7 @@ const TableGroupMenu = (props) => {
|
||||
className="table-container_group-menu-combobox not-selectable"
|
||||
options={[]}
|
||||
selectedOption={{}}
|
||||
offsetDropDownY="44px"
|
||||
/>
|
||||
<div className="table-container_group-menu-separator" />
|
||||
{headerMenu.map((item, index) => {
|
||||
|
@ -609,7 +609,7 @@ class FilesActionStore {
|
||||
} = this.treeFoldersStore;
|
||||
const {
|
||||
isAccessedSelected,
|
||||
isWebEditSelected,
|
||||
canConvertSelected,
|
||||
isThirdPartyRootSelection,
|
||||
hasSelection,
|
||||
} = this.filesStore;
|
||||
@ -623,7 +623,7 @@ class FilesActionStore {
|
||||
case "download":
|
||||
return hasSelection;
|
||||
case "downloadAs":
|
||||
return isWebEditSelected && hasSelection;
|
||||
return canConvertSelected;
|
||||
case "moveTo":
|
||||
return (
|
||||
!isThirdPartyRootSelection &&
|
||||
|
@ -426,6 +426,8 @@ class FilesStore {
|
||||
const { isDesktopClient } = this.authStore.settingsStore;
|
||||
|
||||
if (isFile) {
|
||||
const shouldEdit = canWebEdit(item.fileExst);
|
||||
const shouldView = canViewedDocs(item.fileExst);
|
||||
let fileOptions = [
|
||||
//"open",
|
||||
"edit",
|
||||
@ -470,12 +472,12 @@ class FilesStore {
|
||||
"unsubscribe",
|
||||
]);
|
||||
|
||||
if (!this.isWebEditSelected && !canViewedDocs(item.fileExst)) {
|
||||
if (!shouldEdit && !shouldView) {
|
||||
fileOptions = this.removeOptions(fileOptions, ["sharing-settings"]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.isWebEditSelected) {
|
||||
if (!this.canConvertSelected) {
|
||||
fileOptions = this.removeOptions(fileOptions, ["download-as"]);
|
||||
}
|
||||
|
||||
@ -698,11 +700,7 @@ class FilesStore {
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
!canWebEdit(item.fileExst) &&
|
||||
!canViewedDocs(item.fileExst) &&
|
||||
!fileOptions.includes("view")
|
||||
) {
|
||||
if (!shouldEdit && !shouldView && !fileOptions.includes("view")) {
|
||||
fileOptions = this.removeOptions(fileOptions, [
|
||||
"edit",
|
||||
"preview",
|
||||
@ -710,7 +708,7 @@ class FilesStore {
|
||||
]);
|
||||
}
|
||||
|
||||
if (!canWebEdit(item.fileExst) && canViewedDocs(item.fileExst)) {
|
||||
if (!shouldEdit && shouldView) {
|
||||
fileOptions = this.removeOptions(fileOptions, ["edit"]);
|
||||
}
|
||||
|
||||
@ -1133,7 +1131,6 @@ class FilesStore {
|
||||
const contextOptions = this.getFilesContextOptions(item, canOpenPlayer);
|
||||
const isThirdPartyFolder = providerKey && id === rootFolderId;
|
||||
|
||||
//const isCanWebEdit = canWebEdit(item.fileExst);
|
||||
const iconSize = this.viewAs === "tile" && isMobile ? 32 : 24;
|
||||
const icon = getIcon(iconSize, fileExst, providerKey, contentLength);
|
||||
|
||||
@ -1203,7 +1200,6 @@ class FilesStore {
|
||||
webUrl,
|
||||
providerKey,
|
||||
canOpenPlayer,
|
||||
//canWebEdit: isCanWebEdit,
|
||||
//canShare,
|
||||
canShare,
|
||||
canEdit,
|
||||
@ -1367,7 +1363,7 @@ class FilesStore {
|
||||
return !!withProvider;
|
||||
}
|
||||
|
||||
get isWebEditSelected() {
|
||||
get canConvertSelected() {
|
||||
const { filesConverts } = this.formatsStore.docserviceStore;
|
||||
|
||||
const selection = this.selection.length
|
||||
|
Loading…
Reference in New Issue
Block a user