Steven Silvester пре 8 година
родитељ
комит
7f26f69021

+ 0 - 8
packages/docmanager-extension/src/index.ts

@@ -22,14 +22,6 @@ import {
   Contents, IServiceManager
 } from '@jupyterlab/services';
 
-import {
-  each
-} from '@phosphor/algorithm';
-
-import {
-  DisposableSet
-} from '@phosphor/disposable';
-
 import {
   Menu
 } from '@phosphor/widgets';

+ 9 - 5
packages/launcher/src/index.ts

@@ -127,7 +127,7 @@ interface ILauncherItem {
    *
    * The default value is an empty string.
    */
-  iconClass: string;
+  iconClass?: string;
 
   /**
    * The icon label for the launcher item.
@@ -138,17 +138,21 @@ interface ILauncherItem {
    *
    * The default value is an empty string.
    */
-  iconLabel: string;
+  iconLabel?: string;
 
   /**
    * The identifier for the launcher item.
+   *
+   * The default value is the displayName.
    */
-  name: string;
+  name?: string;
 
   /**
    * The category for the launcher item.
+   *
+   * The default value is the displayName.
    */
-  category: string;
+  category?: string;
 
   /**
    * The rank for the launcher item.
@@ -161,7 +165,7 @@ interface ILauncherItem {
    *
    * The default rank is `Infinity`.
    */
-  rank: number;
+  rank?: number;
 }
 
 

+ 10 - 2
packages/terminal-extension/src/index.ts

@@ -129,8 +129,16 @@ function activate(app: JupyterLab, services: IServiceManager, mainMenu: IMainMen
   // Add a launcher item if the launcher is available.
   if (launcher) {
     launcher.add({
-      name: 'Terminal',
-      command: CommandIDs.createNew
+      displayName: 'Terminal',
+      iconClass: TERMINAL_ICON_CLASS,
+      callback: () => {
+        let term = new Terminal();
+        term.title.closable = true;
+        term.title.icon = TERMINAL_ICON_CLASS;
+        term.title.label = '...';
+        services.terminals.startNew();
+        return Promise.resolve(term);
+      }
     });
   }