|
@@ -29,7 +29,7 @@ import { IDocumentManager } from '@jupyterlab/docmanager';
|
|
import { DocumentRegistry } from '@jupyterlab/docregistry';
|
|
import { DocumentRegistry } from '@jupyterlab/docregistry';
|
|
import {
|
|
import {
|
|
FileBrowser,
|
|
FileBrowser,
|
|
- // FileUploadStatus,
|
|
|
|
|
|
+ FileUploadStatus,
|
|
FilterFileBrowserModel,
|
|
FilterFileBrowserModel,
|
|
IFileBrowserCommands,
|
|
IFileBrowserCommands,
|
|
IFileBrowserFactory,
|
|
IFileBrowserFactory,
|
|
@@ -39,7 +39,7 @@ import { Launcher } from '@jupyterlab/launcher';
|
|
import { Contents } from '@jupyterlab/services';
|
|
import { Contents } from '@jupyterlab/services';
|
|
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
import { IStateDB } from '@jupyterlab/statedb';
|
|
import { IStateDB } from '@jupyterlab/statedb';
|
|
-// import { IStatusBar } from '@jupyterlab/statusbar';
|
|
|
|
|
|
+import { IStatusBar } from '@jupyterlab/statusbar';
|
|
import { ITranslator } from '@jupyterlab/translation';
|
|
import { ITranslator } from '@jupyterlab/translation';
|
|
import {
|
|
import {
|
|
// addIcon,
|
|
// addIcon,
|
|
@@ -687,39 +687,39 @@ const openWithPlugin: JupyterFrontEndPlugin<void> = {
|
|
/**
|
|
/**
|
|
* A plugin providing file upload status.
|
|
* 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
|
|
* A plugin to open files from remote URLs
|
|
@@ -1352,7 +1352,7 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
|
|
factory,
|
|
factory,
|
|
browser,
|
|
browser,
|
|
// shareFile,
|
|
// shareFile,
|
|
- // fileUploadStatus,
|
|
|
|
|
|
+ fileUploadStatus,
|
|
// downloadPlugin,
|
|
// downloadPlugin,
|
|
browserWidget,
|
|
browserWidget,
|
|
openWithPlugin
|
|
openWithPlugin
|