Merge pull request #920 from ONLYOFFICE/bugfix/selected-items-information

Bugfix/selected items information
This commit is contained in:
Nikita Gopienko 2022-10-17 16:23:27 +03:00 committed by GitHub
commit f80c7dd79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 8 deletions

View File

@ -38,14 +38,15 @@ const InfoPanelBodyContent = ({
const isAccounts = getIsAccounts();
const isGallery = getIsGallery();
const isSeveralItems = props.selectedItems.length > 1;
const isNoItem =
(isGallery && !gallerySelected) ||
(!selection?.title && !isSeveralItems) ||
((isRootFolder || isAccounts) &&
selection?.isSelectedFolder &&
!selection?.wasContextMenuSelection);
const isSeveralItems = props.selectedItems.length > 1;
const viewHelper = new ViewHelper({
defaultProps: {
selection,

View File

@ -50,6 +50,10 @@ const StyledTitle = styled.div`
}
`}
.item-icon {
height: 32px;
width: 32px;
}
img {
&.icon {
display: flex;

View File

@ -24,7 +24,9 @@ const FilesItemTitle = ({
if (isSeveralItems)
return (
<StyledTitle>
<ReactSVG className="icon" src={getIcon(32, ".file")} />
<div className="item-icon">
<ReactSVG className="icon" src={getIcon(32, ".file")} />
</div>
<Text className="text">
{`${t("InfoPanel:ItemsSelected")}: ${severalItemsLength}`}
</Text>
@ -35,11 +37,13 @@ const FilesItemTitle = ({
return (
<StyledTitle ref={itemTitleRef}>
<img
className={`icon ${selection.isRoom && "is-room"}`}
src={selection.icon}
alt="thumbnail-icon"
/>
<div className="item-icon">
<img
className={`icon ${selection.isRoom && "is-room"}`}
src={selection.icon}
alt="thumbnail-icon"
/>
</div>
<Text className="text">{selection.title}</Text>
{selection && (
<ItemContextOptions