Monorepo for Tangled tangled.org

appview/pages: render a placeholder avatar when there's no did #896

merged opened by anirudh.fi targeting master from icy/tolqpt
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:hwevmowznbiukdf6uk5dwrrq/sh.tangled.repo.pull/3m7zpneazn422
+15 -4
Diff #5
+4 -1
appview/pages/templates/repo/commit.html
··· 100 100 {{ if $did }} 101 101 {{ template "user/fragments/picHandleLink" $did }} 102 102 {{ else }} 103 - <a href="mailto:{{ $email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $name }}</a> 103 + <span class="flex items-center gap-1"> 104 + {{ placeholderAvatar "tiny" }} 105 + <a href="mailto:{{ $email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $name }}</a> 106 + </span> 104 107 {{ end }} 105 108 {{ end }} 106 109
+6 -2
appview/pages/templates/repo/index.html
··· 254 254 {{ define "attribution" }} 255 255 {{ $commit := index . 0 }} 256 256 {{ $map := index . 1 }} 257 - <span class="flex items-center"> 257 + <span class="flex items-center gap-1"> 258 258 {{ $author := index $map $commit.Author.Email }} 259 259 {{ $coauthors := $commit.CoAuthors }} 260 260 {{ $all := list }} ··· 269 269 {{ end }} 270 270 {{ end }} 271 271 272 - {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} 272 + {{ if $author }} 273 + {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} 274 + {{ else }} 275 + {{ placeholderAvatar "tiny" }} 276 + {{ end }} 273 277 <a href="{{ if $author }}/{{ $author }}{{ else }}mailto:{{ $commit.Author.Email }}{{ end }}" 274 278 class="no-underline hover:underline"> 275 279 {{ if $author }}{{ resolve $author }}{{ else }}{{ $commit.Author.Name }}{{ end }}
+5 -1
appview/pages/templates/repo/log.html
··· 186 186 {{ end }} 187 187 {{ end }} 188 188 189 - {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} 189 + {{ if $author }} 190 + {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} 191 + {{ else }} 192 + {{ placeholderAvatar "tiny" }} 193 + {{ end }} 190 194 <a href="{{ if $author }}/{{ $author }}{{ else }}mailto:{{ $commit.Author.Email }}{{ end }}" 191 195 class="no-underline hover:underline"> 192 196 {{ if $author }}{{ resolve $author }}{{ else }}{{ $commit.Author.Name }}{{ end }}

History

6 rounds 1 comment
sign up or login to add to the discussion
1 commit
expand
appview/pages: render a placeholder avatar when there's no did
expand 0 comments
pull request successfully merged
1 commit
expand
appview/pages: render a placeholder avatar when there's no did
expand 0 comments
1 commit
expand
appview/pages: render a placeholder avatar when there's no did
expand 0 comments
1 commit
expand
appview/pages: render a placeholder avatar when there's no did
expand 0 comments
1 commit
expand
appview/pages: render a placeholder avatar when there's no did
expand 0 comments
1 commit
expand
appview/pages: render a placeholder avatar when there's no did
expand 1 comment

stack looks good to me!

Haven't tested yet. I should configure avatar service in my local setup to test this.