Skip to content

Commit 43ce3ea

Browse files
Updated to build on Juno, but doesn't seem to actually function though
1 parent 19f52cd commit 43ce3ea

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
},
2424
"dependencies": {
2525
"@angular/core": "^4.3.1",
26-
"@jupyterlab/application": "^0.10.0",
27-
"@jupyterlab/apputils": "^0.10.0",
28-
"@jupyterlab/console": "^0.10.0",
29-
"@jupyterlab/filebrowser": "^0.10.0",
30-
"@jupyterlab/terminal": "^0.10.0",
26+
"@jupyterlab/application": "^0.12.0",
27+
"@jupyterlab/apputils": "^0.12.0",
28+
"@jupyterlab/console": "^0.12.0",
29+
"@jupyterlab/filebrowser": "^0.12.0",
30+
"@jupyterlab/terminal": "^0.12.0",
3131
"@jupyterlab/theming": "^0.9.0",
3232
"@types/react": "^16.0.0",
33-
"@types/react-dom": "^15.5.2",
3433
"jquery": "^2.2.0",
3534
"nbdime": "^0.4.0",
3635
"react": "^15.6.1",
@@ -48,11 +47,11 @@
4847
},
4948
"repository": {
5049
"type": "git",
51-
"url": "git+https://github.com/zzhangjii/jupyterlab-git.git"
50+
"url": "https://github.com/ViaSat/jupyterlab-git.git"
5251
},
5352
"license": "ISC",
5453
"bugs": {
55-
"url": "https://github.com/zzhangjii/jupyterlab-git/issues"
54+
"url": "https://github.com/ViaSat/jupyterlab-git/issues"
5655
},
57-
"homepage": "https://github.com/zzhangjii/jupyterlab-git#readme"
56+
"homepage": "https://github.com/ViaSat/jupyterlab-git#readme"
5857
}

src/components/statusFiles.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '@phosphor/widgets';
1414

1515
import {
16-
PathExt
16+
PathExt
1717
} from '@jupyterlab/coreutils';
1818

1919
import {
@@ -172,16 +172,16 @@ export namespace StatusFiles {
172172
staged_files: any;
173173
unstaged_files: any;
174174
untracked_files: any;
175-
175+
176176
app:JupyterLab;
177177
refresh: any;
178178
}
179179
}
180180

181181
export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles.IState>{
182182
contextmenu_typeX: string;
183-
contextmenu_typeY: string;
184-
contextmenu_file:string;
183+
contextmenu_typeY: string;
184+
contextmenu_file:string;
185185

186186
constructor(props: StatusFiles.IProps) {
187187
super(props);
@@ -248,7 +248,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
248248
this.state.contextmenu_untracked.addItem({ command: CommandIDs.git_file_Open });
249249
this.state.contextmenu_untracked.addItem({ command: CommandIDs.git_file_Track });
250250

251-
251+
252252
}
253253
handleClickStaged(event){//need to disable native action first
254254
event.preventDefault();
@@ -286,7 +286,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
286286
this.contextmenu_file = file;
287287
this.state.contextmenu_untracked.open(event.clientX, event.clientY);
288288
}
289-
289+
290290

291291
handleChange(event){
292292
if(event.target.value&&event.target.value!=''){
@@ -338,10 +338,10 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
338338
return (
339339
<div onContextMenu={(e)=>{e.preventDefault()}}>
340340
<div className= 'jp-Git-section-fileContainer' >
341-
<div className='jp-Git-staged'>
341+
<div className='jp-Git-staged'>
342342
<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>
343343
<ToggleDisplay show={this.props.staged_files.length>0}>
344-
344+
345345
<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>
346346
</ToggleDisplay>
347347
</div>
@@ -352,7 +352,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
352352
<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}/>
353353
<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()}}/>
354354
</form>
355-
355+
356356
{this.props.staged_files.map((file, file_index)=>
357357
<li className={GIT_FILE} key={file_index}>
358358
<span className={`${GIT_FILE_ICON} ${parseFileExtension(file.to)}`} />
@@ -367,7 +367,7 @@ export class StatusFiles extends React.Component<StatusFiles.IProps, StatusFiles
367367
</div>
368368
<div className= 'jp-Git-section-fileContainer'>
369369
<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>
371371
<ToggleDisplay show={this.props.unstaged_files.length>0}>
372372
<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>
373373
<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
442442
(fb as any)._listing._manager.openOrReveal(open_file_path+path);
443443
}
444444
else{
445-
console.log("Cannot open a folder here")
446-
};
445+
console.log("Cannot open a folder here");
446+
};
447447
}catch(err0){}
448448
}
449449

@@ -468,7 +468,7 @@ function reset_StagedNode(file:string, path:string, refresh){
468468
let git_temp = new Git();
469469
git_temp.reset(false, file, path).then(response=>{
470470
refresh();
471-
471+
472472
});
473473
}
474474

@@ -521,7 +521,7 @@ function discard_UnstagedNode(file:string, path:string, refresh){
521521

522522
//functions for untracked nodes
523523
function add_all_UntrackedNode(path:string,refresh){
524-
console.log('add all untracked')
524+
console.log('add all untracked');
525525
let git_temp = new Git();
526526
git_temp.add_all_untracked(path).then(response=>{
527527
refresh();

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const plugin: JupyterLabPlugin<IGitExtension> = {
4545
*/
4646
export default plugin;
4747

48-
export const EXTENSION_ID = 'jupyter.extensions.git_plugin'
48+
export const EXTENSION_ID = 'jupyter.extensions.git_plugin';
4949

5050
export const IGitExtension = new Token<IGitExtension>(EXTENSION_ID);
5151

@@ -116,7 +116,7 @@ function activate(app: JupyterLab, fb:FileBrowser, mainMenu: IMainMenu, restorer
116116
].forEach(command =>{
117117
menu.addItem({command});
118118
});
119-
119+
120120
[
121121
CommandIDs.setup_remotes,
122122
CommandIDs.tutorial_Pull,
@@ -128,4 +128,4 @@ function activate(app: JupyterLab, fb:FileBrowser, mainMenu: IMainMenu, restorer
128128
menu.addItem({type: 'submenu' , submenu: tutorial});
129129
mainMenu.addMenu(menu,{rank:60});
130130
return git_extension;
131-
}
131+
}

0 commit comments

Comments
 (0)