1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 15:53:28 +00:00

Mobile item op menu fixup (#7590)

* [my libs] fixed the operation menu items for library items in mobile after
reactstrap was upgraded from v8 to v9

- after the upgrade for reacstrap, the operation menu items fail to work

* [shared dir view] fixed the operation menu items in mobile

* [new component] added a new component 'MobileItemMenu' for items' operation menu in mobile

* [user settings] linked devices: fixed the operation menus in mobile

* [library content view] fixed the operation menus in mobile

* [department/group repo list, shared with all] fixed the operation menus in mobile

* [shared with me] fixed the operation menus in mobile

* [Favorites] fixed the operation menus in mobile

* [share admin / libraries] fixed the operation menus in mobile

* [share admin / folders] fixed the operation menus in mobile

* [share admin / share links] fixed the operation menus in mobile

* [share admin / upload links] fixed the operation menus in mobile

* [linked devices] fixed the operation menus in mobile

* [invite guest] fixed the operation menus in mobile

* [repo trash dialog] fixed the operation menus in mobile
This commit is contained in:
llj
2025-03-14 17:09:04 +08:00
committed by GitHub
parent 83be683b99
commit 94553e0ef1
16 changed files with 195 additions and 383 deletions

View File

@@ -26,6 +26,7 @@ import ViewModes from './components/view-modes';
import SortMenu from './components/sort-menu';
import { TreeHelper, TreeNode, TreeView } from './components/shared-dir-tree-view';
import ResizeBar from './components/resize-bar';
import MobileItemMenu from './components/mobile-item-menu';
import {
DRAG_HANDLER_HEIGHT, INIT_SIDE_PANEL_RATE, MAX_SIDE_PANEL_RATE, MIN_SIDE_PANEL_RATE
} from './components/resize-bar/constants';
@@ -1152,22 +1153,9 @@ class Item extends React.Component {
</td>
<td>
{showDownloadIcon &&
<Dropdown isOpen={this.state.isOpMenuOpen} toggle={this.toggleOpMenu}>
<DropdownToggle
tag="i"
className="sf-dropdown-toggle sf3-font sf3-font-more-vertical ml-0"
title={gettext('More operations')}
aria-label={gettext('More operations')}
data-toggle="dropdown"
aria-expanded={this.state.isOpMenuOpen}
/>
<div className={this.state.isOpMenuOpen ? '' : 'd-none'} onClick={this.toggleOpMenu}>
<div className="mobile-operation-menu-bg-layer"></div>
<div className="mobile-operation-menu">
<DropdownItem className="mobile-menu-item" onClick={this.zipDownloadFolder}>{gettext('Download')}</DropdownItem>
</div>
</div>
</Dropdown>
<MobileItemMenu>
<DropdownItem className="mobile-menu-item" onClick={this.zipDownloadFolder}>{gettext('Download')}</DropdownItem>
</MobileItemMenu>
}
</td>
</tr>
@@ -1232,22 +1220,9 @@ class Item extends React.Component {
</td>
<td>
{showDownloadIcon &&
<Dropdown isOpen={this.state.isOpMenuOpen} toggle={this.toggleOpMenu}>
<DropdownToggle
tag="i"
className="sf-dropdown-toggle sf3-font sf3-font-more-vertical ml-0"
title={gettext('More operations')}
aria-label={gettext('More operations')}
data-toggle="dropdown"
aria-expanded={this.state.isOpMenuOpen}
/>
<div className={this.state.isOpMenuOpen ? '' : 'd-none'} onClick={this.toggleOpMenu}>
<div className="mobile-operation-menu-bg-layer"></div>
<div className="mobile-operation-menu">
<DropdownItem className="mobile-menu-item" tag="a" href={`${fileURL}&dl=1`}>{gettext('Download')}</DropdownItem>
</div>
</div>
</Dropdown>
<MobileItemMenu>
<DropdownItem className="mobile-menu-item" tag="a" href={`${fileURL}&dl=1`}>{gettext('Download')}</DropdownItem>
</MobileItemMenu>
}
</td>
</tr>