Skip to content

Commit

Permalink
UI enable row revert action when possible (#3291)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopcoder authored May 1, 2022
1 parent 3142834 commit 19b27aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webui/src/lib/components/repository/changes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ export const TreeEntryRow = ({entry, relativeTo = "", leaf = false, dirExpanded,
if (!leaf) {
rowActions.push(new RowAction(<GraphIcon/>, showSummary ? "Hide summary" : "Calculate change summary", showSummary, () => setShowSummary(!showSummary)))
}
rowActions.push(new RowAction(<HistoryIcon/>, "Revert changes", false, () => {setShowRevertConfirm(true)}))
if (onRevert) {
rowActions.push(new RowAction(<HistoryIcon/>, "Revert changes", false, () => {
setShowRevertConfirm(true)
}))
}
return (
<tr className={rowClass}>
<td className="pl-4 col-auto p-2">{diffIndicator}</td>
Expand Down

0 comments on commit 19b27aa

Please sign in to comment.