@@ -13,7 +13,7 @@ import {
13
13
} from '@phosphor/widgets' ;
14
14
15
15
import {
16
- PathExt
16
+ PathExt
17
17
} from '@jupyterlab/coreutils' ;
18
18
19
19
import {
@@ -172,16 +172,16 @@ export namespace StatusFiles {
172
172
staged_files : any ;
173
173
unstaged_files : any ;
174
174
untracked_files : any ;
175
-
175
+
176
176
app :JupyterLab ;
177
177
refresh : any ;
178
178
}
179
179
}
180
180
181
181
export class StatusFiles extends React . Component < StatusFiles . IProps , StatusFiles . IState > {
182
182
contextmenu_typeX : string ;
183
- contextmenu_typeY : string ;
184
- contextmenu_file :string ;
183
+ contextmenu_typeY : string ;
184
+ contextmenu_file :string ;
185
185
186
186
constructor ( props : StatusFiles . IProps ) {
187
187
super ( props ) ;
@@ -248,7 +248,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
248
248
this . state . contextmenu_untracked . addItem ( { command : CommandIDs . git_file_Open } ) ;
249
249
this . state . contextmenu_untracked . addItem ( { command : CommandIDs . git_file_Track } ) ;
250
250
251
-
251
+
252
252
}
253
253
handleClickStaged ( event ) { //need to disable native action first
254
254
event . preventDefault ( ) ;
@@ -286,7 +286,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
286
286
this . contextmenu_file = file ;
287
287
this . state . contextmenu_untracked . open ( event . clientX , event . clientY ) ;
288
288
}
289
-
289
+
290
290
291
291
handleChange ( event ) {
292
292
if ( event . target . value && event . target . value != '' ) {
@@ -338,10 +338,10 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
338
338
return (
339
339
< div onContextMenu = { ( e ) => { e . preventDefault ( ) } } >
340
340
< div className = 'jp-Git-section-fileContainer' >
341
- < div className = 'jp-Git-staged' >
341
+ < div className = 'jp-Git-staged' >
342
342
< span className = 'jp-Git-staged-header-label' > Staged({ ( this . props . staged_files ) . length } )< button className = { this . state . staged_show ?`jp-Git-button ${ JP_IMAGE_CARET_DOWN_WHITE } ` :`jp-Git-button ${ JP_IMAGE_CARET_RIGHT_WHITE } ` } onClick = { ( ) => this . dropdown_staged ( ) } > </ button > </ span >
343
343
< ToggleDisplay show = { this . props . staged_files . length > 0 } >
344
-
344
+
345
345
< button className = { `jp-Git-header-button ${ GIT_BUTTON_RESET_WHITE } ` } title = 'Reset all staged changes' onClick = { ( ) => { reset_all_StagedNode ( this . props . top_repo_path , this . props . refresh ) , this . init_input ( ) } } > </ button >
346
346
</ ToggleDisplay >
347
347
</ div >
@@ -352,7 +352,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
352
352
< textarea className = 'jp-Git-staged-commit-msg' disabled = { ( this . props . staged_files ) . length == 0 } placeholder = { ( this . props . staged_files ) . length == 0 ?'Stage your changes before commit' :'Input message to commit staged changes' } value = { this . state . commit_msg } onChange = { this . handleChange } />
353
353
< input className = { this . commit_box_class_selection ( this . state . commit_disable , this . props . staged_files . length ) } type = "button" title = 'Commit' value = { '\u2714' } disabled = { this . state . commit_disable } onClick = { ( ) => { commit_all_StagedNode ( this . state . commit_msg , this . props . top_repo_path , this . props . refresh ) , this . init_input ( ) } } />
354
354
</ form >
355
-
355
+
356
356
{ this . props . staged_files . map ( ( file , file_index ) =>
357
357
< li className = { GIT_FILE } key = { file_index } >
358
358
< span className = { `${ GIT_FILE_ICON } ${ parseFileExtension ( file . to ) } ` } />
@@ -367,7 +367,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
367
367
</ div >
368
368
< div className = 'jp-Git-section-fileContainer' >
369
369
< div className = 'jp-Git-unstaged' >
370
- < span className = 'jp-Git-unstaged-header-label' > Unstaged({ ( this . props . unstaged_files ) . length } )</ span >
370
+ < span className = 'jp-Git-unstaged-header-label' > Unstaged({ ( this . props . unstaged_files ) . length } )</ span >
371
371
< ToggleDisplay show = { this . props . unstaged_files . length > 0 } >
372
372
< button className = { this . state . unstaged_show ?`jp-Git-button ${ JP_IMAGE_CARET_DOWN } ` :`jp-Git-button ${ JP_IMAGE_CARET_RIGHT } ` } onClick = { ( ) => this . dropdown_unstaged ( ) } > </ button >
373
373
< button className = { `jp-Git-header-button ${ GIT_BUTTON_ADD } ` } title = 'Stage all the changes' onClick = { ( ) => add_all_UnstagedNode ( this . props . top_repo_path , this . props . refresh ) } > </ button >
@@ -442,8 +442,8 @@ async function open_listed_file(typeX: string,typeY: string, path:string, app:Ju
442
442
( fb as any ) . _listing . _manager . openOrReveal ( open_file_path + path ) ;
443
443
}
444
444
else {
445
- console . log ( "Cannot open a folder here" )
446
- } ;
445
+ console . log ( "Cannot open a folder here" ) ;
446
+ } ;
447
447
} catch ( err0 ) { }
448
448
}
449
449
@@ -468,7 +468,7 @@ function reset_StagedNode(file:string, path:string, refresh){
468
468
let git_temp = new Git ( ) ;
469
469
git_temp . reset ( false , file , path ) . then ( response => {
470
470
refresh ( ) ;
471
-
471
+
472
472
} ) ;
473
473
}
474
474
@@ -521,7 +521,7 @@ function discard_UnstagedNode(file:string, path:string, refresh){
521
521
522
522
//functions for untracked nodes
523
523
function add_all_UntrackedNode ( path :string , refresh ) {
524
- console . log ( 'add all untracked' )
524
+ console . log ( 'add all untracked' ) ;
525
525
let git_temp = new Git ( ) ;
526
526
git_temp . add_all_untracked ( path ) . then ( response => {
527
527
refresh ( ) ;
0 commit comments