1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 10:58:33 +00:00

add repo in right tool panel (#7410)

This commit is contained in:
Michael An
2025-01-22 14:38:40 +08:00
committed by GitHub
parent cfe507f178
commit b07f33e07c
7 changed files with 75 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ import { GRID_MODE, LIST_MODE } from './dir-view-mode/constants';
import '../css/view-modes.css';
const propTypes = {
className: PropTypes.string,
currentViewMode: PropTypes.string.isRequired,
switchViewMode: PropTypes.func.isRequired
};
@@ -47,7 +48,7 @@ class ViewModes extends React.Component {
render() {
const { isDropdownMenuOpen } = this.state;
const { currentViewMode } = this.props;
const { currentViewMode, className = '' } = this.props;
const shortcutMain = Utils.isMac() ? '⇧ ⌘' : 'Ctrl + Shift +';
const options = [
{ 'icon': 'list-view', 'text': gettext('List view'), 'value': LIST_MODE, 'shortcut': `${shortcutMain} 1` },
@@ -58,6 +59,7 @@ class ViewModes extends React.Component {
isOpen={isDropdownMenuOpen}
toggle={this.toggleDropdownMenu}
id="cur-view-change-mode-dropdown"
className={className}
>
<DropdownToggle
tag="div"