Update configuration settings, show or hide buttons and task notifications
This commit is contained in:
parent
ea2d31282a
commit
dfa7a6e7a5
@ -59,8 +59,8 @@ export default class KanbnBoardPanel {
|
||||
startedColumns: index.options.startedColumns ?? [],
|
||||
completedColumns: index.options.completedColumns ?? [],
|
||||
dateFormat: KanbnBoardPanel.currentPanel._kanbn.getDateFormat(index),
|
||||
showBurndownButton: vscode.workspace.getConfiguration('vscode-kanbn').get('showBurndownButton'),
|
||||
showSprintButton: vscode.workspace.getConfiguration('vscode-kanbn').get('showSprintButton')
|
||||
showBurndownButton: vscode.workspace.getConfiguration('kanbn').get('showBurndownButton'),
|
||||
showSprintButton: vscode.workspace.getConfiguration('kanbn').get('showSprintButton')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export default class KanbnStatusBarItem {
|
||||
this._statusBarItem.text = '$(project)';
|
||||
this._statusBarItem.tooltip = 'Initialise Kanbn';
|
||||
this._statusBarItem.command = 'kanbn.init';
|
||||
if (vscode.workspace.getConfiguration('vscode-kanbn').get('showUninitialisedStatusBarItem')) {
|
||||
if (vscode.workspace.getConfiguration('kanbn').get('showUninitialisedStatusBarItem')) {
|
||||
this._statusBarItem.show();
|
||||
} else {
|
||||
this._statusBarItem.hide();
|
||||
|
@ -161,7 +161,7 @@ export default class KanbnTaskPanel {
|
||||
KanbnTaskPanel.panels[message.panelUuid]._taskId = message.taskData.id;
|
||||
KanbnTaskPanel.panels[message.panelUuid]._columnName = message.taskData.column;
|
||||
KanbnTaskPanel.panels[message.panelUuid].update();
|
||||
if (vscode.workspace.getConfiguration('vscode-kanbn').get('showTaskNotifications')) {
|
||||
if (vscode.workspace.getConfiguration('kanbn').get('showTaskNotifications')) {
|
||||
vscode.window.showInformationMessage(`Created task '${message.taskData.name}'.`);
|
||||
}
|
||||
return;
|
||||
@ -172,7 +172,7 @@ export default class KanbnTaskPanel {
|
||||
KanbnTaskPanel.panels[message.panelUuid]._taskId = message.taskData.id;
|
||||
KanbnTaskPanel.panels[message.panelUuid]._columnName = message.taskData.column;
|
||||
KanbnTaskPanel.panels[message.panelUuid].update();
|
||||
if (vscode.workspace.getConfiguration('vscode-kanbn').get('showTaskNotifications')) {
|
||||
if (vscode.workspace.getConfiguration('kanbn').get('showTaskNotifications')) {
|
||||
vscode.window.showInformationMessage(`Updated task '${message.taskData.name}'.`);
|
||||
}
|
||||
return;
|
||||
@ -185,7 +185,7 @@ export default class KanbnTaskPanel {
|
||||
await this._kanbn.deleteTask(message.taskId, true);
|
||||
KanbnTaskPanel.panels[message.panelUuid].dispose();
|
||||
delete KanbnTaskPanel.panels[message.panelUuid];
|
||||
if (vscode.workspace.getConfiguration('vscode-kanbn').get('showTaskNotifications')) {
|
||||
if (vscode.workspace.getConfiguration('kanbn').get('showTaskNotifications')) {
|
||||
vscode.window.showInformationMessage(`Deleted task '${message.taskData.name}'.`);
|
||||
}
|
||||
}
|
||||
|
12
package.json
12
package.json
@ -64,25 +64,25 @@
|
||||
"configuration": {
|
||||
"title": "Kanbn",
|
||||
"properties": {
|
||||
"vscode-kanbn.showUninitialisedStatusBarItem": {
|
||||
"kanbn.showUninitialisedStatusBarItem": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show the status bar item in workspaces where Kanbn has not yet been initialised."
|
||||
},
|
||||
"vscode-kanbn.showTaskNotifications": {
|
||||
"kanbn.showTaskNotifications": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show notifications when a task is created, updated or deleted."
|
||||
},
|
||||
"vscode-kanbn.showSprintButton": {
|
||||
"kanbn.showSprintButton": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Show a 'Start Sprint' button on the Kanbn board."
|
||||
"description": "Show a 'Start sprint' button on the Kanbn board."
|
||||
},
|
||||
"vscode-kanbn.showBurndownButton": {
|
||||
"kanbn.showBurndownButton": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Show a 'Burndown Chart' button on the Kanbn board."
|
||||
"description": "Show a 'Burndown chart' button on the Kanbn board."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user