refactor: clean up fragile diff render templates, use backend typed structs (#38517)

Blob.Size requires a context after the repository context removal
(5b078f72aa).

Actually the template code should just render, it should not depend on
the fragile dynamic calls to backend functions.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
YumeMichi
2026-07-19 11:20:01 +08:00
committed by GitHub
parent e8befe0268
commit ae176cd649
7 changed files with 115 additions and 112 deletions
+3 -1
View File
@@ -1,6 +1,8 @@
{{$root := ctx.RootData}}
{{$file := $.file}}
<tr>
<td>
{{$result := call .root.CreateCsvDiff .file .blobBase .blobHead}}
{{$result := call $root.CreateCsvDiff $file $file.LeftBlob $file.RightBlob}}
{{if $result.Error}}
<div class="ui center">{{$result.Error}}</div>
{{else if $result.Sections}}