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' ;
2
2
import {
3
3
caretDownIcon ,
4
4
caretUpIcon ,
@@ -228,25 +228,26 @@ export class Toolbar extends React.Component<IToolbarProps, IToolbarState> {
228
228
* @returns React element
229
229
*/
230
230
private _renderRepoMenu ( ) : React . ReactElement {
231
+ const repositoryName =
232
+ PathExt . basename (
233
+ this . props . repository || PageConfig . getOption ( 'serverRoot' )
234
+ ) || 'Jupyter Server Root' ;
231
235
return (
232
236
< div className = { toolbarMenuWrapperClass } >
233
237
< button
234
238
disabled
235
239
className = { toolbarMenuButtonClass }
236
240
title = { this . props . trans . __ (
237
241
'Current repository: %1' ,
238
- '/' + this . props . repository
242
+ PageConfig . getOption ( 'serverRoot' ) + '/' + this . props . repository
239
243
) }
240
244
>
241
245
< desktopIcon . react className = { toolbarMenuButtonIconClass } />
242
246
< div className = { toolbarMenuButtonTitleWrapperClass } >
243
247
< 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' ) }
249
249
</ p >
250
+ < p className = { toolbarMenuButtonSubtitleClass } > { repositoryName } </ p >
250
251
</ div >
251
252
</ button >
252
253
</ div >
You can’t perform that action at this time.
0 commit comments