Skip to content

Commit f036cf8

Browse files
committed
move namespace CommandIDs to token.ts
1 parent 7c15218 commit f036cf8

File tree

4 files changed

+13
-25
lines changed

4 files changed

+13
-25
lines changed

src/plugins/driveBrowserPlugin.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,7 @@ import { CommandRegistry } from '@lumino/commands';
2323
import { driveBrowserIcon } from '../icons';
2424
import { Drive } from '../contents';
2525
import { getDrivesList, setListingLimit } from '../requests';
26-
import { IDriveInfo, IDrivesList } from '../token';
27-
28-
/**
29-
* The command IDs used by the driveBrowser plugin.
30-
*/
31-
namespace CommandIDs {
32-
export const openDrivesDialog = 'drives:open-drives-dialog';
33-
export const openPath = 'drives:open-path';
34-
export const toggleBrowser = 'drives:toggle-main';
35-
}
26+
import { IDriveInfo, IDrivesList, CommandIDs } from '../token';
3627

3728
/**
3829
* The file browser factory ID.

src/plugins/driveDialogPlugin.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ import { Dialog, showDialog } from '@jupyterlab/apputils';
99

1010
import { DriveListModel, DriveListView, IDrive } from './drivelistmanager';
1111
import { DriveIcon } from '../icons';
12-
13-
/**
14-
* The command IDs used by the driveBrowser plugin.
15-
*/
16-
namespace CommandIDs {
17-
export const openDrivesDialog = 'drives:open-drives-dialog';
18-
export const openPath = 'drives:open-path';
19-
export const toggleBrowser = 'drives:toggle-main';
20-
}
12+
import { CommandIDs } from '../token';
2113

2214
export const openDriveDialogPlugin: JupyterFrontEndPlugin<void> = {
2315
id: 'jupyter-drives:widget',

src/plugins/launcherPlugin.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ import { find } from '@lumino/algorithm';
1212
import { ReadonlyPartialJSONObject } from '@lumino/coreutils';
1313
import { DockPanel, TabBar, Widget } from '@lumino/widgets';
1414

15-
/**
16-
* The command IDs used by the launcher plugin.
17-
*/
18-
namespace CommandIDs {
19-
export const launcher = 'launcher:create';
20-
}
15+
import { CommandIDs } from '../token';
2116

2217
/**
2318
* A service providing an interface to the the launcher.

src/token.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { Token } from '@lumino/coreutils';
22
import { Contents } from '@jupyterlab/services';
33

4+
/**
5+
* The command IDs used by the driveBrowser plugin.
6+
*/
7+
export namespace CommandIDs {
8+
export const openDrivesDialog = 'drives:open-drives-dialog';
9+
export const openPath = 'drives:open-path';
10+
export const toggleBrowser = 'drives:toggle-main';
11+
export const launcher = 'launcher:create';
12+
}
13+
414
/**
515
* A token for the plugin that provides the list of drives.
616
*/

0 commit comments

Comments
 (0)