diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -14,6 +14,7 @@ {{ block "diffLayout" . }} {{ end }} {{ template "fragments/resizable" }} {{ template "activeFileHighlight" }} {{ template "fragments/line-quote-button" }} + {{ template "reviewState" }} {{ end }} @@ -37,7 +38,7 @@ {{ $stat := $diff.Stats }} {{ $count := len $diff.ChangedFiles }} {{ template "repo/fragments/diffStatPill" $stat }} - + {{ if $root }} {{ if $root.IsInterdiff }} @@ -178,6 +179,21 @@ {{ end }} + @@ -305,3 +321,131 @@ updateActiveFile(); })(); {{ end }} + +{{ define "reviewState" }} + +{{ end }} diff --git a/appview/pages/templates/repo/pulls/pull.html b/appview/pages/templates/repo/pulls/pull.html --- a/appview/pages/templates/repo/pulls/pull.html +++ b/appview/pages/templates/repo/pulls/pull.html @@ -100,6 +100,9 @@ {{ end }} {{ define "contentAfter" }} + {{ if .IsInterdiff }} + + {{ end }} {{ template "repo/fragments/diff" (list .Diff .DiffOpts $) }} {{ end }} diff --git a/types/diff.go b/types/diff.go --- a/types/diff.go +++ b/types/diff.go @@ -84,12 +84,7 @@ func (d NiceDiff) FileTree() *filetree.FileTreeNode { fs := make([]string, len(d.Diff)) for i, s := range d.Diff { - n := s.Names() - if n.New == "" { - fs[i] = n.Old - } else { - fs[i] = n.New - } + fs[i] = s.Id() } return filetree.FileTree(fs) }