From c7fbb98ca5be00c6ec312ad43b5bf3a17a5f5d6a Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Mon, 15 Dec 2025 12:51:10 +0000 Subject: [PATCH] appview/pages: render a placeholder avatar when there's no did Signed-off-by: Anirudh Oppiliappan --- appview/pages/templates/repo/commit.html | 5 ++++- appview/pages/templates/repo/index.html | 8 ++++++-- appview/pages/templates/repo/log.html | 6 +++++- 3 file(s) changed, 15 insertion(s)(+), 4 deletion(s)(-) diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -100,7 +100,10 @@ {{ if $did }} {{ template "user/fragments/picHandleLink" $did }} {{ else }} - {{ $name }} + + {{ placeholderAvatar "tiny" }} + {{ $name }} + {{ end }} {{ end }} diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -254,7 +254,7 @@ {{ define "attribution" }} {{ $commit := index . 0 }} {{ $map := index . 1 }} - + {{ $author := index $map $commit.Author.Email }} {{ $coauthors := $commit.CoAuthors }} {{ $all := list }} @@ -269,7 +269,11 @@ {{ $all = append $all $co }} {{ end }} {{ end }} - {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} + {{ if $author }} + {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} + {{ else }} + {{ placeholderAvatar "tiny" }} + {{ end }} {{ if $author }}{{ resolve $author }}{{ else }}{{ $commit.Author.Name }}{{ end }} diff --git a/appview/pages/templates/repo/log.html b/appview/pages/templates/repo/log.html --- a/appview/pages/templates/repo/log.html +++ b/appview/pages/templates/repo/log.html @@ -186,7 +186,11 @@ {{ $all = append $all $co }} {{ end }} {{ end }} - {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} + {{ if $author }} + {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} + {{ else }} + {{ placeholderAvatar "tiny" }} + {{ end }} {{ if $author }}{{ resolve $author }}{{ else }}{{ $commit.Author.Name }}{{ end }} -- tangled.sh