feat(statusBar): add account name to status bar display

- Updated the status bar item to include an optional account name.
- Modified the status bar text to show the account name if available.
- Adjusted the interface to accommodate the new accountName property.
This commit is contained in:
2025-12-18 12:22:35 +08:00
parent 3f04933b3b
commit 69e5f5a639
5 changed files with 762 additions and 109 deletions

View File

@@ -52,7 +52,8 @@ export function createStatusBarItem(context: vscode.ExtensionContext): vscode.St
updateStatusBar(statusBarItem, {
configured: false,
hasRepositories: false,
notificationCount: 0
notificationCount: 0,
accountName: undefined
});
context.subscriptions.push(statusBarItem);
@@ -63,6 +64,7 @@ export interface StatusBarData {
configured: boolean;
hasRepositories: boolean;
notificationCount: number;
accountName?: string;
}
/**
@@ -75,10 +77,14 @@ export function updateStatusBar(statusBarItem: vscode.StatusBarItem, data: Statu
return;
}
let text = '$(git-branch) WizGIT';
let text = '$(git-branch) WizGIT: ';
if (data.accountName) {
text += `${data.accountName} `;
}
if (data.hasRepositories) {
text += ' ✓';
text += '✓';
}
if (data.notificationCount > 0) {