Skip to content

Commit 5e03bf9

Browse files
Adds refresh to account section (#3640)
* Adds refresh to account section * Removes from package.json * Updates command name, tooltip and icon
1 parent 4832d2d commit 5e03bf9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/webviews/apps/plus/shared/components/home-account-content.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ export class GLHomeAccountContent extends LitElement {
219219
this.hasAccount,
220220
() => html`
221221
<span class="header__actions">
222+
<gl-button
223+
appearance="toolbar"
224+
href="command:gitlens.views.home.account.resync"
225+
tooltip="Synchronize Account Status"
226+
aria-label="Synchronize Account Status"
227+
><code-icon icon="sync"></code-icon
228+
></gl-button>
222229
<gl-button
223230
appearance="toolbar"
224231
href="command:gitlens.plus.logout"

src/webviews/home/homeWebview.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
7575
}
7676

7777
registerCommands(): Disposable[] {
78-
return [registerCommand(`${this.host.id}.refresh`, () => this.host.refresh(true), this)];
78+
return [
79+
registerCommand(`${this.host.id}.refresh`, () => this.host.refresh(true), this),
80+
registerCommand(
81+
`${this.host.id}.account.resync`,
82+
() => this.container.subscription.validate({ force: true }),
83+
this,
84+
),
85+
];
7986
}
8087

8188
onMessageReceived(e: IpcMessage) {

0 commit comments

Comments
 (0)