|
@@ -29,7 +29,7 @@ import { IDocumentManager } from '@jupyterlab/docmanager';
|
|
|
import { DocumentRegistry } from '@jupyterlab/docregistry';
|
|
|
import {
|
|
|
FileBrowser,
|
|
|
- // FileUploadStatus,
|
|
|
+ FileUploadStatus,
|
|
|
FilterFileBrowserModel,
|
|
|
IFileBrowserCommands,
|
|
|
IFileBrowserFactory,
|
|
@@ -39,7 +39,7 @@ import { Launcher } from '@jupyterlab/launcher';
|
|
|
import { Contents } from '@jupyterlab/services';
|
|
|
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
|
import { IStateDB } from '@jupyterlab/statedb';
|
|
|
-// import { IStatusBar } from '@jupyterlab/statusbar';
|
|
|
+import { IStatusBar } from '@jupyterlab/statusbar';
|
|
|
import { ITranslator } from '@jupyterlab/translation';
|
|
|
import {
|
|
|
// addIcon,
|
|
@@ -687,39 +687,39 @@ const openWithPlugin: JupyterFrontEndPlugin<void> = {
|
|
|
/**
|
|
|
* A plugin providing file upload status.
|
|
|
*/
|
|
|
-// export const fileUploadStatus: JupyterFrontEndPlugin<void> = {
|
|
|
-// id: '@jupyterlab/filebrowser-extension:file-upload-status',
|
|
|
-// autoStart: true,
|
|
|
-// requires: [IFileBrowserFactory, ITranslator],
|
|
|
-// optional: [IStatusBar],
|
|
|
-// activate: (
|
|
|
-// app: JupyterFrontEnd,
|
|
|
-// browser: IFileBrowserFactory,
|
|
|
-// translator: ITranslator,
|
|
|
-// statusBar: IStatusBar | null
|
|
|
-// ) => {
|
|
|
-// if (!statusBar) {
|
|
|
-// // Automatically disable if statusbar missing
|
|
|
-// return;
|
|
|
-// }
|
|
|
-// const item = new FileUploadStatus({
|
|
|
-// tracker: browser.tracker,
|
|
|
-// translator
|
|
|
-// });
|
|
|
+export const fileUploadStatus: JupyterFrontEndPlugin<void> = {
|
|
|
+ id: '@jupyterlab/filebrowser-extension:file-upload-status',
|
|
|
+ autoStart: true,
|
|
|
+ requires: [IFileBrowserFactory, ITranslator],
|
|
|
+ optional: [IStatusBar],
|
|
|
+ activate: (
|
|
|
+ app: JupyterFrontEnd,
|
|
|
+ browser: IFileBrowserFactory,
|
|
|
+ translator: ITranslator,
|
|
|
+ statusBar: IStatusBar | null
|
|
|
+ ) => {
|
|
|
+ if (!statusBar) {
|
|
|
+ // Automatically disable if statusbar missing
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const item = new FileUploadStatus({
|
|
|
+ tracker: browser.tracker,
|
|
|
+ translator
|
|
|
+ });
|
|
|
|
|
|
-// statusBar.registerStatusItem(
|
|
|
-// '@jupyterlab/filebrowser-extension:file-upload-status',
|
|
|
-// {
|
|
|
-// item,
|
|
|
-// align: 'middle',
|
|
|
-// isActive: () => {
|
|
|
-// return !!item.model && item.model.items.length > 0;
|
|
|
-// },
|
|
|
-// activeStateChanged: item.model.stateChanged
|
|
|
-// }
|
|
|
-// );
|
|
|
-// }
|
|
|
-// };
|
|
|
+ statusBar.registerStatusItem(
|
|
|
+ '@jupyterlab/filebrowser-extension:file-upload-status',
|
|
|
+ {
|
|
|
+ item,
|
|
|
+ align: 'middle',
|
|
|
+ isActive: () => {
|
|
|
+ return !!item.model && item.model.items.length > 0;
|
|
|
+ },
|
|
|
+ activeStateChanged: item.model.stateChanged
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
/**
|
|
|
* A plugin to open files from remote URLs
|
|
@@ -1352,7 +1352,7 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
|
|
|
factory,
|
|
|
browser,
|
|
|
// shareFile,
|
|
|
- // fileUploadStatus,
|
|
|
+ fileUploadStatus,
|
|
|
// downloadPlugin,
|
|
|
browserWidget,
|
|
|
openWithPlugin
|