Introduce Trust Book in Book Viewlet (#9414)

This commit is contained in:
Jorge Berumen
2020-03-13 09:11:38 -07:00
committed by GitHub
parent 744e655dd3
commit d5fdec5699
21 changed files with 590 additions and 10 deletions

View File

@@ -41,6 +41,14 @@
"type": "number",
"default": 5000,
"description": "%notebook.maxTableRows.description%"
},
"notebook.trustedBooks":{
"type": "array",
"default": [],
"description": "%notebook.trustedBooks.description%",
"items": {
"type": "string"
}
}
}
},
@@ -159,6 +167,15 @@
"light": "resources/light/save.svg"
}
},
{
"command": "notebook.command.trustBook",
"title": "%title.trustBook%",
"category": "%books-preview-category%",
"icon": {
"dark": "resources/dark/trust_inverse.svg",
"light": "resources/light/trust.svg"
}
},
{
"command": "notebook.command.searchBook",
"title": "%title.searchJupyterBook%",
@@ -292,6 +309,10 @@
"command": "notebook.command.searchUntitledBook",
"when": "false"
},
{
"command": "notebook.command.trustBook",
"when": "view == bookTreeView && viewItem == savedBook"
},
{
"command": "notebook.command.closeBook",
"when": "false"
@@ -326,6 +347,11 @@
}
],
"view/item/context": [
{
"command": "notebook.command.trustBook",
"when": "view == bookTreeView && viewItem == savedBook",
"group": "inline"
},
{
"command": "notebook.command.searchBook",
"when": "view == bookTreeView && viewItem == savedBook || viewItem == section",