Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 });
// If there are any other widgets open, remove the launcher close icon.
main.title.closable = !!toArray(labShell.widgets('main')).length;
main.id = id;
labShell.add(main, 'main', { activate: args['activate'] as boolean });
labShell.layoutModified.connect(() => {
// If there is only a launcher open, remove the close icon.
main.title.closable = toArray(labShell.widgets('main')).length > 1;
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 });
// If there are any other widgets open, remove the launcher close icon.
main.title.closable = !!toArray(labShell.widgets('main')).length;
main.id = id;
labShell.add(main, 'main', { activate: args['activate'] as boolean });
labShell.layoutModified.connect(() => {
// If there is only a launcher open, remove the close icon.
main.title.closable = toArray(labShell.widgets('main')).length > 1;