Browse Source

Update launcher plugin commands.

Afshin Darian 8 năm trước cách đây
mục cha
commit
b5a43fc2da
2 tập tin đã thay đổi với 7 bổ sung6 xóa
  1. 4 3
      src/launcher/index.ts
  2. 3 3
      src/launcher/plugin.ts

+ 4 - 3
src/launcher/index.ts

@@ -36,11 +36,12 @@ import {
 
 
 /**
- * The map of command ids used by the landing plugin.
+ * The command IDs used by the launcher plugin.
  */
 export
-const cmdIds = {
-  show: 'launcher-jupyterlab:show',
+namespace CommandIDs {
+  export
+  const show = 'launcher-jupyterlab:show';
 };
 
 

+ 3 - 3
src/launcher/plugin.ts

@@ -38,7 +38,7 @@ import {
 } from '../terminal';
 
 import {
-  ILauncher, ILauncherItem, LauncherModel, LauncherWidget, cmdIds
+  CommandIDs, ILauncher, ILauncherItem, LauncherModel, LauncherWidget
 } from './';
 
 
@@ -114,7 +114,7 @@ function activate(app: JupyterLab, services: IServiceManager, pathTracker: IPath
   // means we have to way of removing them after the fact.
   defaults.forEach(options => { model.add(options); });
 
-  app.commands.addCommand(cmdIds.show, {
+  app.commands.addCommand(CommandIDs.show, {
     label: 'Show Launcher',
     execute: () => {
       if (!widget.isAttached) {
@@ -123,7 +123,7 @@ function activate(app: JupyterLab, services: IServiceManager, pathTracker: IPath
       app.shell.activateLeft(widget.id);
     }
   });
-  palette.addItem({ command: cmdIds.show, category: 'Help' });
+  palette.addItem({ command: CommandIDs.show, category: 'Help' });
 
   app.shell.addToLeftArea(widget);