Skip to content

Commit

Permalink
feat: new session start flow (#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
cramakri committed Aug 18, 2022
1 parent 8340587 commit aef9e47
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions client/src/project/Project.present.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,6 @@ class ProjectNav extends Component {
<NavItem>
<RenkuNavLink exact={false} to={this.props.datasetsUrl} title="Datasets" />
</NavItem>
<NavItem>
<RenkuNavLink exact={false} to={this.props.notebookServersUrl} title="Sessions" />
</NavItem>
<NavItem className="pe-0">
<RenkuNavLink exact={false} to={this.props.settingsUrl} title="Settings" />
</NavItem>
Expand Down Expand Up @@ -1076,8 +1073,8 @@ const ProjectSessions = (props) => {
const locationFrom = props.history?.location?.state?.from;
const filePath = props.history?.location?.state?.filePath;
const backNotebookLabel = filePath ? `Back to ${filePath}` : "Back to notebook file";
const backButtonLabel = locationFrom ? backNotebookLabel : "Back to sessions list";
const backUrl = locationFrom ?? props.notebookServersUrl;
const backButtonLabel = locationFrom ? backNotebookLabel : `Back to ${props.metadata.pathWithNamespace}`;
const backUrl = locationFrom ?? props.baseUrl;

const backButton = (<GoBackButton label={backButtonLabel} url={backUrl} />);

Expand Down Expand Up @@ -1403,9 +1400,14 @@ class ProjectView extends Component {
render={props => <ProjectViewHeader {...this.props} minimalistHeader={false}/>} />
<Route path={this.props.overviewUrl}
render={props => <ProjectViewHeader {...this.props} minimalistHeader={false}/>} />
<Route path={this.props.notebookServersUrl}
render={() => null} />
<Route component={()=><ProjectViewHeader {...this.props} minimalistHeader={true}/>} />
</Switch>
<ProjectNav key="nav" {...this.props} />
<Switch key="projectNav">
<Route path={this.props.notebookServersUrl} render={() => null} />
<Route component={() =><ProjectNav key="nav" {...this.props} />} />
</Switch>
<Row key="content">
<Switch>
<Route exact path={this.props.baseUrl}
Expand Down

0 comments on commit aef9e47

Please sign in to comment.