forked from tangled.org/core
Monorepo for Tangled — https://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
···
</td>
<td class="py-3 whitespace-nowrap text-gray-500 dark:text-gray-400">
{{ if .Commit }}
-
{{ .Commit.Author.When | timeFmt }}
+
{{ .Commit.Committer.When | timeFmt }}
{{ end }}
</td>
</tr>
···
</a>
</span>
<div class="inline-block px-1 select-none after:content-['·']"></div>
-
<span>{{ .Commit.Author.When | timeFmt }}</span>
+
<span>{{ .Commit.Committer.When | timeFmt }}</span>
</div>
{{ end }}
</div>
+1 -1
appview/pages/templates/repo/commit.html
···
<a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $commit.Author.Name }}</a>
{{ end }}
<span class="px-1 select-none before:content-['\00B7']"></span>
-
{{ timeFmt $commit.Author.When }}
+
{{ timeFmt $commit.Committer.When }}
<span class="px-1 select-none before:content-['\00B7']"></span>
</p>
+1 -1
appview/pages/templates/repo/empty.html
···
<a href="/{{ $.RepoInfo.FullName }}/tree/{{$br.Name}}" class="no-underline hover:no-underline">
<div class="flex items-center justify-between p-2">
{{ $br.Name }}
-
<time class="text-gray-500 dark:text-gray-400">{{ timeFmt $br.Commit.Author.When }}</time>
+
<time class="text-gray-500 dark:text-gray-400">{{ timeFmt $br.Commit.Committer.When }}</time>
</div>
</a>
{{ end }}
+2 -2
appview/pages/templates/repo/index.html
···
<div
class="inline-block px-1 select-none after:content-['·']"
></div>
-
<span>{{ timeFmt .Author.When }}</span>
+
<span>{{ timeFmt .Committer.When }}</span>
{{ $tagsForCommit := index $.TagMap .Hash.String }}
{{ if gt (len $tagsForCommit) 0 }}
<div
···
</a>
{{ if .Commit }}
<span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>
-
<time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .Commit.Author.When }}</time>
+
<time class="text-xs text-gray-500 dark:text-gray-400">{{ timeFmt .Commit.Committer.When }}</time>
{{ end }}
{{ if .IsDefault }}
<span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>
+2 -2
appview/pages/templates/repo/log.html
···
<p class="hidden mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (index $messageParts 1) }}</p>
{{ end }}
</td>
-
<td class=" py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Author.When }}</td>
+
<td class=" py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Committer.When }}</td>
</tr>
{{ end }}
</tbody>
···
</a>
</span>
<div class="inline-block px-1 select-none after:content-['·']"></div>
-
<span>{{ shortTimeFmt $commit.Author.When }}</span>
+
<span>{{ shortTimeFmt $commit.Committer.When }}</span>
</div>
</div>
{{ end }}
+2 -2
appview/state/repo.go
···
return 1
}
if a.Commit != nil {
-
if a.Commit.Author.When.Before(b.Commit.Author.When) {
+
if a.Commit.Committer.When.Before(b.Commit.Committer.When) {
return 1
} else {
return -1
···
return 1
}
if a.Commit != nil {
-
if a.Commit.Author.When.Before(b.Commit.Author.When) {
+
if a.Commit.Committer.When.Before(b.Commit.Committer.When) {
return 1
} else {
return -1