Client: fixed editing index mode: disable selection and file transition
This commit is contained in:
parent
aa17569192
commit
3e390d8e5c
@ -292,6 +292,10 @@ const StyledTableRow = styled(TableRow)`
|
||||
padding-inline: 0 8px;
|
||||
}
|
||||
|
||||
.item-file-name-index {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
${(props) =>
|
||||
props.isHighlight &&
|
||||
css`
|
||||
|
@ -50,6 +50,9 @@ const FileNameCell = ({
|
||||
|
||||
const isMedia = viewAccessibility?.ImageView || viewAccessibility?.MediaView;
|
||||
|
||||
const indexingClass = isIndexEditingMode ? "item-file-name-index" : "";
|
||||
const linkProps = isIndexEditingMode ? null : { ...linkStyles };
|
||||
|
||||
return (
|
||||
<>
|
||||
{inProgress ? (
|
||||
@ -77,16 +80,15 @@ const FileNameCell = ({
|
||||
</div>
|
||||
</TableCell>
|
||||
)}
|
||||
|
||||
<Link
|
||||
type="page"
|
||||
title={title}
|
||||
fontWeight="600"
|
||||
fontSize="13px"
|
||||
{...linkStyles}
|
||||
color={theme.filesSection.tableView.fileName.linkColor}
|
||||
isTextOverflow
|
||||
className="item-file-name"
|
||||
{...linkProps}
|
||||
className={`item-file-name ${indexingClass}`}
|
||||
dir="auto"
|
||||
>
|
||||
{titleWithoutExt}
|
||||
|
@ -39,6 +39,7 @@ const SelectionArea = (props) => {
|
||||
foldersLength,
|
||||
filesLength,
|
||||
isInfoPanelVisible,
|
||||
isIndexEditingMode,
|
||||
} = props;
|
||||
|
||||
const [countTilesInRow, setCountTilesInRow] = useState(getCountTilesInRow());
|
||||
@ -87,7 +88,7 @@ const SelectionArea = (props) => {
|
||||
},
|
||||
];
|
||||
|
||||
return isMobile || dragging ? (
|
||||
return isMobile || dragging || isIndexEditingMode ? (
|
||||
<></>
|
||||
) : (
|
||||
<SelectionAreaComponent
|
||||
@ -107,28 +108,32 @@ const SelectionArea = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ filesStore, treeFoldersStore, infoPanelStore }) => {
|
||||
const {
|
||||
dragging,
|
||||
viewAs,
|
||||
setSelections,
|
||||
getCountTilesInRow,
|
||||
folders,
|
||||
files,
|
||||
} = filesStore;
|
||||
const { isRoomsFolder, isArchiveFolder } = treeFoldersStore;
|
||||
const { isVisible: isInfoPanelVisible } = infoPanelStore;
|
||||
export default inject(
|
||||
({ filesStore, treeFoldersStore, infoPanelStore, indexingStore }) => {
|
||||
const {
|
||||
dragging,
|
||||
viewAs,
|
||||
setSelections,
|
||||
getCountTilesInRow,
|
||||
folders,
|
||||
files,
|
||||
} = filesStore;
|
||||
const { isRoomsFolder, isArchiveFolder } = treeFoldersStore;
|
||||
const { isVisible: isInfoPanelVisible } = infoPanelStore;
|
||||
const { isIndexEditingMode } = indexingStore;
|
||||
|
||||
const isRooms = isRoomsFolder || isArchiveFolder;
|
||||
const isRooms = isRoomsFolder || isArchiveFolder;
|
||||
|
||||
return {
|
||||
dragging,
|
||||
viewAs,
|
||||
setSelections,
|
||||
getCountTilesInRow,
|
||||
isRooms,
|
||||
foldersLength: folders.length,
|
||||
filesLength: files.length,
|
||||
isInfoPanelVisible,
|
||||
};
|
||||
})(observer(SelectionArea));
|
||||
return {
|
||||
dragging,
|
||||
viewAs,
|
||||
setSelections,
|
||||
getCountTilesInRow,
|
||||
isRooms,
|
||||
foldersLength: folders.length,
|
||||
filesLength: files.length,
|
||||
isInfoPanelVisible,
|
||||
isIndexEditingMode,
|
||||
};
|
||||
},
|
||||
)(observer(SelectionArea));
|
||||
|
Loading…
Reference in New Issue
Block a user