Просмотр исходного кода

Adds refresh button to home & timeline views

main
Eric Amodio 2 лет назад
Родитель
Сommit
9e4d8f0c08
3 измененных файлов: 35 добавлений и 0 удалений
  1. +30
    -0
      package.json
  2. +4
    -0
      src/premium/webviews/timeline/timelineWebviewView.ts
  3. +1
    -0
      src/webviews/home/homeWebviewView.ts

+ 30
- 0
package.json Просмотреть файл

@ -5370,6 +5370,12 @@
"category": "GitLens"
},
{
"command": "gitlens.views.home.refresh",
"title": "Refresh",
"category": "GitLens",
"icon": "$(refresh)"
},
{
"command": "gitlens.views.lineHistory.changeBase",
"title": "Change Base...",
"category": "GitLens",
@ -5835,6 +5841,12 @@
"category": "GitLens"
},
{
"command": "gitlens.views.timeline.refresh",
"title": "Refresh",
"category": "GitLens",
"icon": "$(refresh)"
},
{
"command": "gitlens.views.worktrees.copy",
"title": "Copy",
"category": "GitLens"
@ -7054,6 +7066,10 @@
"when": "false"
},
{
"command": "gitlens.views.home.refresh",
"when": "false"
},
{
"command": "gitlens.views.lineHistory.changeBase",
"when": "false"
},
@ -7382,6 +7398,10 @@
"when": "false"
},
{
"command": "gitlens.views.timeline.refresh",
"when": "false"
},
{
"command": "gitlens.views.worktrees.copy",
"when": "false"
},
@ -8099,6 +8119,11 @@
"group": "5_gitlens@0"
},
{
"command": "gitlens.views.home.refresh",
"when": "view =~ /^gitlens\\.views\\.home/",
"group": "navigation@99"
},
{
"command": "gitlens.showLineHistoryView",
"when": "!gitlens:hasVirtualFolders && view =~ /^gitlens\\.views\\.fileHistory/",
"group": "8_gitlens_toggles@0"
@ -8374,6 +8399,11 @@
"group": "5_gitlens@0"
},
{
"command": "gitlens.views.timeline.refresh",
"when": "view =~ /^gitlens\\.views\\.timeline/",
"group": "navigation@99"
},
{
"command": "gitlens.views.createWorktree",
"when": "view =~ /^gitlens\\.views\\.worktrees/",
"group": "navigation@10"

+ 4
- 0
src/premium/webviews/timeline/timelineWebviewView.ts Просмотреть файл

@ -62,6 +62,10 @@ export class TimelineWebviewView extends WebviewViewBase {
return this.getState(this._context);
}
protected override registerCommands(): Disposable[] {
return [commands.registerCommand(`${this.id}.refresh`, () => this.refresh(), this)];
}
@debug({ args: false })
private onActiveEditorChanged(editor: TextEditor | undefined) {
if (!this.updatePendingEditor(editor)) return;

+ 1
- 0
src/webviews/home/homeWebviewView.ts Просмотреть файл

@ -43,6 +43,7 @@ export class HomeWebviewView extends WebviewViewBase {
protected override registerCommands(): Disposable[] {
return [
commands.registerCommand(`${this.id}.refresh`, () => this.refresh(), this),
commands.registerCommand('gitlens.home.toggleWelcome', async () => {
const welcomeVisible = this.container.storage.get(SyncedStorageKeys.HomeViewWelcomeVisible, true);
await this.container.storage.store(SyncedStorageKeys.HomeViewWelcomeVisible, !welcomeVisible);

Загрузка…
Отмена
Сохранить