Merge branch 'develop' into feature/navigation

This commit is contained in:
Timofey Boyko 2021-11-02 22:46:04 +08:00
parent c32e4999b4
commit 68a8683e13
3 changed files with 7 additions and 220 deletions

View File

@ -8,40 +8,23 @@ import { isMobile } from 'react-device-detect';
import { tablet, desktop } from '@appserver/components/utils/device'; import { tablet, desktop } from '@appserver/components/utils/device';
import NoUserSelect from '@appserver/components/utils/commonStyles'; import NoUserSelect from '@appserver/components/utils/commonStyles';
const StyledSectionHeader = styled.div` const StyledSectionHeader = styled.div`
<<<<<<< HEAD
position: relative; position: relative;
height: 41px;
=======
height: 42px; height: 42px;
>>>>>>> develop
margin-right: 24px; margin-right: 24px;
${NoUserSelect} ${NoUserSelect}
${isMobile && ${isMobile &&
css` css`
height: 20px; height: 20px;
<<<<<<< HEAD
/* height: 49px;
min-height: 48px;
max-height: 49px; */
width: ${(props) => !props.isLoaded && '100%'}; width: ${(props) => !props.isLoaded && '100%'};
margin-top: 64px;
/* @media ${tablet} {
margin-top: 55px;
} */
=======
width: ${(props) => !props.isLoaded && "100%"};
margin-top: 62px; margin-top: 62px;
@media ${tablet} { @media ${tablet} {
margin-top: 48px; margin-top: 48px;
} }
>>>>>>> develop
`} `}
@media ${desktop} { @media ${desktop} {
${(props) => ${(props) => (props.viewAs === 'table' || props.viewAs === 'tile') && 'margin-left: -4px'};
(props.viewAs === "table" || props.viewAs === "tile") &&
"margin-left: -4px"};
} }
@media ${tablet} { @media ${tablet} {

View File

@ -1,4 +1,3 @@
<<<<<<< HEAD
import React from 'react'; import React from 'react';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
import styled, { css } from 'styled-components'; import styled, { css } from 'styled-components';
@ -17,168 +16,6 @@ import { tablet, desktop, isTablet } from '@appserver/components/utils/device';
import { Consumer } from '@appserver/components/utils/context'; import { Consumer } from '@appserver/components/utils/context';
import { inject, observer } from 'mobx-react'; import { inject, observer } from 'mobx-react';
import Navigation from '@appserver/common/components/Navigation'; import Navigation from '@appserver/common/components/Navigation';
=======
import React from "react";
import copy from "copy-to-clipboard";
import styled, { css } from "styled-components";
import { withRouter } from "react-router";
import toastr from "studio/toastr";
import Loaders from "@appserver/common/components/Loaders";
import Headline from "@appserver/common/components/Headline";
import { FilterType, FileAction } from "@appserver/common/constants";
import { withTranslation } from "react-i18next";
import { isMobile } from "react-device-detect";
import ContextMenuButton from "@appserver/components/context-menu-button";
import DropDownItem from "@appserver/components/drop-down-item";
import IconButton from "@appserver/components/icon-button";
import { tablet, desktop } from "@appserver/components/utils/device";
import { Consumer } from "@appserver/components/utils/context";
import { inject, observer } from "mobx-react";
import TableGroupMenu from "@appserver/components/table-container/TableGroupMenu";
const StyledContainer = styled.div`
.table-container_group-menu {
${(props) =>
props.viewAs === "table"
? css`
margin: 0px -20px;
width: calc(100% + 44px);
`
: css`
margin: 0px -24px;
width: calc(100% + 48px);
`}
@media ${tablet} {
margin: 0 -16px;
width: calc(100% + 32px);
}
}
.header-container {
position: relative;
${(props) =>
props.title &&
css`
display: grid;
grid-template-columns: ${(props) =>
props.isRootFolder
? "auto auto 1fr"
: props.canCreate
? "auto auto auto auto 1fr"
: "auto auto auto 1fr"};
@media ${tablet} {
grid-template-columns: ${(props) =>
props.isRootFolder
? "1fr auto"
: props.canCreate
? "auto 1fr auto auto"
: "auto 1fr auto"};
${(props) => !props.isLoading && "top: 7px;"}
}
`}
align-items: center;
max-width: calc(100vw - 32px);
@media ${tablet} {
.headline-header {
margin-left: -1px;
}
}
.arrow-button {
margin-right: 15px;
min-width: 17px;
@media ${tablet} {
padding: 8px 0 8px 8px;
margin-left: -8px;
margin-right: 16px;
}
}
.add-button {
margin-bottom: -1px;
margin-left: 16px;
@media ${tablet} {
margin-left: auto;
& > div:first-child {
padding: 8px 8px 8px 8px;
margin-right: -8px;
}
}
}
.option-button {
margin-bottom: -1px;
@media (min-width: 1024px) {
margin-left: 8px;
}
@media ${tablet} {
& > div:first-child {
padding: 8px 8px 8px 8px;
margin-right: -8px;
}
}
}
}
.group-button-menu-container {
margin: 0 -16px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
${isMobile &&
css`
position: sticky;
`}
${(props) =>
!props.isTabletView
? props.width &&
isMobile &&
css`
width: ${props.width + 40 + "px"};
`
: props.width &&
isMobile &&
css`
width: ${props.width + 32 + "px"};
`}
@media ${tablet} {
padding-bottom: 0;
${!isMobile &&
css`
height: 56px;
`}
& > div:first-child {
${(props) =>
!isMobile &&
props.width &&
css`
width: ${props.width + 16 + "px"};
`}
position: absolute;
${(props) =>
!props.isDesktop &&
css`
top: 48px;
`}
z-index: 180;
}
}
@media ${desktop} {
margin: 0 -24px;
}
}
`;
>>>>>>> develop
class SectionHeaderContent extends React.Component { class SectionHeaderContent extends React.Component {
constructor(props) { constructor(props) {

View File

@ -223,8 +223,7 @@ class FilesStore {
}; };
setSelected = (selected) => { setSelected = (selected) => {
if (selected === "close" || selected === "none") if (selected === 'close' || selected === 'none') this.setBufferSelection(null);
this.setBufferSelection(null);
this.selected = selected; this.selected = selected;
const files = this.files.concat(this.folders); const files = this.files.concat(this.folders);
@ -451,23 +450,13 @@ class FilesStore {
'unsubscribe', 'unsubscribe',
]); ]);
<<<<<<< HEAD if (!shouldEdit && !shouldView) {
if (!this.isWebEditSelected && !canViewedDocs(item.fileExst)) {
fileOptions = this.removeOptions(fileOptions, ['sharing-settings']); fileOptions = this.removeOptions(fileOptions, ['sharing-settings']);
} }
} }
if (!this.isWebEditSelected) {
fileOptions = this.removeOptions(fileOptions, ['download-as']);
=======
if (!shouldEdit && !shouldView) {
fileOptions = this.removeOptions(fileOptions, ["sharing-settings"]);
}
}
if (!this.canConvertSelected) { if (!this.canConvertSelected) {
fileOptions = this.removeOptions(fileOptions, ["download-as"]); fileOptions = this.removeOptions(fileOptions, ['download-as']);
>>>>>>> develop
} }
if (!canConvert || isEncrypted) { if (!canConvert || isEncrypted) {
@ -668,29 +657,12 @@ class FilesStore {
); );
} }
<<<<<<< HEAD if (!shouldEdit && !shouldView && !fileOptions.includes('view')) {
if (
!canWebEdit(item.fileExst) &&
!canViewedDocs(item.fileExst) &&
!fileOptions.includes('view')
) {
fileOptions = this.removeOptions(fileOptions, ['edit', 'preview', 'separator0']); fileOptions = this.removeOptions(fileOptions, ['edit', 'preview', 'separator0']);
} }
if (!canWebEdit(item.fileExst) && canViewedDocs(item.fileExst)) {
fileOptions = this.removeOptions(fileOptions, ['edit']);
=======
if (!shouldEdit && !shouldView && !fileOptions.includes("view")) {
fileOptions = this.removeOptions(fileOptions, [
"edit",
"preview",
"separator0",
]);
}
if (!shouldEdit && shouldView) { if (!shouldEdit && shouldView) {
fileOptions = this.removeOptions(fileOptions, ["edit"]); fileOptions = this.removeOptions(fileOptions, ['edit']);
>>>>>>> develop
} }
return fileOptions; return fileOptions;
@ -1072,12 +1044,7 @@ class FilesStore {
const contextOptions = this.getFilesContextOptions(item, canOpenPlayer); const contextOptions = this.getFilesContextOptions(item, canOpenPlayer);
const isThirdPartyFolder = providerKey && id === rootFolderId; const isThirdPartyFolder = providerKey && id === rootFolderId;
<<<<<<< HEAD const iconSize = this.viewAs === 'table' ? 24 : 32;
//const isCanWebEdit = canWebEdit(item.fileExst);
const iconSize = this.viewAs === 'tile' && isMobile ? 32 : 24;
=======
const iconSize = this.viewAs === "table" ? 24 : 32;
>>>>>>> develop
const icon = getIcon(iconSize, fileExst, providerKey, contentLength); const icon = getIcon(iconSize, fileExst, providerKey, contentLength);
let isFolder = false; let isFolder = false;