Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Rename leftover retro commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Feb 28, 2022
1 parent 261a9e7 commit 459f065
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/lab-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace CommandIDs {
/**
* Launch Jupyter Notebook Tree
*/
export const launchRetroTree = 'jupyter-notebook:launch-tree';
export const launchNotebookTree = 'jupyter-notebook:launch-tree';

/**
* Open Jupyter Notebook
Expand Down Expand Up @@ -123,7 +123,7 @@ const launchButtons: JupyterFrontEndPlugin<void> = {
addInterface({
command: CommandIDs.openNotebook,
commandLabel: trans.__('Open With %1', 'Jupyter Notebook'),
buttonLabel: 'openRetro',
buttonLabel: 'openNotebook',
urlPrefix: `${baseUrl}tree/`
});
}
Expand Down Expand Up @@ -155,7 +155,7 @@ const launchButtons: JupyterFrontEndPlugin<void> = {
/**
* A plugin to add a command to open the Jupyter Notebook Tree.
*/
const launchRetroTree: JupyterFrontEndPlugin<void> = {
const launchNotebookTree: JupyterFrontEndPlugin<void> = {
id: '@jupyter-notebook/lab-extension:launch-tree',
autoStart: true,
requires: [ITranslator],
Expand All @@ -170,7 +170,7 @@ const launchRetroTree: JupyterFrontEndPlugin<void> = {
const trans = translator.load('notebook');
const category = trans.__('Help');

commands.addCommand(CommandIDs.launchRetroTree, {
commands.addCommand(CommandIDs.launchNotebookTree, {
label: trans.__('Launch Jupyter Notebook File Browser'),
execute: () => {
window.open(PageConfig.getBaseUrl() + 'tree');
Expand All @@ -179,18 +179,21 @@ const launchRetroTree: JupyterFrontEndPlugin<void> = {

if (menu) {
const helpMenu = menu.helpMenu;
helpMenu.addGroup([{ command: CommandIDs.launchRetroTree }], 1);
helpMenu.addGroup([{ command: CommandIDs.launchNotebookTree }], 1);
}

if (palette) {
palette.addItem({ command: CommandIDs.launchRetroTree, category });
palette.addItem({ command: CommandIDs.launchNotebookTree, category });
}
}
};

/**
* Export the plugins as default.
*/
const plugins: JupyterFrontEndPlugin<any>[] = [launchRetroTree, launchButtons];
const plugins: JupyterFrontEndPlugin<any>[] = [
launchNotebookTree,
launchButtons
];

export default plugins;

0 comments on commit 459f065

Please sign in to comment.