mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-27 03:20:27 +08:00
Merge pull request #6415 from jeewonkoo/develop
add the show header command to the command palette
This commit is contained in:
commit
9cde2b6ed8
@ -481,12 +481,13 @@ const title: JupyterFrontEndPlugin<void> = {
|
||||
const topVisibility: JupyterFrontEndPlugin<void> = {
|
||||
id: '@jupyter-notebook/application-extension:top',
|
||||
requires: [INotebookShell, ITranslator],
|
||||
optional: [ISettingRegistry],
|
||||
optional: [ISettingRegistry, ICommandPalette],
|
||||
activate: (
|
||||
app: JupyterFrontEnd<JupyterFrontEnd.IShell>,
|
||||
notebookShell: INotebookShell,
|
||||
translator: ITranslator,
|
||||
settingRegistry: ISettingRegistry | null
|
||||
settingRegistry: ISettingRegistry | null,
|
||||
palette: ICommandPalette | null
|
||||
) => {
|
||||
const trans = translator.load('notebook');
|
||||
const top = notebookShell.top;
|
||||
@ -527,6 +528,10 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
|
||||
});
|
||||
}
|
||||
|
||||
if (palette) {
|
||||
palette.addItem({ command: CommandIDs.toggleTop, category: 'View' });
|
||||
}
|
||||
|
||||
const onChanged = (): void => {
|
||||
if (settingsOverride) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user