Fixed Bug 60257: Files. Lock icon for files in 'My Documents'/'Archive'/'Trash' folder.
This commit is contained in:
parent
d696d0cd4b
commit
7c910ca78f
@ -56,7 +56,7 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
isAdmin,
|
||||
sectionWidth,
|
||||
viewAs,
|
||||
isPersonalRoom,
|
||||
folderCategory,
|
||||
} = this.props;
|
||||
|
||||
const quickButtonsComponent = (
|
||||
@ -71,7 +71,7 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
isCanWebEdit={isCanWebEdit}
|
||||
onClickLock={this.onClickLock}
|
||||
onClickFavorite={this.onClickFavorite}
|
||||
isPersonalRoom={isPersonalRoom}
|
||||
folderCategory={folderCategory}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -97,9 +97,16 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
setFavoriteAction,
|
||||
onSelectItem,
|
||||
} = filesActionsStore;
|
||||
const { isPersonalRoom } = treeFoldersStore;
|
||||
const {
|
||||
isPersonalFolderRoot,
|
||||
isArchiveFolderRoot,
|
||||
isTrashFolder,
|
||||
} = treeFoldersStore;
|
||||
const { setSharingPanelVisible } = dialogsStore;
|
||||
|
||||
const folderCategory =
|
||||
isTrashFolder || isArchiveFolderRoot || isPersonalFolderRoot;
|
||||
|
||||
return {
|
||||
theme: auth.settingsStore.theme,
|
||||
isAdmin: auth.isAdmin,
|
||||
@ -107,8 +114,7 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
setFavoriteAction,
|
||||
onSelectItem,
|
||||
setSharingPanelVisible,
|
||||
|
||||
isPersonalRoom,
|
||||
folderCategory,
|
||||
};
|
||||
}
|
||||
)(observer(WithQuickButtons));
|
||||
|
@ -16,13 +16,14 @@ const QuickButtons = (props) => {
|
||||
item,
|
||||
theme,
|
||||
sectionWidth,
|
||||
isTrashFolder,
|
||||
|
||||
onClickLock,
|
||||
isDisabled,
|
||||
onClickFavorite,
|
||||
viewAs,
|
||||
isCanWebEdit,
|
||||
isPersonalRoom,
|
||||
|
||||
folderCategory,
|
||||
} = props;
|
||||
|
||||
const { id, locked, fileStatus, title, fileExst } = item;
|
||||
@ -58,7 +59,7 @@ const QuickButtons = (props) => {
|
||||
const setFavorite = () => onClickFavorite(isFavorite);
|
||||
|
||||
const isAvailableLockFile =
|
||||
!isPersonalRoom && fileExst && displayBadges && isCanWebEdit;
|
||||
!folderCategory && fileExst && displayBadges && isCanWebEdit;
|
||||
|
||||
return (
|
||||
<div className="badges additional-badges">
|
||||
|
@ -180,12 +180,12 @@ const StyledSimpleFilesRow = styled(Row)`
|
||||
}
|
||||
|
||||
.expandButton {
|
||||
margin-left: ${(props) => (!props.isPersonalRoom ? "6px" : "0")};
|
||||
margin-left: ${(props) => (!props.folderCategory ? "6px" : "0")};
|
||||
padding-top: 0px;
|
||||
}
|
||||
.expandButton > div:first-child {
|
||||
${(props) =>
|
||||
props.isPersonalRoom &&
|
||||
props.folderCategory &&
|
||||
css`
|
||||
padding-left: 0 !important;
|
||||
`}
|
||||
@ -220,7 +220,8 @@ const SimpleFilesRow = (props) => {
|
||||
showHotkeyBorder,
|
||||
id,
|
||||
isRooms,
|
||||
isPersonalRoom,
|
||||
|
||||
folderCategory,
|
||||
} = props;
|
||||
|
||||
const [isDragOver, setIsDragOver] = React.useState(false);
|
||||
@ -316,7 +317,7 @@ const SimpleFilesRow = (props) => {
|
||||
isDragOver={isDragOver}
|
||||
isSmallContainer={isSmallContainer}
|
||||
isRooms={isRooms}
|
||||
isPersonalRoom={isPersonalRoom}
|
||||
folderCategory={folderCategory}
|
||||
>
|
||||
<FilesRowContent
|
||||
item={item}
|
||||
|
@ -203,6 +203,10 @@ class TreeFoldersStore {
|
||||
return FolderType.Archive === this.selectedFolderStore.rootFolderType;
|
||||
}
|
||||
|
||||
get isPersonalFolderRoot() {
|
||||
return FolderType.USER === this.selectedFolderStore.rootFolderType;
|
||||
}
|
||||
|
||||
get selectedKeys() {
|
||||
const selectedKeys =
|
||||
this.selectedTreeNode.length > 0 &&
|
||||
|
Loading…
Reference in New Issue
Block a user