Monorepo for Tangled tangled.org

appview: use .Committer.When everywhere

anirudh.fi 0b54cd75 d6ec5bd4

verified
Changed files
+10 -10
appview
+2 -2
appview/pages/templates/repo/branches.html
··· 59 </td> 60 <td class="py-3 whitespace-nowrap text-gray-500 dark:text-gray-400"> 61 {{ if .Commit }} 62 - {{ .Commit.Author.When | timeFmt }} 63 {{ end }} 64 </td> 65 </tr> ··· 98 </a> 99 </span> 100 <div class="inline-block px-1 select-none after:content-['·']"></div> 101 - <span>{{ .Commit.Author.When | timeFmt }}</span> 102 </div> 103 {{ end }} 104 </div>
··· 59 </td> 60 <td class="py-3 whitespace-nowrap text-gray-500 dark:text-gray-400"> 61 {{ if .Commit }} 62 + {{ .Commit.Committer.When | timeFmt }} 63 {{ end }} 64 </td> 65 </tr> ··· 98 </a> 99 </span> 100 <div class="inline-block px-1 select-none after:content-['·']"></div> 101 + <span>{{ .Commit.Committer.When | timeFmt }}</span> 102 </div> 103 {{ end }} 104 </div>
+1 -1
appview/pages/templates/repo/commit.html
··· 34 <a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $commit.Author.Name }}</a> 35 {{ end }} 36 <span class="px-1 select-none before:content-['\00B7']"></span> 37 - {{ timeFmt $commit.Author.When }} 38 <span class="px-1 select-none before:content-['\00B7']"></span> 39 </p> 40
··· 34 <a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $commit.Author.Name }}</a> 35 {{ end }} 36 <span class="px-1 select-none before:content-['\00B7']"></span> 37 + {{ timeFmt $commit.Committer.When }} 38 <span class="px-1 select-none before:content-['\00B7']"></span> 39 </p> 40
+1 -1
appview/pages/templates/repo/empty.html
··· 17 <a href="/{{ $.RepoInfo.FullName }}/tree/{{$br.Name}}" class="no-underline hover:no-underline"> 18 <div class="flex items-center justify-between p-2"> 19 {{ $br.Name }} 20 - <time class="text-gray-500 dark:text-gray-400">{{ timeFmt $br.Commit.Author.When }}</time> 21 </div> 22 </a> 23 {{ end }}
··· 17 <a href="/{{ $.RepoInfo.FullName }}/tree/{{$br.Name}}" class="no-underline hover:no-underline"> 18 <div class="flex items-center justify-between p-2"> 19 {{ $br.Name }} 20 + <time class="text-gray-500 dark:text-gray-400">{{ timeFmt $br.Commit.Committer.When }}</time> 21 </div> 22 </a> 23 {{ end }}
+2 -2
appview/pages/templates/repo/index.html
··· 237 <div 238 class="inline-block px-1 select-none after:content-['·']" 239 ></div> 240 - <span>{{ timeFmt .Author.When }}</span> 241 {{ $tagsForCommit := index $.TagMap .Hash.String }} 242 {{ if gt (len $tagsForCommit) 0 }} 243 <div ··· 278 </a> 279 {{ if .Commit }} 280 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 281 - <time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .Commit.Author.When }}</time> 282 {{ end }} 283 {{ if .IsDefault }} 284 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>
··· 237 <div 238 class="inline-block px-1 select-none after:content-['·']" 239 ></div> 240 + <span>{{ timeFmt .Committer.When }}</span> 241 {{ $tagsForCommit := index $.TagMap .Hash.String }} 242 {{ if gt (len $tagsForCommit) 0 }} 243 <div ··· 278 </a> 279 {{ if .Commit }} 280 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 281 + <time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .Commit.Committer.When }}</time> 282 {{ end }} 283 {{ if .IsDefault }} 284 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>
+2 -2
appview/pages/templates/repo/log.html
··· 71 <p class="hidden mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (index $messageParts 1) }}</p> 72 {{ end }} 73 </td> 74 - <td class=" py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Author.When }}</td> 75 </tr> 76 {{ end }} 77 </tbody> ··· 141 </a> 142 </span> 143 <div class="inline-block px-1 select-none after:content-['·']"></div> 144 - <span>{{ shortTimeFmt $commit.Author.When }}</span> 145 </div> 146 </div> 147 {{ end }}
··· 71 <p class="hidden mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (index $messageParts 1) }}</p> 72 {{ end }} 73 </td> 74 + <td class=" py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Committer.When }}</td> 75 </tr> 76 {{ end }} 77 </tbody> ··· 141 </a> 142 </span> 143 <div class="inline-block px-1 select-none after:content-['·']"></div> 144 + <span>{{ shortTimeFmt $commit.Committer.When }}</span> 145 </div> 146 </div> 147 {{ end }}
+2 -2
appview/state/repo.go
··· 99 return 1 100 } 101 if a.Commit != nil { 102 - if a.Commit.Author.When.Before(b.Commit.Author.When) { 103 return 1 104 } else { 105 return -1 ··· 597 return 1 598 } 599 if a.Commit != nil { 600 - if a.Commit.Author.When.Before(b.Commit.Author.When) { 601 return 1 602 } else { 603 return -1
··· 99 return 1 100 } 101 if a.Commit != nil { 102 + if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 103 return 1 104 } else { 105 return -1 ··· 597 return 1 598 } 599 if a.Commit != nil { 600 + if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 601 return 1 602 } else { 603 return -1