Bläddra i källkod

Adds tracking branch into indicator

main
Eric Amodio 6 år sedan
förälder
incheckning
c42b166730
3 ändrade filer med 5 tillägg och 2 borttagningar
  1. Binär
      images/cl-branch-upstream-indicator.png
  2. +3
    -0
      src/constants.ts
  3. +2
    -2
      src/views/commitNode.ts

Binär
images/cl-branch-upstream-indicator.png Visa fil

Före Efter
Bredd: 477  |  Höjd: 177  |  Storlek: 20 KiB

+ 3
- 0
src/constants.ts Visa fil

@ -74,6 +74,8 @@ export function isTextEditor(editor: TextEditor): boolean {
}
export enum GlyphChars {
AngleBracketLeftHeavy = '\u2770',
AngleBracketRightHeavy = '\u2771',
ArrowBack = '\u21a9',
ArrowDown = '\u2193',
ArrowDropRight = '\u2937',
@ -103,6 +105,7 @@ export enum GlyphChars {
MuchLessThan = '\u22D8',
Pencil = '\u270E',
Space = '\u00a0',
SpaceThin = '\u2009',
SquareWithBottomShadow = '\u274F',
SquareWithTopShadow = '\u2750',
ZeroWidthSpace = '\u200b'

+ 2
- 2
src/views/commitNode.ts Visa fil

@ -52,7 +52,7 @@ export class CommitNode extends ExplorerRefNode {
} as ICommitFormatOptions);
if (this.trackingRef === this.commit.sha) {
label = `${GlyphChars.ArrowHeadRight} ${label}`;
label = `${GlyphChars.AngleBracketLeftHeavy}${GlyphChars.SpaceThin}${this.branch!.tracking!}${GlyphChars.SpaceThin}${GlyphChars.AngleBracketRightHeavy}${GlyphChars.ArrowHeadRight}${GlyphChars.Space} ${label}`;
}
const item = new TreeItem(label, TreeItemCollapsibleState.Collapsed);
@ -72,7 +72,7 @@ export class CommitNode extends ExplorerRefNode {
item.tooltip = CommitFormatter.fromTemplate(
this.commit.isUncommitted
? `\${author} ${GlyphChars.Dash} \${id}\n\${ago} (\${date})`
: `\${author} ${GlyphChars.Dash} \${id}\n\${ago} (\${date})\n\n\${message}`,
: `\${author} ${GlyphChars.Dash} \${id}${this.trackingRef === this.commit.sha ? ` (${this.branch!.tracking!})` : ''}\n\${ago} (\${date})\n\n\${message}`,
this.commit,
{
dataFormat: Container.config.defaultDateFormat

Laddar…
Avbryt
Spara