back interdiff of round #1 and #0

appview/{pages,db}: show star/unstar buttons on the timeline #554

merged
opened by anirudh.fi targeting master from push-qrltzqmlrlln
files
appview
db
pages
templates
timeline
fragments
user
fragments
ERROR
appview/db/timeline.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/templates/timeline/fragments/timeline.html

Failed to calculate interdiff for this file.

NEW
appview/pages/templates/user/fragments/repoCard.html
···
{{ $root := index . 0 }}
{{ $repo := index . 1 }}
{{ $fullName := index . 2 }}
+
{{ $starButton := false }}
+
{{ $starData := dict }}
+
{{ if gt (len .) 3 }}
+
{{ $starButton = index . 3 }}
+
{{ if gt (len .) 4 }}
+
{{ $starData = index . 4 }}
+
{{ end }}
+
{{ end }}
{{ with $repo }}
<div class="py-4 px-6 gap-1 flex flex-col drop-shadow-sm rounded bg-white dark:bg-gray-800 min-h-32">
-
<div class="font-medium dark:text-white flex items-center">
+
<div class="font-medium dark:text-white flex items-center justify-between">
+
<div class="flex items-center">
{{ if .Source }}
{{ i "git-fork" "w-4 h-4 mr-1.5 shrink-0" }}
{{ else }}
{{ i "book-marked" "w-4 h-4 mr-1.5 shrink-0" }}
{{ end }}
-
{{ $repoOwner := resolve .Did }}
-
{{- if $fullName -}}
-
<a href="/{{ $repoOwner }}/{{ .Name }}" class="truncate">{{ $repoOwner }}/{{ .Name }}</a>
-
{{- else -}}
-
<a href="/{{ $repoOwner }}/{{ .Name }}" class="truncate">{{ .Name }}</a>
-
{{- end -}}
+
{{ $repoOwner := resolve .Did }}
+
{{- if $fullName -}}
+
<a href="/{{ $repoOwner }}/{{ .Name }}" class="truncate">{{ $repoOwner }}/{{ .Name }}</a>
+
{{- else -}}
+
<a href="/{{ $repoOwner }}/{{ .Name }}" class="truncate">{{ .Name }}</a>
+
{{- end -}}
+
</div>
+
+
{{ if and $starButton $root.LoggedInUser }}
+
{{ template "repo/fragments/repoStar" $starData }}
+
{{ end }}
</div>
{{ with .Description }}
<div class="text-gray-600 dark:text-gray-300 text-sm line-clamp-2">