Ver a proveniência

Adds an arrow to the open changes action on hovers

Makes commit ids code-blocks in hovers to stand out more
Updates the tooltip for clarity as well
main
Eric Amodio há 3 anos
ascendente
cometimento
4adbf0e51f
2 ficheiros alterados com 6 adições e 6 eliminações
  1. +5
    -5
      src/git/formatters/commitFormatter.ts
  2. +1
    -1
      src/views/nodes/commitNode.ts

+ 5
- 5
src/git/formatters/commitFormatter.ts Ver ficheiro

@ -289,7 +289,7 @@ export class CommitFormatter extends Formatter {
this._options.tokenOptions.commands,
)}\``;
commands += `  **[\`${GlyphChars.MuchLessThan}\`](${DiffWithCommand.getMarkdownCommandArgs({
commands += `  [$(chevron-left)$(compare-changes)](${DiffWithCommand.getMarkdownCommandArgs({
lhs: {
sha: diffUris.previous.sha ?? emptyStr,
uri: diffUris.previous.documentUri(),
@ -300,7 +300,7 @@ export class CommitFormatter extends Formatter {
},
repoPath: this._item.repoPath,
line: this._options.editor?.line,
})} "Open Changes")** `;
})} "Open Changes with Previous Revision")`;
} else {
commands = `\`${this._padOrTruncate(
GitRevision.shorten(
@ -315,14 +315,14 @@ export class CommitFormatter extends Formatter {
const separator = '   |   ';
commands = `---\n\n[$(git-commit) ${this.id}](${ShowQuickCommitCommand.getMarkdownCommandArgs(
commands = `---\n\n[\`$(git-commit) ${this.id}\`](${ShowQuickCommitCommand.getMarkdownCommandArgs(
this._item.sha,
)} "Show Commit")`;
commands += `   [$(compare-changes)](${DiffWithCommand.getMarkdownCommandArgs(
commands += `  [$(chevron-left)$(compare-changes)](${DiffWithCommand.getMarkdownCommandArgs(
this._item,
this._options.editor?.line,
)} "Open Changes")`;
)} "Open Changes with Previous Revision")`;
if (this._item.previousSha != null) {
const uri = GitUri.toRevisionUri(

+ 1
- 1
src/views/nodes/commitNode.ts Ver ficheiro

@ -151,7 +151,7 @@ export class CommitNode extends ViewRefNode
}
const tooltip = await CommitFormatter.fromTemplateAsync(
`\${'$(git-commit) 'id }\${' via 'pullRequest}\${ \u2022 changesDetail}\${'   'tips}\n\n\${avatar}  __\${author}__, \${ago}   _(\${date})_ \n\n\${message}\${\n\n---\n\nfootnotes}`,
`\${'\`$(git-commit) 'id\`}\${' via 'pullRequest}\${'  \u2022  'changesDetail}\${';    'tips}\n\n\${avatar}  __\${author}__, \${ago}   _(\${date})_ \n\n\${message}\${\n\n---\n\nfootnotes}`,
this.commit,
{
autolinkedIssuesOrPullRequests: autolinkedIssuesOrPullRequests,

Carregando…
Cancelar
Guardar