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

rename-dismiss-group

This commit is contained in:
Michael18811380328
2018-12-19 10:44:23 +08:00
parent 3bbb44602b
commit e1b5c7c58b
5 changed files with 223 additions and 7 deletions

View File

@@ -113,6 +113,19 @@ class App extends Component {
}
}
onGroupChanged = (groupID) => {
setTimeout(function(){
let url = new URL(window.location.origin);
if (groupID) {
url = url + 'group/' + groupID + '/';
}
else {
url = url + 'groups/';
}
window.location = url.toString();
}, 1);
}
tabItemClick = (tabName, groupID) => {
let pathPrefix = [];
if (groupID || this.dirViewPanels.indexOf(tabName) > -1) {
@@ -200,7 +213,13 @@ class App extends Component {
<MyLibDeleted path={siteRoot + 'my-libs/deleted/'} onSearchedClick={this.onSearchedClick} />
<DirView path={siteRoot + 'library/:repoID/*'} pathPrefix={this.state.pathPrefix} onMenuClick={this.onShowSidePanel} onTabNavClick={this.tabItemClick}/>
<Groups path={siteRoot + 'groups'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick}/>
<Group path={siteRoot + 'group/:groupID'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} onTabNavClick={this.tabItemClick}/>
<Group
path={siteRoot + 'group/:groupID'}
onShowSidePanel={this.onShowSidePanel}
onSearchedClick={this.onSearchedClick}
onTabNavClick={this.tabItemClick}
onGroupChanged={this.onGroupChanged}
/>
<WikisWrapper path={siteRoot + 'wikis'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick}/>
</Router>
</MainPanel>