@@ -20,7 +20,7 @@ import { DriveListModel, DriveListView, IDrive } from './drivelistmanager';
20
20
import { DriveIcon } from './icons' ;
21
21
import { IDocumentManager } from '@jupyterlab/docmanager' ;
22
22
import { Drive } from './contents' ;
23
- import { DefaultAndDrivesFileBrowser } from './browser' ;
23
+ import { DrivesFileBrowser } from './browser' ;
24
24
25
25
const FILE_BROWSER_FACTORY = 'FileBrowser' ;
26
26
const FILE_BROWSER_PLUGIN_ID = '@jupyter/drives:widget' ;
@@ -42,7 +42,7 @@ const availableList1 = [
42
42
} ,
43
43
{
44
44
name : 'WaterMelonDrive' ,
45
- url : '/WaterMelonDrive /url'
45
+ url : '/watermelondrive /url'
46
46
} ,
47
47
{
48
48
name : 'MangoDrive' ,
@@ -66,34 +66,34 @@ const availableList1 = [
66
66
} ,
67
67
{
68
68
name : '' ,
69
- url : '/mydrive /url'
69
+ url : '/apple /url'
70
70
} ,
71
71
{
72
72
name : 'RaspberryDrive' ,
73
73
url : '/raspberrydrive/url'
74
74
} ,
75
75
76
76
{
77
- name : 'PineAppleDrive ' ,
78
- url : ''
77
+ name : 'PineappleDrive ' ,
78
+ url : '/pineappledrive/url '
79
79
} ,
80
80
81
81
{ name : 'PomeloDrive' , url : '/https://pomelodrive/url' } ,
82
82
{
83
83
name : 'OrangeDrive' ,
84
- url : ''
84
+ url : 'orangedrive/url '
85
85
} ,
86
86
{
87
87
name : 'TomatoDrive' ,
88
- url : ''
88
+ url : 'tomatodrive/url '
89
89
} ,
90
90
{
91
91
name : '' ,
92
- url : 'superDrive /url'
92
+ url : 'plumedrive /url'
93
93
} ,
94
94
{
95
95
name : 'AvocadoDrive' ,
96
- url : ''
96
+ url : 'avocadodrive/url '
97
97
}
98
98
] ;
99
99
@@ -153,7 +153,7 @@ export async function activateAddDrivesPlugin(
153
153
154
154
const trans = translator . load ( 'jupyter_drives' ) ;
155
155
/* 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 ( ) ;
157
157
const defaultBrowser = factory . createFileBrowser ( 'default-browser' , {
158
158
refreshInterval : 300000
159
159
} ) ;
@@ -183,7 +183,7 @@ export async function activateAddDrivesPlugin(
183
183
drive1 . name = 'mydrive1' ;
184
184
185
185
function addDriveContentsToPanel (
186
- panel : DefaultAndDrivesFileBrowser ,
186
+ panel : DrivesFileBrowser ,
187
187
addedDrive : Drive
188
188
) {
189
189
manager . services . contents . addDrive ( addedDrive ) ;
@@ -192,6 +192,19 @@ export async function activateAddDrivesPlugin(
192
192
refreshInterval : 300000
193
193
} ) ;
194
194
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
+
195
208
panel . addWidget ( driveBrowser ) ;
196
209
}
197
210
@@ -218,7 +231,7 @@ export async function activateAddDrivesPlugin(
218
231
console . log ( 'response:' , response ) ;
219
232
addDriveContentsToPanel ( panel , drive1 ) ;
220
233
} else {
221
- console . log ( 'Error, connection with the drive was not possible') ;
234
+ console . warn ( 'Connection with the drive was not possible') ;
222
235
}
223
236
}
224
237
}
0 commit comments