|
1 | 1 | import * as React from 'react';
|
2 | 2 | import { showErrorMessage, showDialog } from '@jupyterlab/apputils';
|
3 | 3 | import { ISettingRegistry } from '@jupyterlab/coreutils';
|
| 4 | +import { FileBrowserModel } from '@jupyterlab/filebrowser'; |
4 | 5 | import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
|
5 | 6 | import { JSONObject } from '@phosphor/coreutils';
|
6 | 7 | import { GitExtension } from '../model';
|
7 |
| -import { |
8 |
| - findRepoButtonStyle, |
9 |
| - panelContainerStyle, |
10 |
| - panelWarningStyle |
11 |
| -} from '../style/GitPanelStyle'; |
| 8 | +import { panelContainerStyle } from '../style/GitPanelStyle'; |
12 | 9 | import { Git } from '../tokens';
|
13 | 10 | import { decodeStage } from '../utils';
|
14 | 11 | import { GitAuthorForm } from '../widgets/AuthorBox';
|
15 | 12 | import { BranchHeader } from './BranchHeader';
|
| 13 | +import { CommitBox } from './CommitBox'; |
16 | 14 | import { FileList } from './FileList';
|
17 | 15 | import { HistorySideBar } from './HistorySideBar';
|
18 | 16 | import { PathHeader } from './PathHeader';
|
19 |
| -import { CommitBox } from './CommitBox'; |
20 |
| -import { FileBrowserModel } from '@jupyterlab/filebrowser'; |
21 | 17 |
|
22 | 18 | /** Interface for GitPanel component state */
|
23 | 19 | export interface IGitSessionNodeState {
|
@@ -201,7 +197,7 @@ export class GitPanel extends React.Component<
|
201 | 197 |
|
202 | 198 | render() {
|
203 | 199 | let filelist: React.ReactElement;
|
204 |
| - let main: React.ReactElement; |
| 200 | + let main: React.ReactElement = null; |
205 | 201 | let sub: React.ReactElement;
|
206 | 202 | let msg: React.ReactElement;
|
207 | 203 |
|
@@ -272,20 +268,6 @@ export class GitPanel extends React.Component<
|
272 | 268 | {sub}
|
273 | 269 | </React.Fragment>
|
274 | 270 | );
|
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 |
| - ); |
289 | 271 | }
|
290 | 272 |
|
291 | 273 | return (
|
|
0 commit comments