diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-19 18:07:13 +0530 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-19 18:07:13 +0530 |
commit | 263a1509dbd79b1df3abe1bd42e2cd5d45448dea (patch) | |
tree | cfd115845d0f104fdb4794980a415c5f08ced8e0 /templates/commit.html | |
parent | 194ec63d81ed7c8d6f63945139ea6d0bdfc597b3 (diff) | |
download | legit-263a1509dbd79b1df3abe1bd42e2cd5d45448dea.tar.gz legit-263a1509dbd79b1df3abe1bd42e2cd5d45448dea.tar.bz2 legit-263a1509dbd79b1df3abe1bd42e2cd5d45448dea.zip |
diff: show diff type
Diffstat (limited to '')
-rw-r--r-- | templates/commit.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/commit.html b/templates/commit.html index 65803b7..c37f850 100644 --- a/templates/commit.html +++ b/templates/commit.html @@ -46,8 +46,17 @@ {{ $repo := .name }} {{ $this := .commit.This }} {{ range .diff }} - <div class="diff"> <div id="{{ .Name.New }}"> + <div class="diff"> + {{ if .IsNew }} + <span class="diff-type">A</span> + {{ end }} + {{ if .IsDelete }} + <span class="diff-type">D</span> + {{ end }} + {{ if not (or .IsNew .IsDelete) }} + <span class="diff-type">M</span> + {{ end }} {{ if .Name.Old }} <a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}">{{ .Name.Old }}</a> {{ if .Name.New }} |