@@ -20,7 +20,7 @@ import { DriveListModel, DriveListView, IDrive } from './drivelistmanager';
2020import { DriveIcon } from './icons' ;
2121import { IDocumentManager } from '@jupyterlab/docmanager' ;
2222import { Drive } from './contents' ;
23- import { DefaultAndDrivesFileBrowser } from './browser' ;
23+ import { DrivesFileBrowser } from './browser' ;
2424
2525const FILE_BROWSER_FACTORY = 'FileBrowser' ;
2626const FILE_BROWSER_PLUGIN_ID = '@jupyter/drives:widget' ;
@@ -42,7 +42,7 @@ const availableList1 = [
4242 } ,
4343 {
4444 name : 'WaterMelonDrive' ,
45- url : '/WaterMelonDrive /url'
45+ url : '/watermelondrive /url'
4646 } ,
4747 {
4848 name : 'MangoDrive' ,
@@ -66,34 +66,34 @@ const availableList1 = [
6666 } ,
6767 {
6868 name : '' ,
69- url : '/mydrive /url'
69+ url : '/apple /url'
7070 } ,
7171 {
7272 name : 'RaspberryDrive' ,
7373 url : '/raspberrydrive/url'
7474 } ,
7575
7676 {
77- name : 'PineAppleDrive ' ,
78- url : ''
77+ name : 'PineappleDrive ' ,
78+ url : '/pineappledrive/url '
7979 } ,
8080
8181 { name : 'PomeloDrive' , url : '/https://pomelodrive/url' } ,
8282 {
8383 name : 'OrangeDrive' ,
84- url : ''
84+ url : 'orangedrive/url '
8585 } ,
8686 {
8787 name : 'TomatoDrive' ,
88- url : ''
88+ url : 'tomatodrive/url '
8989 } ,
9090 {
9191 name : '' ,
92- url : 'superDrive /url'
92+ url : 'plumedrive /url'
9393 } ,
9494 {
9595 name : 'AvocadoDrive' ,
96- url : ''
96+ url : 'avocadodrive/url '
9797 }
9898] ;
9999
@@ -153,7 +153,7 @@ export async function activateAddDrivesPlugin(
153153
154154 const trans = translator . load ( 'jupyter_drives' ) ;
155155 /* Add a left panel containing the default filebrowser and a dedicated browser for the selected drive*/
156- const panel = new DefaultAndDrivesFileBrowser ( ) ;
156+ const panel = new DrivesFileBrowser ( ) ;
157157 const defaultBrowser = factory . createFileBrowser ( 'default-browser' , {
158158 refreshInterval : 300000
159159 } ) ;
@@ -183,7 +183,7 @@ export async function activateAddDrivesPlugin(
183183 drive1 . name = 'mydrive1' ;
184184
185185 function addDriveContentsToPanel (
186- panel : DefaultAndDrivesFileBrowser ,
186+ panel : DrivesFileBrowser ,
187187 addedDrive : Drive
188188 ) {
189189 manager . services . contents . addDrive ( addedDrive ) ;
@@ -192,6 +192,19 @@ export async function activateAddDrivesPlugin(
192192 refreshInterval : 300000
193193 } ) ;
194194
195+ if ( settingRegistry ) {
196+ setToolbar (
197+ driveBrowser ,
198+ createToolbarFactory (
199+ toolbarRegistry ,
200+ settingRegistry ,
201+ FILE_BROWSER_FACTORY ,
202+ FILE_BROWSER_PLUGIN_ID ,
203+ translator
204+ )
205+ ) ;
206+ }
207+
195208 panel . addWidget ( driveBrowser ) ;
196209 }
197210
@@ -218,7 +231,7 @@ export async function activateAddDrivesPlugin(
218231 console . log ( 'response:' , response ) ;
219232 addDriveContentsToPanel ( panel , drive1 ) ;
220233 } else {
221- console . log ( 'Error, connection with the drive was not possible') ;
234+ console . warn ( 'Connection with the drive was not possible') ;
222235 }
223236 }
224237 }
0 commit comments