Browse Source

fix: Launch Classic Notebook 按钮隐藏

zhouxinmin 1 year ago
parent
commit
5460c54dfc
1 changed files with 27 additions and 27 deletions
  1. 27 27
      packages/help-extension/src/index.tsx

+ 27 - 27
packages/help-extension/src/index.tsx

@@ -167,32 +167,32 @@ const about: JupyterFrontEndPlugin<void> = {
 /**
  * A plugin to add a command to open the Classic Notebook interface.
  */
-const launchClassic: JupyterFrontEndPlugin<void> = {
-  id: '@jupyterlab/help-extension:launch-classic',
-  autoStart: true,
-  requires: [ITranslator],
-  optional: [ICommandPalette],
-  activate: (
-    app: JupyterFrontEnd,
-    translator: ITranslator,
-    palette: ICommandPalette | null
-  ): void => {
-    const { commands } = app;
-    const trans = translator.load('jupyterlab');
-    const category = trans.__('Help');
-
-    commands.addCommand(CommandIDs.launchClassic, {
-      label: trans.__('Launch Classic Notebook'),
-      execute: () => {
-        window.open(PageConfig.getBaseUrl() + 'tree');
-      }
-    });
-
-    if (palette) {
-      palette.addItem({ command: CommandIDs.launchClassic, category });
-    }
-  }
-};
+// const launchClassic: JupyterFrontEndPlugin<void> = {
+//   id: '@jupyterlab/help-extension:launch-classic',
+//   autoStart: true,
+//   requires: [ITranslator],
+//   optional: [ICommandPalette],
+//   activate: (
+//     app: JupyterFrontEnd,
+//     translator: ITranslator,
+//     palette: ICommandPalette | null
+//   ): void => {
+//     const { commands } = app;
+//     const trans = translator.load('jupyterlab');
+//     const category = trans.__('Help');
+
+//     commands.addCommand(CommandIDs.launchClassic, {
+//       label: trans.__('Launch Classic Notebook'),
+//       execute: () => {
+//         window.open(PageConfig.getBaseUrl() + 'tree');
+//       }
+//     });
+
+//     if (palette) {
+//       palette.addItem({ command: CommandIDs.launchClassic, category });
+//     }
+//   }
+// };
 
 /**
  * A plugin to add a command to open the Jupyter Forum.
@@ -636,7 +636,7 @@ const licenses: JupyterFrontEndPlugin<void> = {
 
 const plugins: JupyterFrontEndPlugin<any>[] = [
   about,
-  launchClassic,
+  // launchClassic,
   jupyterForum,
   resources,
   licenses