Update configuration settings, show or hide buttons and task notifications

This commit is contained in:
Gordon 2021-04-15 00:43:15 +01:00
parent ea2d31282a
commit dfa7a6e7a5
4 changed files with 12 additions and 12 deletions

View File

@ -59,8 +59,8 @@ export default class KanbnBoardPanel {
startedColumns: index.options.startedColumns ?? [], startedColumns: index.options.startedColumns ?? [],
completedColumns: index.options.completedColumns ?? [], completedColumns: index.options.completedColumns ?? [],
dateFormat: KanbnBoardPanel.currentPanel._kanbn.getDateFormat(index), dateFormat: KanbnBoardPanel.currentPanel._kanbn.getDateFormat(index),
showBurndownButton: vscode.workspace.getConfiguration('vscode-kanbn').get('showBurndownButton'), showBurndownButton: vscode.workspace.getConfiguration('kanbn').get('showBurndownButton'),
showSprintButton: vscode.workspace.getConfiguration('vscode-kanbn').get('showSprintButton') showSprintButton: vscode.workspace.getConfiguration('kanbn').get('showSprintButton')
}); });
} }
} }

View File

@ -46,7 +46,7 @@ export default class KanbnStatusBarItem {
this._statusBarItem.text = '$(project)'; this._statusBarItem.text = '$(project)';
this._statusBarItem.tooltip = 'Initialise Kanbn'; this._statusBarItem.tooltip = 'Initialise Kanbn';
this._statusBarItem.command = 'kanbn.init'; this._statusBarItem.command = 'kanbn.init';
if (vscode.workspace.getConfiguration('vscode-kanbn').get('showUninitialisedStatusBarItem')) { if (vscode.workspace.getConfiguration('kanbn').get('showUninitialisedStatusBarItem')) {
this._statusBarItem.show(); this._statusBarItem.show();
} else { } else {
this._statusBarItem.hide(); this._statusBarItem.hide();

View File

@ -161,7 +161,7 @@ export default class KanbnTaskPanel {
KanbnTaskPanel.panels[message.panelUuid]._taskId = message.taskData.id; KanbnTaskPanel.panels[message.panelUuid]._taskId = message.taskData.id;
KanbnTaskPanel.panels[message.panelUuid]._columnName = message.taskData.column; KanbnTaskPanel.panels[message.panelUuid]._columnName = message.taskData.column;
KanbnTaskPanel.panels[message.panelUuid].update(); 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}'.`); vscode.window.showInformationMessage(`Created task '${message.taskData.name}'.`);
} }
return; return;
@ -172,7 +172,7 @@ export default class KanbnTaskPanel {
KanbnTaskPanel.panels[message.panelUuid]._taskId = message.taskData.id; KanbnTaskPanel.panels[message.panelUuid]._taskId = message.taskData.id;
KanbnTaskPanel.panels[message.panelUuid]._columnName = message.taskData.column; KanbnTaskPanel.panels[message.panelUuid]._columnName = message.taskData.column;
KanbnTaskPanel.panels[message.panelUuid].update(); 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}'.`); vscode.window.showInformationMessage(`Updated task '${message.taskData.name}'.`);
} }
return; return;
@ -185,7 +185,7 @@ export default class KanbnTaskPanel {
await this._kanbn.deleteTask(message.taskId, true); await this._kanbn.deleteTask(message.taskId, true);
KanbnTaskPanel.panels[message.panelUuid].dispose(); KanbnTaskPanel.panels[message.panelUuid].dispose();
delete KanbnTaskPanel.panels[message.panelUuid]; 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}'.`); vscode.window.showInformationMessage(`Deleted task '${message.taskData.name}'.`);
} }
} }

View File

@ -64,25 +64,25 @@
"configuration": { "configuration": {
"title": "Kanbn", "title": "Kanbn",
"properties": { "properties": {
"vscode-kanbn.showUninitialisedStatusBarItem": { "kanbn.showUninitialisedStatusBarItem": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Show the status bar item in workspaces where Kanbn has not yet been initialised." "description": "Show the status bar item in workspaces where Kanbn has not yet been initialised."
}, },
"vscode-kanbn.showTaskNotifications": { "kanbn.showTaskNotifications": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Show notifications when a task is created, updated or deleted." "description": "Show notifications when a task is created, updated or deleted."
}, },
"vscode-kanbn.showSprintButton": { "kanbn.showSprintButton": {
"type": "boolean", "type": "boolean",
"default": false, "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", "type": "boolean",
"default": false, "default": false,
"description": "Show a 'Burndown Chart' button on the Kanbn board." "description": "Show a 'Burndown chart' button on the Kanbn board."
} }
} }
} }