提交 f4d3d274 编写于 作者: R Roman Levin 提交者: Fatih Acet

Make the issue status bar item optional

上级 5b725618
# CHANGELOG
## [0.5.1] - 2018-02-27
### Added
- [!4](https://gitlab.com/fatihacet/gitlab-vscode-extension/merge_requests/4) Add an option to turn off the issue link in the status bar
## [0.5.0] - 2018-02-25
### Added
- [#25](https://gitlab.com/fatihacet/gitlab-vscode-extension/issues/25) Create snippet from selection or entire file.
......
......@@ -2,3 +2,4 @@
- Matthias Wirtz [@swiffer](https://gitlab.com/swiffer)
- Amanda Cameron [@AmandaCameron](https://gitlab.com/AmandaCameron)
- Roman Levin [@romanlevin](https://gitlab.com/romanlevin)
{
"name": "gitlab-workflow",
"version": "0.2.0",
"version": "0.5.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
......@@ -108,6 +108,11 @@
"type": "string",
"default": "https://gitlab.com",
"description": "Your GitLab instance URL (default is https://gitlab.com)"
},
"gitlab.showIssueLinkOnStatusBar": {
"type": "boolean",
"default": true,
"description": "Whether to display the GitLab issue link in the status bar"
}
}
}
......@@ -131,4 +136,4 @@
"@types/node": "^7.0.43",
"vscode": "^1.1.6"
}
}
\ No newline at end of file
}
......@@ -8,6 +8,7 @@ let mrStatusBarItem = null;
let mrIssueStatusBarItem = null;
let issue = null;
let mr = null;
const { showIssueLinkOnStatusBar } = vscode.workspace.getConfiguration('gitlab');
const createStatusBarItem = (text, command) => {
const statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
......@@ -135,13 +136,17 @@ const init = (ctx) => {
initPipelineStatus();
initMrStatus();
initMrIssueStatus();
if (showIssueLinkOnStatusBar) {
initMrIssueStatus();
}
}
const dispose = () => {
mrStatusBarItem.dispose();
pipelineStatusBarItem.dispose();
mrIssueStatusBarItem.dispose();
if (showIssueLinkOnStatusBar) {
mrIssueStatusBarItem.dispose();
}
}
exports.init = init;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册