|
@@ -18,9 +18,6 @@ import {
|
|
|
ILauncher, LauncherModel, LauncherWidget
|
|
|
} from '@jupyterlab/launcher';
|
|
|
|
|
|
-import {
|
|
|
- VirtualNode, h
|
|
|
-} from '@phosphor/virtualdom';
|
|
|
|
|
|
import {
|
|
|
Widget
|
|
@@ -37,31 +34,6 @@ namespace CommandIDs {
|
|
|
const create = 'launcher-jupyterlab:create';
|
|
|
};
|
|
|
|
|
|
-/**
|
|
|
- * The class name added to the launcher header section.
|
|
|
- */
|
|
|
-const LAUNCHER_HEADER_CLASS = 'jp-Launcher-header';
|
|
|
-
|
|
|
-/**
|
|
|
- * The class name for the JupyterLab icon from default-theme.
|
|
|
- */
|
|
|
-const JUPYTERLAB_ICON_CLASS = 'jp-ImageJupyterLab';
|
|
|
-
|
|
|
-/**
|
|
|
- * The class name added to specify size of the JupyterLab logo.
|
|
|
- */
|
|
|
-const LAUNCHER_LOGO_CLASS = 'jp-Launcher-logo';
|
|
|
-
|
|
|
-/**
|
|
|
- * The class name added to the preview message subtitle.
|
|
|
- */
|
|
|
-const LAUNCHER_SUBTITLE_CLASS = 'jp-Launcher-subtitle';
|
|
|
-
|
|
|
-/**
|
|
|
- * The class name added to the header text.
|
|
|
- */
|
|
|
-const LAUNCHER_BODY_HEADER_CLASS = 'jp-Launcher-body-header';
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* A service providing an interface to the the launcher.
|
|
@@ -101,11 +73,7 @@ function activate(app: JupyterLab, services: IServiceManager, palette: ICommandP
|
|
|
shell.addToMainArea(item, { ref: id });
|
|
|
shell.activateById(item.id);
|
|
|
};
|
|
|
- let header: VirtualNode;
|
|
|
- if (args['banner'] === true) {
|
|
|
- header = Private.createBanner(app.info.version);
|
|
|
- }
|
|
|
- let widget = new LauncherWidget({ cwd, callback, header });
|
|
|
+ let widget = new LauncherWidget({ cwd, callback });
|
|
|
widget.model = model;
|
|
|
widget.id = id;
|
|
|
widget.title.label = 'Launcher';
|
|
@@ -132,30 +100,4 @@ namespace Private {
|
|
|
*/
|
|
|
export
|
|
|
let id = 0;
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * Create a banner given an app version.
|
|
|
- */
|
|
|
- export
|
|
|
- function createBanner(version: string): VirtualNode {
|
|
|
- let previewMessage = `alpha (v${version})`;
|
|
|
- let headerText = 'Start a new activity';
|
|
|
- let logo = h.span({
|
|
|
- className: `${JUPYTERLAB_ICON_CLASS} ${LAUNCHER_LOGO_CLASS}`
|
|
|
- });
|
|
|
- let subtitle = h.span(
|
|
|
- {className: LAUNCHER_SUBTITLE_CLASS},
|
|
|
- previewMessage
|
|
|
- );
|
|
|
- let bodyheader = h.span({
|
|
|
- className: LAUNCHER_BODY_HEADER_CLASS
|
|
|
- }, headerText);
|
|
|
-
|
|
|
- return h.div({ className: LAUNCHER_HEADER_CLASS},
|
|
|
- logo,
|
|
|
- subtitle,
|
|
|
- bodyheader
|
|
|
- );
|
|
|
- }
|
|
|
}
|