Skip to content

Commit 8aebc1d

Browse files
committed
disable launcher at root level
1 parent 1bc3a1e commit 8aebc1d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/plugins/driveBrowserPlugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export const driveFileBrowser: JupyterFrontEndPlugin<void> = {
157157
}
158158
app.commands.notifyCommandChanged(CommandIDs.createNewDrive);
159159
app.commands.notifyCommandChanged(CommandIDs.createNewDirectory);
160+
app.commands.notifyCommandChanged(CommandIDs.launcher);
160161
};
161162

162163
// Listen for path changes.

src/plugins/launcherPlugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ function activate(
4444
commands.addCommand(CommandIDs.launcher, {
4545
label: trans.__('New Launcher'),
4646
icon: args => (args.toolbar ? addIcon : undefined),
47+
isEnabled: () => {
48+
const currentBrowser = factory?.tracker.currentWidget;
49+
return currentBrowser?.model.path !== 's3:';
50+
},
4751
execute: (args: ReadonlyPartialJSONObject) => {
4852
// get current file browser used
4953
const currentBrowser = factory?.tracker.currentWidget;

0 commit comments

Comments
 (0)