File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1- import { PathExt } from '@jupyterlab/coreutils' ;
1+ import { PageConfig , PathExt } from '@jupyterlab/coreutils' ;
22import {
33 caretDownIcon ,
44 caretUpIcon ,
@@ -228,25 +228,26 @@ export class Toolbar extends React.Component<IToolbarProps, IToolbarState> {
228228 * @returns React element
229229 */
230230 private _renderRepoMenu ( ) : React . ReactElement {
231+ const repositoryName =
232+ PathExt . basename (
233+ this . props . repository || PageConfig . getOption ( 'serverRoot' )
234+ ) || 'Jupyter Server Root' ;
231235 return (
232236 < div className = { toolbarMenuWrapperClass } >
233237 < button
234238 disabled
235239 className = { toolbarMenuButtonClass }
236240 title = { this . props . trans . __ (
237241 'Current repository: %1' ,
238- '/' + this . props . repository
242+ PageConfig . getOption ( 'serverRoot' ) + '/' + this . props . repository
239243 ) }
240244 >
241245 < desktopIcon . react className = { toolbarMenuButtonIconClass } />
242246 < div className = { toolbarMenuButtonTitleWrapperClass } >
243247 < p className = { toolbarMenuButtonTitleClass } >
244- { ' ' }
245- { this . props . trans . __ ( 'Current Repository' ) } { ' ' }
246- </ p >
247- < p className = { toolbarMenuButtonSubtitleClass } >
248- { PathExt . basename ( this . props . repository ) || '/' }
248+ { this . props . trans . __ ( 'Current Repository' ) }
249249 </ p >
250+ < p className = { toolbarMenuButtonSubtitleClass } > { repositoryName } </ p >
250251 </ div >
251252 </ button >
252253 </ div >
You can’t perform that action at this time.
0 commit comments