Skip to content

Commit 76cd29d

Browse files
committed
Remove not in git repo
1 parent 1155201 commit 76cd29d

File tree

3 files changed

+4
-34
lines changed

3 files changed

+4
-34
lines changed

src/components/GitPanel.tsx

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
import * as React from 'react';
22
import { showErrorMessage, showDialog } from '@jupyterlab/apputils';
33
import { ISettingRegistry } from '@jupyterlab/coreutils';
4+
import { FileBrowserModel } from '@jupyterlab/filebrowser';
45
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
56
import { JSONObject } from '@phosphor/coreutils';
67
import { GitExtension } from '../model';
7-
import {
8-
findRepoButtonStyle,
9-
panelContainerStyle,
10-
panelWarningStyle
11-
} from '../style/GitPanelStyle';
8+
import { panelContainerStyle } from '../style/GitPanelStyle';
129
import { Git } from '../tokens';
1310
import { decodeStage } from '../utils';
1411
import { GitAuthorForm } from '../widgets/AuthorBox';
1512
import { BranchHeader } from './BranchHeader';
13+
import { CommitBox } from './CommitBox';
1614
import { FileList } from './FileList';
1715
import { HistorySideBar } from './HistorySideBar';
1816
import { PathHeader } from './PathHeader';
19-
import { CommitBox } from './CommitBox';
20-
import { FileBrowserModel } from '@jupyterlab/filebrowser';
2117

2218
/** Interface for GitPanel component state */
2319
export interface IGitSessionNodeState {
@@ -201,7 +197,7 @@ export class GitPanel extends React.Component<
201197

202198
render() {
203199
let filelist: React.ReactElement;
204-
let main: React.ReactElement;
200+
let main: React.ReactElement = null;
205201
let sub: React.ReactElement;
206202
let msg: React.ReactElement;
207203

@@ -272,20 +268,6 @@ export class GitPanel extends React.Component<
272268
{sub}
273269
</React.Fragment>
274270
);
275-
} else {
276-
main = (
277-
<div className={panelWarningStyle}>
278-
<div>You aren’t in a git repository.</div>
279-
<button
280-
className={findRepoButtonStyle}
281-
onClick={() =>
282-
this.props.model.commands.execute('filebrowser:toggle-main')
283-
}
284-
>
285-
Go find a repo
286-
</button>
287-
</div>
288-
);
289271
}
290272

291273
return (

src/style/BranchHeaderStyle.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export const branchStyle = style({
88
});
99

1010
export const selectedHeaderStyle = style({
11-
borderTop: 'var(--jp-border-width) solid var(--jp-border-color2)',
1211
paddingBottom: 'var(--jp-border-width)'
1312
});
1413

src/style/GitPanelStyle.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,3 @@ export const panelContainerStyle = style({
99
background: 'var(--jp-layout-color1)',
1010
fontSize: 'var(--jp-ui-font-size1)'
1111
});
12-
13-
export const panelWarningStyle = style({
14-
textAlign: 'center',
15-
marginTop: '9px'
16-
});
17-
18-
export const findRepoButtonStyle = style({
19-
color: 'white',
20-
backgroundColor: 'var(--jp-brand-color1)',
21-
marginTop: '5px'
22-
});

0 commit comments

Comments
 (0)