Browse Source

Updates empty state messaging

main
Eric Amodio 6 years ago
parent
commit
bf255e97da
10 changed files with 11 additions and 11 deletions
  1. +1
    -1
      src/views/nodes/branchNode.ts
  2. +1
    -1
      src/views/nodes/fileHistoryNode.ts
  3. +1
    -1
      src/views/nodes/fileHistoryTrackerNode.ts
  4. +1
    -1
      src/views/nodes/lineHistoryNode.ts
  5. +1
    -1
      src/views/nodes/lineHistoryTrackerNode.ts
  6. +1
    -1
      src/views/nodes/remotesNode.ts
  7. +2
    -2
      src/views/nodes/repositoriesNode.ts
  8. +1
    -1
      src/views/nodes/stashesNode.ts
  9. +1
    -1
      src/views/nodes/tagNode.ts
  10. +1
    -1
      src/views/nodes/tagsNode.ts

+ 1
- 1
src/views/nodes/branchNode.ts View File

@ -54,7 +54,7 @@ export class BranchNode extends ViewRefNode implements PageableViewNode {
maxCount: this.maxCount || this.view.config.defaultItemLimit,
ref: this.ref
});
if (log === undefined) return [new MessageNode(this, 'No commits yet')];
if (log === undefined) return [new MessageNode(this, 'No commits could be found.')];
const branches = await Container.git.getBranches(this.uri.repoPath);
// Get the sha length, since `git branch` can return variable length shas

+ 1
- 1
src/views/nodes/fileHistoryNode.ts View File

@ -81,7 +81,7 @@ export class FileHistoryNode extends SubscribeableViewNode {
);
}
if (children.length === 0) return [new MessageNode(this, 'No file history')];
if (children.length === 0) return [new MessageNode(this, 'No file history could be found.')];
return children;
}

+ 1
- 1
src/views/nodes/fileHistoryTrackerNode.ts View File

@ -34,7 +34,7 @@ export class FileHistoryTrackerNode extends SubscribeableViewNode
async getChildren(): Promise<ViewNode[]> {
if (this._child === undefined) {
if (this.uri === unknownGitUri) {
return [new MessageNode(this, 'There are no editors open that can provide file history')];
return [new MessageNode(this, 'There are no editors open that can provide file history information.')];
}
this._child = new FileHistoryNode(this.uri, this, this.view);

+ 1
- 1
src/views/nodes/lineHistoryNode.ts View File

@ -89,7 +89,7 @@ export class LineHistoryNode extends SubscribeableViewNode {
}
}
if (children.length === 0) return [new MessageNode(this, 'No line history')];
if (children.length === 0) return [new MessageNode(this, 'No line history could be found.')];
return children;
}

+ 1
- 1
src/views/nodes/lineHistoryTrackerNode.ts View File

@ -35,7 +35,7 @@ export class LineHistoryTrackerNode extends SubscribeableViewNode
async getChildren(): Promise<ViewNode[]> {
if (this._child === undefined) {
if (this.uri === unknownGitUri) {
return [new MessageNode(this, 'There are no editors open that can provide line history')];
return [new MessageNode(this, 'There are no editors open that can provide line history information.')];
}
this._child = new LineHistoryNode(this.uri, this._selection!, this, this.view);

+ 1
- 1
src/views/nodes/remotesNode.ts View File

@ -24,7 +24,7 @@ export class RemotesNode extends ViewNode {
async getChildren(): Promise<ViewNode[]> {
const remotes = await this.repo.getRemotes();
if (remotes === undefined || remotes.length === 0) return [new MessageNode(this, 'No remotes configured')];
if (remotes === undefined || remotes.length === 0) return [new MessageNode(this, 'No remotes could be found')];
remotes.sort((a, b) => a.name.localeCompare(b.name));
return [...Iterables.map(remotes, r => new RemoteNode(r, this.uri, this.repo, this, this.view))];

+ 2
- 2
src/views/nodes/repositoriesNode.ts View File

@ -33,7 +33,7 @@ export class RepositoriesNode extends SubscribeableViewNode {
async getChildren(): Promise<ViewNode[]> {
if (this._children === undefined) {
const repositories = [...(await Container.git.getRepositories())];
if (repositories.length === 0) return [new MessageNode(this, 'No repositories found')];
if (repositories.length === 0) return [new MessageNode(this, 'No repositories could be found.')];
const children = [];
for (const repo of repositories.sort((a, b) => a.index - b.index)) {
@ -66,7 +66,7 @@ export class RepositoriesNode extends SubscribeableViewNode {
if (repositories.length === 0 && (this._children === undefined || this._children.length === 0)) return;
if (repositories.length === 0) {
this._children = [new MessageNode(this, 'No repositories found')];
this._children = [new MessageNode(this, 'No repositories could be found.')];
return;
}

+ 1
- 1
src/views/nodes/stashesNode.ts View File

@ -24,7 +24,7 @@ export class StashesNode extends ViewNode {
async getChildren(): Promise<ViewNode[]> {
const stash = await this.repo.getStashList();
if (stash === undefined) return [new MessageNode(this, 'No stashed changes')];
if (stash === undefined) return [new MessageNode(this, 'No stashed changes.')];
return [...Iterables.map(stash.commits.values(), c => new StashNode(c, this, this.view))];
}

+ 1
- 1
src/views/nodes/tagNode.ts View File

@ -40,7 +40,7 @@ export class TagNode extends ViewRefNode implements PageableViewNode {
maxCount: this.maxCount || this.view.config.defaultItemLimit,
ref: this.tag.name
});
if (log === undefined) return [new MessageNode(this, 'No commits yet')];
if (log === undefined) return [new MessageNode(this, 'No commits could be found.')];
const children = [
...insertDateMarkers(Iterables.map(log.commits.values(), c => new CommitNode(c, this, this.view)), this)

+ 1
- 1
src/views/nodes/tagsNode.ts View File

@ -26,7 +26,7 @@ export class TagsNode extends ViewNode {
async getChildren(): Promise<ViewNode[]> {
const tags = await this.repo.getTags();
if (tags.length === 0) return [new MessageNode(this, 'No tags yet')];
if (tags.length === 0) return [new MessageNode(this, 'No tags could be found.')];
tags.sort((a, b) => a.name.localeCompare(b.name));
const tagNodes = [...tags.map(t => new TagNode(t, this.uri, this, this.view))];

Loading…
Cancel
Save