Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit db4ce03

Browse files
Hide status bar item by default (#1020)
1 parent e5bb396 commit db4ce03

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
"type": "object",
103103
"title": "Azure configuration",
104104
"properties": {
105+
"azure.azure-account.showStatusBar": {
106+
"type": "boolean",
107+
"default": false,
108+
"description": "Whether to show the Azure Account status bar item. For use with extensions that aren't updated to use the new built in authentication APIs."
109+
},
105110
"azure.resourceFilter": {
106111
"type": "array",
107112
"default": null,

src/extension.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ function createStatusBarItem(context: ExtensionContext, api: AzureAccountExtensi
120120
statusBarItem.name = localize('azure-account.status', 'Azure Account Status');
121121
statusBarItem.command = "azure-account.manageAccount";
122122
function updateStatusBar() {
123+
// Since Azure Account is deprecated, we only show the status bar item when the user has explicitly enabled it
124+
const showStatusBar = getSettingValue<boolean>('azure-account.showStatusBar');
125+
if (!showStatusBar) {
126+
statusBarItem.hide();
127+
return;
128+
}
129+
123130
switch (api.status) {
124131
case 'LoggingIn':
125132
statusBarItem.text = localize('azure-account.loggingIn', "Azure: Signing in...");

0 commit comments

Comments
 (0)