You've already forked wizgit-vscode-extension
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user