Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #573 from AVDW/octicons-fix
Browse files Browse the repository at this point in the history
Updated icon references to match vscode documentation
  • Loading branch information
jrbriggs authored Nov 6, 2019
2 parents 50e9c03 + 5cf1c81 commit 3f0d8c3
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 28 deletions.
7 changes: 5 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/clients/buildclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ export class BuildClient extends BaseClient {
if (this._statusBarItem !== undefined) {
const icon: string = Utils.GetBuildResultIcon(build.result);
this._statusBarItem.command = CommandNames.OpenBuildSummaryPage;
this._statusBarItem.text = `$(icon octicon-package) ` + `$(icon ${icon})`;
this._statusBarItem.text = `$(package) ` + `$(${icon})`;
this._statusBarItem.tooltip = "(" + BuildResult[build.result] + ") " + Strings.NavigateToBuildSummary + " " + build.buildNumber;
}
} else {
Logger.LogInfo("No builds were found for team " + this._serverContext.RepoInfo.TeamProject.toString() +
", repo id " + this._serverContext.RepoInfo.RepositoryId.toString() + ", + branch " + (!context.CurrentBranch ? "UNKNOWN" : context.CurrentBranch.toString()));
if (this._statusBarItem !== undefined) {
this._statusBarItem.command = CommandNames.OpenBuildSummaryPage;
this._statusBarItem.text = `$(icon octicon-package) ` + `$(icon octicon-dash)`;
this._statusBarItem.text = `$(package) ` + `$(dash)`;
this._statusBarItem.tooltip = context.Type === RepositoryType.GIT ? Strings.NoBuildsFound : Strings.NoTfvcBuildsFound;
}
}
Expand Down Expand Up @@ -112,6 +112,6 @@ export class BuildClient extends BaseClient {
}

public static GetOfflineBuildStatusText() : string {
return `$(icon octicon-package) ` + `???`;
return `$(package) ` + `???`;
}
}
20 changes: 10 additions & 10 deletions src/clients/gitclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export class GitClient extends BaseClient {
Logger.LogInfo("Getting pull requests that I requested...");
const svc: GitVcService = new GitVcService(this._serverContext);
const myPullRequests: GitPullRequest[] = await svc.GetPullRequests(this._serverContext.RepoInfo.RepositoryId, this._serverContext.UserInfo.Id, undefined, PullRequestStatus.Active);
const icon: string = "octicon-search";
const label: string = `$(icon ${icon}) `;
const icon: string = "search";
const label: string = `$(${icon}) `;
requestItems.push({ label: label + Strings.BrowseYourPullRequests, description: undefined, id: undefined });

myPullRequests.forEach((pr) => {
Expand Down Expand Up @@ -156,29 +156,29 @@ export class GitClient extends BaseClient {
private getPullRequestLabel(displayName: string, title: string, description: string, id: string, score: PullRequestScore): BaseQuickPickItem {
let scoreIcon: string = "";
if (score === PullRequestScore.Succeeded) {
scoreIcon = "octicon-check";
scoreIcon = "check";
} else if (score === PullRequestScore.Failed) {
scoreIcon = "octicon-stop";
scoreIcon = "stop";
} else if (score === PullRequestScore.Waiting) {
scoreIcon = "octicon-watch";
scoreIcon = "watch";
} else if (score === PullRequestScore.NoResponse) {
scoreIcon = "octicon-git-pull-request";
scoreIcon = "git-pull-request";
}
const scoreLabel: string = `$(icon ${scoreIcon}) `;
const scoreLabel: string = `$(${scoreIcon}) `;

return { label: scoreLabel + " (" + displayName + ") " + title, description: description, id: id };
}

public static GetOfflinePullRequestStatusText() : string {
return `$(icon octicon-git-pull-request) ???`;
return `$(git-pull-request) ???`;
}

//Sets the text on the pull request status bar
public static GetPullRequestStatusText(total?: string) : string {
if (!total) {
return `$(icon octicon-git-pull-request) $(icon octicon-dash)`;
return `$(git-pull-request) $(dash)`;
}
return `$(icon octicon-git-pull-request) ${total.toString()}`;
return `$(git-pull-request) ${total.toString()}`;
}

//Ensure that we don't accidentally send non-Git (e.g., TFVC) contexts to the Git client
Expand Down
8 changes: 4 additions & 4 deletions src/clients/witclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class WitClient extends BaseClient {
const msg: string = Strings.UnsupportedWitServerVersion;
Logger.LogError(msg);
if (this._statusBarItem !== undefined) {
this._statusBarItem.text = `$(icon octicon-bug) $(icon octicon-x)`;
this._statusBarItem.text = `$(bug) $(x)`;
this._statusBarItem.tooltip = msg;
this._statusBarItem.command = undefined; //Clear the existing command
}
Expand Down Expand Up @@ -284,13 +284,13 @@ export class WitClient extends BaseClient {
}

public static GetOfflinePinnedQueryStatusText() : string {
return `$(icon octicon-bug) ???`;
return `$(bug) ???`;
}

public static GetPinnedQueryStatusText(total?: string) : string {
if (!total) {
return `$(icon octicon-bug) $(icon octicon-dash)`;
return `$(bug) $(dash)`;
}
return `$(icon octicon-bug) ${total.toString()}`;
return `$(bug) ${total.toString()}`;
}
}
4 changes: 2 additions & 2 deletions src/extensionmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ export class ExtensionManager implements Disposable {
if (this._teamServicesStatusBarItem !== undefined) {
//TODO: Should the default command be to display the message?
this._teamServicesStatusBarItem.command = commandOnClick; // undefined clears the command
this._teamServicesStatusBarItem.text = `Team $(icon octicon-stop)`;
this._teamServicesStatusBarItem.text = `Team $(stop)`;
this._teamServicesStatusBarItem.tooltip = message;
this._teamServicesStatusBarItem.show();
}
Expand Down Expand Up @@ -603,7 +603,7 @@ export class ExtensionManager implements Disposable {

private showFeedbackItem(): void {
this._feedbackStatusBarItem.command = CommandNames.SendFeedback;
this._feedbackStatusBarItem.text = `$(icon octicon-megaphone)`;
this._feedbackStatusBarItem.text = `$(megaphone)`;
this._feedbackStatusBarItem.tooltip = Strings.SendFeedback;
this._feedbackStatusBarItem.show();
}
Expand Down
12 changes: 6 additions & 6 deletions src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ export class Utils {
public static GetBuildResultIcon(result: BuildResult) : string {
switch (result) {
case BuildResult.Succeeded:
return "octicon-check";
return "check";
case BuildResult.Canceled:
return "octicon-alert";
return "alert";
case BuildResult.Failed:
return "octicon-stop";
return "stop";
case BuildResult.PartiallySucceeded:
return "octicon-alert";
return "alert";
case BuildResult.None:
return "octicon-question";
return "question";
default:
return "octicon-question";
return "question";
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/team-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ export class TeamExtension {
if (!this._buildStatusBarItem) {
this._buildStatusBarItem = window.createStatusBarItem(StatusBarAlignment.Left, 98);
this._buildStatusBarItem.command = CommandNames.OpenBuildSummaryPage;
this._buildStatusBarItem.text = `$(icon octicon-package) $(icon octicon-dash)`;
this._buildStatusBarItem.text = `$(package) $(dash)`;
this._buildStatusBarItem.tooltip = Strings.NoBuildsFound;
this._buildStatusBarItem.show();
}
Expand Down

0 comments on commit 3f0d8c3

Please sign in to comment.