added initial webpage

This commit is contained in:
MasonBone 2021-11-09 12:38:01 -06:00
parent 6904b5dacf
commit f4228e3610
3 changed files with 25 additions and 0 deletions

View File

@ -46,6 +46,10 @@
{
"command": "mind-reader.selectTheme",
"title": "Select Theme"
},
{
"command": "mind-reader.openWebview",
"title": "Mind Reader Webview"
}
],
"keybindings": [
@ -120,6 +124,11 @@
"command": "mind-reader.selectTheme",
"group": "mind-reader",
"when": "activeEditor"
},
{
"command": "mind-reader.openWebview",
"group": "mind-reader",
"when": "activeEditor"
}
]
},

View File

@ -48,6 +48,11 @@ const commands: Command[] = [
name: 'mind-reader.resetEditorScale',
callback: resetEditorScale,
},
{
name: 'mind-reader.openWebview',
callback: openWebview,
}
];
// COMMAND CALLBACK IMPLEMENTATIONS
@ -76,4 +81,14 @@ function resetEditorScale(): void {
vscode.commands.executeCommand('workbench.action.zoomReset');
}
function openWebview(): void {
//vscode.commands.executeCommand('workbench.action.zoomOut');
vscode.window.createWebviewPanel(
'catCoding', // Identifies the type of the webview. Used internally
'Cat Coding', // Title of the panel displayed to the user
vscode.ViewColumn.One, // Editor column to show the new webview panel in.
{}
); // Webview options. More on these later.
}
export default commands;

View File

@ -18,6 +18,7 @@ export function activate(context: vscode.ExtensionContext) {
command.callback
);
context.subscriptions.push(disposable);
console.log(command.name);
});
}