|
|
@ -206,6 +206,7 @@ export class CommitDetailsApp extends App> { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.renderActions(this.state); |
|
|
|
this.renderPin(this.state); |
|
|
|
this.renderSha(this.state); |
|
|
|
this.renderMessage(this.state); |
|
|
@ -218,6 +219,11 @@ export class CommitDetailsApp extends App> { |
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
renderActions(state: CommitState) { |
|
|
|
const isHidden = state.selected?.sha === uncommittedSha ? 'true' : 'false'; |
|
|
|
[...document.querySelectorAll('[data-action-type="graph"],[data-action-type="more"]')].forEach($el => $el.setAttribute('aria-hidden', isHidden)); |
|
|
|
} |
|
|
|
|
|
|
|
renderPin(state: CommitState) { |
|
|
|
const $el = document.querySelector<HTMLElement>('[data-action="pin"]'); |
|
|
|
if ($el == null) { |
|
|
@ -322,7 +328,7 @@ export class CommitDetailsApp extends App> { |
|
|
|
} |
|
|
|
|
|
|
|
if (state.selected.files?.length) { |
|
|
|
const stashAttr = state.selected.isStash ? 'stash ' : ''; |
|
|
|
const stashAttr = state.selected.isStash ? 'stash ' : state.selected.sha === uncommittedSha ? 'uncommitted ' : ''; |
|
|
|
$el.innerHTML = state.selected.files |
|
|
|
.map( |
|
|
|
(file: Record<string, any>) => `
|
|
|
|