mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 02:10:24 +00:00
modify wiki-mode to list-mode url (#2675)
This commit is contained in:
@@ -23,7 +23,7 @@ class ViewModeToolbar extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div className="view-mode btn-group">
|
<div className="view-mode btn-group">
|
||||||
<button className={`${baseClass} sf2-icon-list-view ${this.props.currentMode === 'list' ? 'current-mode' : ''}`} id='list' title={gettext('List')} onClick={this.switchViewMode}></button>
|
<button className={`${baseClass} sf2-icon-list-view ${this.props.currentMode === 'list' ? 'current-mode' : ''}`} id='list' title={gettext('List')} onClick={this.switchViewMode}></button>
|
||||||
<button className={`${baseClass} sf2-icon-grid-view ${this.props.currentMode === 'grid' ? 'current-mode' : ''}`} id='grid' title={gettext('Grid')} onClick={this.switchViewMode}></button>
|
{/* <button className={`${baseClass} sf2-icon-grid-view ${this.props.currentMode === 'grid' ? 'current-mode' : ''}`} id='grid' title={gettext('Grid')} onClick={this.switchViewMode}></button> */}
|
||||||
<button className={`${baseClass} sf2-icon-two-columns ${this.props.currentMode === 'wiki' ? 'current-mode' : ''}`} id='wiki' title={gettext('wiki')} onClick={this.switchViewMode}></button>
|
<button className={`${baseClass} sf2-icon-two-columns ${this.props.currentMode === 'wiki' ? 'current-mode' : ''}`} id='wiki' title={gettext('wiki')} onClick={this.switchViewMode}></button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@@ -96,8 +96,9 @@ class MainPanel extends Component {
|
|||||||
|
|
||||||
switchViewMode = (mode) => {
|
switchViewMode = (mode) => {
|
||||||
cookie.save('view_mode', mode, { path: '/' });
|
cookie.save('view_mode', mode, { path: '/' });
|
||||||
|
let repoName = this.state.currentRepoInfo.repo_name;
|
||||||
let dirPath = this.props.isViewFile ? Utils.getDirName(this.props.path) : this.props.path;
|
let dirPath = this.props.isViewFile ? Utils.getDirName(this.props.path) : this.props.path;
|
||||||
window.location.href = siteRoot + '#common/lib/' + repoID + dirPath;
|
window.location.href = siteRoot + 'library/' + repoID + '/' + repoName + dirPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
onSideNavMenuClick = () => {
|
onSideNavMenuClick = () => {
|
||||||
|
Reference in New Issue
Block a user