1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 04:48:03 +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

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { Dropdown, DropdownMenu, DropdownToggle, DropdownItem } from 'reactstrap';
import { gettext, isPro, folderPermEnabled, enableRepoSnapshotLabel, enableResetEncryptedRepoPassword, isEmailConfigured, enableMultipleOfficeSuite } from '../../utils/constants';
import { Utils } from '../../utils/utils';
import MobileItemMenu from '../../components/mobile-item-menu';
const propTypes = {
isPC: PropTypes.bool,
@@ -251,27 +252,11 @@ class MylibRepoMenu extends React.Component {
this.props.isStarred ? operations.unshift('Unstar') : operations.unshift('Star');
return (
<Dropdown isOpen={this.state.isItemMenuShow} toggle={this.toggleOperationMenu}>
<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.isItemMenuShow}
/>
<div className={`${this.state.isItemMenuShow ? '' : 'd-none'}`} onClick={this.toggleOperationMenu}>
<div className="mobile-operation-menu-bg-layer"></div>
<div className="mobile-operation-menu">
{operations.map((item, index) => {
if (item != 'Divider') {
return (<DropdownItem key={index} className="mobile-menu-item" data-toggle={item} onClick={this.onMenuItemClick}>{this.translateOperations(item)}</DropdownItem>);
}
return null;
})}
</div>
</div>
</Dropdown>
<MobileItemMenu isOpen={this.state.isItemMenuShow} toggle={this.toggleOperationMenu}>
{operations.filter(item => item != 'Divider').map((item, index) => {
return (<DropdownItem key={index} className="mobile-menu-item" data-toggle={item} onClick={this.onMenuItemClick}>{this.translateOperations(item)}</DropdownItem>);
})}
</MobileItemMenu>
);
}
}