Configuration setting to hide uninitialized status bar item
This commit is contained in:
parent
91f6758abb
commit
9c9155e18e
@ -41,11 +41,16 @@ export default class KanbnStatusBarItem {
|
|||||||
this._statusBarItem.text = text.join(' ');
|
this._statusBarItem.text = text.join(' ');
|
||||||
this._statusBarItem.tooltip = tooltip.join('\n');
|
this._statusBarItem.tooltip = tooltip.join('\n');
|
||||||
this._statusBarItem.command = 'kanbn.board';
|
this._statusBarItem.command = 'kanbn.board';
|
||||||
|
this._statusBarItem.show();
|
||||||
} else {
|
} else {
|
||||||
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')) {
|
||||||
|
this._statusBarItem.show();
|
||||||
|
} else {
|
||||||
|
this._statusBarItem.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this._statusBarItem.show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,4 +132,10 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||||||
KanbnBoardPanel.update();
|
KanbnBoardPanel.update();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle configuration changes
|
||||||
|
vscode.workspace.onDidChangeConfiguration(e => {
|
||||||
|
kanbnStatusBarItem.update();
|
||||||
|
KanbnBoardPanel.update();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
27
package.json
27
package.json
@ -60,7 +60,32 @@
|
|||||||
"title": "Open burndown chart",
|
"title": "Open burndown chart",
|
||||||
"category": "Kanbn"
|
"category": "Kanbn"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"configuration": {
|
||||||
|
"title": "Kanbn",
|
||||||
|
"properties": {
|
||||||
|
"vscode-kanbn.showUninitialisedStatusBarItem": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Show the status bar item in workspaces where Kanbn has not yet been initialised."
|
||||||
|
},
|
||||||
|
"vscode-kanbn.showNotifications": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Show notifications when a task is created, updated or deleted."
|
||||||
|
},
|
||||||
|
"vscode-kanbn.showSprintButton": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Show a 'Start Sprint' button on the Kanbn board."
|
||||||
|
},
|
||||||
|
"vscode-kanbn.showBurndownButton": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Show a 'Burndown Chart' button on the Kanbn board."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@basementuniverse/kanbn": "^0.2.4",
|
"@basementuniverse/kanbn": "^0.2.4",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user