From bf255e97da206ba0912280fd7b9fd3361b5dd5ee Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 28 Oct 2018 00:42:48 -0400 Subject: [PATCH] Updates empty state messaging --- src/views/nodes/branchNode.ts | 2 +- src/views/nodes/fileHistoryNode.ts | 2 +- src/views/nodes/fileHistoryTrackerNode.ts | 2 +- src/views/nodes/lineHistoryNode.ts | 2 +- src/views/nodes/lineHistoryTrackerNode.ts | 2 +- src/views/nodes/remotesNode.ts | 2 +- src/views/nodes/repositoriesNode.ts | 4 ++-- src/views/nodes/stashesNode.ts | 2 +- src/views/nodes/tagNode.ts | 2 +- src/views/nodes/tagsNode.ts | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/views/nodes/branchNode.ts b/src/views/nodes/branchNode.ts index f9a5582..cc63a1b 100644 --- a/src/views/nodes/branchNode.ts +++ b/src/views/nodes/branchNode.ts @@ -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 diff --git a/src/views/nodes/fileHistoryNode.ts b/src/views/nodes/fileHistoryNode.ts index 9f4d189..6159b96 100644 --- a/src/views/nodes/fileHistoryNode.ts +++ b/src/views/nodes/fileHistoryNode.ts @@ -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; } diff --git a/src/views/nodes/fileHistoryTrackerNode.ts b/src/views/nodes/fileHistoryTrackerNode.ts index c197adf..47c2d7d 100644 --- a/src/views/nodes/fileHistoryTrackerNode.ts +++ b/src/views/nodes/fileHistoryTrackerNode.ts @@ -34,7 +34,7 @@ export class FileHistoryTrackerNode extends SubscribeableViewNode { 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); diff --git a/src/views/nodes/lineHistoryNode.ts b/src/views/nodes/lineHistoryNode.ts index d1dd32e..4f6e4ca 100644 --- a/src/views/nodes/lineHistoryNode.ts +++ b/src/views/nodes/lineHistoryNode.ts @@ -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; } diff --git a/src/views/nodes/lineHistoryTrackerNode.ts b/src/views/nodes/lineHistoryTrackerNode.ts index fb67b33..abf1b30 100644 --- a/src/views/nodes/lineHistoryTrackerNode.ts +++ b/src/views/nodes/lineHistoryTrackerNode.ts @@ -35,7 +35,7 @@ export class LineHistoryTrackerNode extends SubscribeableViewNode { 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); diff --git a/src/views/nodes/remotesNode.ts b/src/views/nodes/remotesNode.ts index 341977f..c5ae111 100644 --- a/src/views/nodes/remotesNode.ts +++ b/src/views/nodes/remotesNode.ts @@ -24,7 +24,7 @@ export class RemotesNode extends ViewNode { async getChildren(): Promise { 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))]; diff --git a/src/views/nodes/repositoriesNode.ts b/src/views/nodes/repositoriesNode.ts index d99e99e..614bd2e 100644 --- a/src/views/nodes/repositoriesNode.ts +++ b/src/views/nodes/repositoriesNode.ts @@ -33,7 +33,7 @@ export class RepositoriesNode extends SubscribeableViewNode { async getChildren(): Promise { 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; } diff --git a/src/views/nodes/stashesNode.ts b/src/views/nodes/stashesNode.ts index 976246a..7995f02 100644 --- a/src/views/nodes/stashesNode.ts +++ b/src/views/nodes/stashesNode.ts @@ -24,7 +24,7 @@ export class StashesNode extends ViewNode { async getChildren(): Promise { 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))]; } diff --git a/src/views/nodes/tagNode.ts b/src/views/nodes/tagNode.ts index b45e36d..6c82a1b 100644 --- a/src/views/nodes/tagNode.ts +++ b/src/views/nodes/tagNode.ts @@ -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) diff --git a/src/views/nodes/tagsNode.ts b/src/views/nodes/tagsNode.ts index 7708ff8..5911a96 100644 --- a/src/views/nodes/tagsNode.ts +++ b/src/views/nodes/tagsNode.ts @@ -26,7 +26,7 @@ export class TagsNode extends ViewNode { async getChildren(): Promise { 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))];