1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-23 20:37:42 +00:00

Readonly misc fixup (#7274)

* ['dir view'] fixup for the tree panel: don't display 'New Folder', 'New File' in the menu for library shared with 'r' permission

* ['dir view'] don't display empty 'right icons' when hover on the tree nodes in the tree panel

* [codemirror] improved the configuration for the 'readOnly' mode(Don't display cursor for readOnly files)

* fixed eslint warnings
This commit is contained in:
llj
2024-12-27 20:46:35 +08:00
committed by GitHub
parent 76695e5c90
commit 1058cf2151
3 changed files with 21 additions and 17 deletions

View File

@@ -321,19 +321,17 @@ class TreeNodeView extends React.Component {
)}
<i className="tree-node-icon">{icon}</i>
</div>
{isNodeMenuShow && (
{isNodeMenuShow && ((userPerm === 'rw' || permission || isCustomPermission) && this.state.isShowOperationMenu) && (
<div className="right-icon">
{((userPerm === 'rw' || permission || isCustomPermission) && this.state.isShowOperationMenu) && (
<ItemDropdownMenu
item={this.props.node}
toggleClass={'sf3-font sf3-font-more-vertical'}
getMenuList={this.calculateMenuList}
onMenuItemClick={this.onMenuItemClick}
freezeItem={this.props.freezeItem}
unfreezeItem={this.unfreezeItem}
menuStyle={isMobile ? { zIndex: 1050 } : {}}
/>
)}
<ItemDropdownMenu
item={this.props.node}
toggleClass={'sf3-font sf3-font-more-vertical'}
getMenuList={this.calculateMenuList}
onMenuItemClick={this.onMenuItemClick}
freezeItem={this.props.freezeItem}
unfreezeItem={this.unfreezeItem}
menuStyle={isMobile ? { zIndex: 1050 } : {}}
/>
</div>
)}
</div>