Browse Source

Adds better messaging while still discovering

main
Eric Amodio 1 year ago
parent
commit
d909e2b70c
7 changed files with 21 additions and 7 deletions
  1. +3
    -1
      src/views/branchesView.ts
  2. +3
    -1
      src/views/commitsView.ts
  3. +3
    -1
      src/views/contributorsView.ts
  4. +3
    -1
      src/views/remotesView.ts
  5. +3
    -1
      src/views/stashesView.ts
  6. +3
    -1
      src/views/tagsView.ts
  7. +3
    -1
      src/views/worktreesView.ts

+ 3
- 1
src/views/branchesView.ts View File

@ -50,7 +50,9 @@ export class BranchesViewNode extends RepositoriesSubscribeableNode
if (this.children == null) {
const repositories = this.view.container.git.openRepositories;
if (repositories.length === 0) {
this.view.message = 'No branches could be found.';
this.view.message = this.view.container.git.isDiscoveringRepositories
? 'Loading branches...'
: 'No branches could be found.';
return [];
}

+ 3
- 1
src/views/commitsView.ts View File

@ -122,7 +122,9 @@ export class CommitsViewNode extends RepositoriesSubscribeableNode
if (this.children == null) {
const repositories = this.view.container.git.openRepositories;
if (repositories.length === 0) {
this.view.message = 'No commits could be found.';
this.view.message = this.view.container.git.isDiscoveringRepositories
? 'Loading commits...'
: 'No commits could be found.';
return [];
}

+ 3
- 1
src/views/contributorsView.ts View File

@ -53,7 +53,9 @@ export class ContributorsViewNode extends RepositoriesSubscribeableNode
if (this.children == null) {
const repositories = this.view.container.git.openRepositories;
if (repositories.length === 0) {
this.view.message = 'No contributors could be found.';
this.view.message = this.view.container.git.isDiscoveringRepositories
? 'Loading contributors...'
: 'No contributors could be found.';
return [];
}

+ 3
- 1
src/views/remotesView.ts View File

@ -51,7 +51,9 @@ export class RemotesViewNode extends RepositoriesSubscribeableNode
if (this.children == null) {
const repositories = this.view.container.git.openRepositories;
if (repositories.length === 0) {
this.view.message = 'No remotes could be found.';
this.view.message = this.view.container.git.isDiscoveringRepositories
? 'Loading remotes...'
: 'No remotes could be found.';
return [];
}

+ 3
- 1
src/views/stashesView.ts View File

@ -37,7 +37,9 @@ export class StashesViewNode extends RepositoriesSubscribeableNode
if (this.children == null) {
const repositories = this.view.container.git.openRepositories;
if (repositories.length === 0) {
this.view.message = 'No stashes could be found.';
this.view.message = this.view.container.git.isDiscoveringRepositories
? 'Loading stashes...'
: 'No stashes could be found.';
return [];
}

+ 3
- 1
src/views/tagsView.ts View File

@ -38,7 +38,9 @@ export class TagsViewNode extends RepositoriesSubscribeableNode
if (this.children == null) {
const repositories = this.view.container.git.openRepositories;
if (repositories.length === 0) {
this.view.message = 'No tags could be found.';
this.view.message = this.view.container.git.isDiscoveringRepositories
? 'Loading tags...'
: 'No tags could be found.';
return [];
}

+ 3
- 1
src/views/worktreesView.ts View File

@ -48,7 +48,9 @@ export class WorktreesViewNode extends RepositoriesSubscribeableNode
if (this.children == null) {
const repositories = this.view.container.git.openRepositories;
if (repositories.length === 0) {
this.view.message = 'No worktrees could be found.';
this.view.message = this.view.container.git.isDiscoveringRepositories
? 'Loading worktrees...'
: 'No worktrees could be found.';
return [];
}

Loading…
Cancel
Save