Skip to content

Commit

Permalink
Merge pull request #1 from DenisaCG/drivesFileBrowser
Browse files Browse the repository at this point in the history
Replace default FileBrowser with custom FileBrowser for drives
  • Loading branch information
DenisaCG authored Feb 12, 2024
2 parents 4fb81be + 8ed7e42 commit b5545d3
Show file tree
Hide file tree
Showing 10 changed files with 3,454 additions and 2,358 deletions.
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
"schema/*.json"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -94,7 +95,11 @@
},
"jupyterlab": {
"extension": true,
"outputDir": "jupyter_drives_browser/labextension"
"outputDir": "jupyter_drives_browser/labextension",
"disabledExtensions": [
"@jupyterlab/filebrowser-extension:default-file-browser"
],
"schemaDir": "schema"
},
"eslintIgnore": [
"node_modules",
Expand Down
81 changes: 81 additions & 0 deletions schema/file-browser-toolbar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"jupyter.lab.toolbars": {
"DriveBrowser": [
{
"name": "new-directory",
"command": "filebrowser:create-new-directory",
"rank": 10
},
{ "name": "uploader", "rank": 20 },
{ "name": "refresh", "command": "filebrowser:refresh", "rank": 30 }
]
},
"title": "jupyter-drives-browser:file-browser-toolbar",
"description": "jupyter-drives-browser settings.",
"type": "object",
"jupyter.lab.transform": true,
"properties": {
"toolbar": {
"title": "Drive browser toolbar items",
"items": {
"$ref": "#/definitions/toolbarItem"
},
"type": "array",
"default": []
}
},
"additionalProperties": false,
"definitions": {
"toolbarItem": {
"properties": {
"name": {
"title": "Unique name",
"type": "string"
},
"args": {
"title": "Command arguments",
"type": "object"
},
"command": {
"title": "Command id",
"type": "string",
"default": ""
},
"disabled": {
"title": "Whether the item is ignored or not",
"type": "boolean",
"default": false
},
"icon": {
"title": "Item icon id",
"description": "If defined, it will override the command icon",
"type": "string"
},
"label": {
"title": "Item label",
"description": "If defined, it will override the command label",
"type": "string"
},
"caption": {
"title": "Item caption",
"description": "If defined, it will override the command caption",
"type": "string"
},
"type": {
"title": "Item type",
"type": "string",
"enum": ["command", "spacer"]
},
"rank": {
"title": "Item rank",
"type": "number",
"minimum": 0,
"default": 50
}
},
"required": ["name"],
"additionalProperties": false,
"type": "object"
}
}
}
Loading

0 comments on commit b5545d3

Please sign in to comment.