Skip to content

Commit b3b41f4

Browse files
committed
Remove not in git repo
1 parent edeb443 commit b3b41f4

File tree

3 files changed

+3
-33
lines changed

3 files changed

+3
-33
lines changed

src/components/GitPanel.tsx

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
import { ISettingRegistry } from '@jupyterlab/coreutils';
2+
import { FileBrowserModel } from '@jupyterlab/filebrowser';
23
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
34
import * as React from 'react';
45
import { GitExtension } from '../model';
5-
import {
6-
findRepoButtonStyle,
7-
panelContainerStyle,
8-
panelWarningStyle
9-
} from '../style/GitPanelStyle';
6+
import { panelContainerStyle } from '../style/GitPanelStyle';
107
import { Git } from '../tokens';
118
import { decodeStage } from '../utils';
129
import { BranchHeader } from './BranchHeader';
1310
import { FileList } from './FileList';
1411
import { HistorySideBar } from './HistorySideBar';
1512
import { PathHeader } from './PathHeader';
16-
import { FileBrowserModel } from '@jupyterlab/filebrowser';
1713

1814
/** Interface for GitPanel component state */
1915
export interface IGitSessionNodeState {
@@ -163,7 +159,7 @@ export class GitPanel extends React.Component<
163159
};
164160

165161
render() {
166-
let main: React.ReactElement;
162+
let main: React.ReactElement = null;
167163
let sub: React.ReactElement;
168164

169165
if (this.state.isHistoryVisible) {
@@ -212,20 +208,6 @@ export class GitPanel extends React.Component<
212208
{sub}
213209
</React.Fragment>
214210
);
215-
} else {
216-
main = (
217-
<div className={panelWarningStyle}>
218-
<div>You aren’t in a git repository.</div>
219-
<button
220-
className={findRepoButtonStyle}
221-
onClick={() =>
222-
this.props.model.commands.execute('filebrowser:toggle-main')
223-
}
224-
>
225-
Go find a repo
226-
</button>
227-
</div>
228-
);
229211
}
230212

231213
return (

src/style/BranchHeaderStyle.ts

-1
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

-11
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)