diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index 94fdf27..fd5f7f3 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -39,18 +39,19 @@

- Affected files + Affected files {{ range $diff }} + {{ end }}
-{{end}} + {{end}} {{ define "repoAfter" }} @@ -83,11 +84,11 @@ M {{ end }} - {{ $name := .Name.New}} {{ if .IsDelete }} - {{ $name = .Name.Old }} + {{ .Name.Old }} + {{ else }} + {{ .Name.New }} {{ end }} - {{ $name }} {{ $iconstyle := "p-1 mx-1 hover:bg-gray-100 rounded" }} @@ -106,35 +107,38 @@ - - - {{ if .IsDelete }} -

This file as been deleted.

- {{ else }} - {{ if .IsBinary }} -

Not showing binary file.

- {{ else }} -
-                {{- range .TextFragments -}}
-                
{{ .Header }}
- {{- range .Lines -}} - {{- if eq .Op.String "+" -}} -
{{ .Op.String }}{{ .Line }}
- {{- end -}} - - {{- if eq .Op.String "-" -}} -
{{ .Op.String }}{{ .Line }}
- {{- end -}} - - {{- if eq .Op.String " " -}} -
{{ .Op.String }}{{ .Line }}
- {{- end -}} - - {{- end -}} - {{- end -}} -
+ + {{ if .IsDelete }} +

+ This file has been deleted in this commit. +

+ {{ else }} + {{ if .IsBinary }} +

+ This is a binary file and will not be displayed. +

+ {{ else }} +
+            {{- range .TextFragments -}}
+              
{{ .Header }}
+ {{- range .Lines -}} + {{- if eq .Op.String "+" -}} +
{{ .Op.String }}{{ .Line }}
+ {{- end -}} + + {{- if eq .Op.String "-" -}} +
{{ .Op.String }}{{ .Line }}
+ {{- end -}} + + {{- if eq .Op.String " " -}} +
{{ .Op.String }}{{ .Line }}
+ {{- end -}} + + {{- end -}} {{- end -}} - {{- end -}} +
+ {{- end -}} + {{ end }}