mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
12.0 remove groups page (#6325)
* 12.0 remove groups page * redirect groups to libraries page
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import CreateGroupDialog from '../../components/dialog/create-group-dialog';
|
||||
|
||||
const propTypes = {
|
||||
onCreateGroup: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
class GroupsToolbar extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
isDialogOpen: false
|
||||
};
|
||||
}
|
||||
|
||||
toggleDialog = () => {
|
||||
this.setState({
|
||||
isDialogOpen: !this.state.isDialogOpen
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
{Utils.isDesktop() ? (
|
||||
<div className="operation">
|
||||
<button className="btn btn-secondary operation-item" onClick={this.toggleDialog}>
|
||||
<i className="sf3-font-new-group1 sf3-font text-secondary mr-1"></i>{gettext('New Group')}
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<span className="sf2-icon-plus mobile-toolbar-icon" title={gettext('New Group')} onClick={this.toggleDialog}></span>
|
||||
)}
|
||||
{this.state.isDialogOpen &&
|
||||
<CreateGroupDialog
|
||||
toggleDialog={this.toggleDialog}
|
||||
onCreateGroup={this.props.onCreateGroup}
|
||||
/>
|
||||
}
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
GroupsToolbar.propTypes = propTypes;
|
||||
|
||||
export default GroupsToolbar;
|
Reference in New Issue
Block a user