From ee42ec25e4df4a7adc14f775ff7a8e3f2f65632e Mon Sep 17 00:00:00 2001 From: Ramin Tadayon Date: Thu, 3 Oct 2024 10:35:32 -0700 Subject: [PATCH 1/3] Adds refresh to account section --- package.json | 10 ++++++++++ .../plus/shared/components/home-account-content.ts | 7 +++++++ src/webviews/home/homeWebview.ts | 9 ++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 264f625a4a899..69fb136d18dec 100644 --- a/package.json +++ b/package.json @@ -8091,6 +8091,12 @@ "category": "GitLens", "icon": "$(refresh)" }, + { + "command": "gitlens.views.home.account.refresh", + "title": "Refresh", + "category": "GitLens", + "icon": "$(refresh)" + }, { "command": "gitlens.views.launchpad.copy", "title": "Copy", @@ -11482,6 +11488,10 @@ "command": "gitlens.views.home.refresh", "when": "false" }, + { + "command": "gitlens.views.home.account.refresh", + "when": "false" + }, { "command": "gitlens.views.launchpad.copy", "when": "false" diff --git a/src/webviews/apps/plus/shared/components/home-account-content.ts b/src/webviews/apps/plus/shared/components/home-account-content.ts index 9b8af5b2e251d..8086f82973c6b 100644 --- a/src/webviews/apps/plus/shared/components/home-account-content.ts +++ b/src/webviews/apps/plus/shared/components/home-account-content.ts @@ -219,6 +219,13 @@ export class GLHomeAccountContent extends LitElement { this.hasAccount, () => html` + this.host.refresh(true), this)]; + return [ + registerCommand(`${this.host.id}.refresh`, () => this.host.refresh(true), this), + registerCommand( + `${this.host.id}.account.refresh`, + () => this.container.subscription.validate({ force: true }), + this, + ), + ]; } onMessageReceived(e: IpcMessage) { From bf700f76de1ae8cbc63ccda108c583c4b79c1bcc Mon Sep 17 00:00:00 2001 From: Ramin Tadayon Date: Thu, 3 Oct 2024 12:15:26 -0700 Subject: [PATCH 2/3] Removes from package.json --- package.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/package.json b/package.json index 69fb136d18dec..264f625a4a899 100644 --- a/package.json +++ b/package.json @@ -8091,12 +8091,6 @@ "category": "GitLens", "icon": "$(refresh)" }, - { - "command": "gitlens.views.home.account.refresh", - "title": "Refresh", - "category": "GitLens", - "icon": "$(refresh)" - }, { "command": "gitlens.views.launchpad.copy", "title": "Copy", @@ -11488,10 +11482,6 @@ "command": "gitlens.views.home.refresh", "when": "false" }, - { - "command": "gitlens.views.home.account.refresh", - "when": "false" - }, { "command": "gitlens.views.launchpad.copy", "when": "false" From 6d11f3a989e86731e1db48f2ab3a2c7c73629e22 Mon Sep 17 00:00:00 2001 From: Ramin Tadayon Date: Thu, 3 Oct 2024 12:18:04 -0700 Subject: [PATCH 3/3] Updates command name, tooltip and icon --- .../apps/plus/shared/components/home-account-content.ts | 8 ++++---- src/webviews/home/homeWebview.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/webviews/apps/plus/shared/components/home-account-content.ts b/src/webviews/apps/plus/shared/components/home-account-content.ts index 8086f82973c6b..f645056552a1a 100644 --- a/src/webviews/apps/plus/shared/components/home-account-content.ts +++ b/src/webviews/apps/plus/shared/components/home-account-content.ts @@ -221,10 +221,10 @@ export class GLHomeAccountContent extends LitElement { this.host.refresh(true), this), registerCommand( - `${this.host.id}.account.refresh`, + `${this.host.id}.account.resync`, () => this.container.subscription.validate({ force: true }), this, ),