* chore(package.json): add "onStartupFinished" to activationEvents

* chore(extension.ts): update status bar text to "Create Gitea PR"
* chore(extension.ts): update comment for showing status bar icon
This commit is contained in:
Peter 2024-10-21 01:57:46 +02:00
parent 011e20b499
commit 57eccc781e
Signed by: Peter
GPG Key ID: 90EA41BD0E1A2600
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
"categories": [
"Other"
],
"activationEvents": [],
"activationEvents": ["onStartupFinished"],
"main": "./dist/extension.js",
"contributes": {
"commands": [

View File

@ -141,10 +141,10 @@ async function getDefaultBranch(instanceUrl: string, owner: string, repo: string
// Funktion zum Hinzufügen des Statusbar-Icons
function addStatusBarIcon() {
const statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
statusBar.text = `$(git-pull-request) Create PR`;
statusBar.text = `$(git-pull-request) Create Gitea PR`;
statusBar.tooltip = 'Create a Pull Request in Gitea';
statusBar.command = 'gitea.createPullRequest';
statusBar.show(); // Sofortiges Anzeigen
statusBar.show(); // Sofortiges Anzeigen des Icons in der Statusleiste
return statusBar;
}
@ -209,7 +209,7 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(pullRequestCommand);
// Statusbar-Icon sofort anzeigen
const statusBar = addStatusBarIcon();
const statusBar = addStatusBarIcon(); // Icon wird sofort beim Aktivieren angezeigt
context.subscriptions.push(statusBar);
}