Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function activate(
app: JupyterFrontEnd,
palette: ICommandPalette,
labShell: ILabShell
): ILauncher {
const { commands } = app;
const model = new LauncherModel();
commands.addCommand(CommandIDs.create, {
label: 'New Launcher',
execute: (args: JSONObject) => {
const cwd = args['cwd'] ? String(args['cwd']) : '';
const id = `launcher-${Private.id++}`;
const callback = (item: Widget) => {
labShell.add(item, 'main', { ref: id });
};
const launcher = new Launcher({ cwd, callback, commands });
launcher.model = model;
launcher.title.label = 'Launcher';
launcher.title.iconClass = 'jp-LauncherIcon';
let main = new MainAreaWidget({ content: launcher });
function activate(
app: JupyterFrontEnd,
palette: ICommandPalette,
labShell: ILabShell
): ILauncher {
const { commands } = app;
const model = new LauncherModel();
commands.addCommand(CommandIDs.create, {
label: 'New Launcher',
execute: (args: JSONObject) => {
const cwd = args['cwd'] ? String(args['cwd']) : '';
const id = `launcher-${Private.id++}`;
const callback = (item: Widget) => {
labShell.add(item, 'main', { ref: id });
};
const launcher = new Launcher({ model, cwd, callback, commands });
launcher.model = model;
launcher.title.label = 'Launcher';
launcher.title.iconClass = 'jp-LauncherIcon';
let main = new MainAreaWidget({ content: launcher });