+17
-8
appview/pages/templates/user/profile.html
+17
-8
appview/pages/templates/user/profile.html
···
24
24
{{ range .ProfileTimeline }}
25
25
{{ if eq .Type "issue" }}
26
26
<div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit max-w-full flex items-center gap-2">
27
-
{{ $bgColor := "bg-gray-800 dark:bg-gray-700" }}
27
+
{{ $textColor := "text-gray-800 dark:text-gray-700" }}
28
28
{{ $icon := "ban" }}
29
29
{{ if .Issue.Open }}
30
-
{{ $bgColor = "bg-green-600 dark:bg-green-700" }}
30
+
{{ $textColor = "text-green-600 dark:text-green-700" }}
31
31
{{ $icon = "circle-dot" }}
32
32
{{ end }}
33
-
<div class="{{ $bgColor }} text-white rounded-full p-1">
34
-
{{ i $icon "w-4 h-4 text-white" }}
33
+
<div class="p-1 {{ $textColor }}">
34
+
{{ i $icon "w-5 h-5" }}
35
35
</div>
36
36
<div>
37
37
<p class="text-gray-600 dark:text-gray-300">
···
44
44
</div>
45
45
{{ else if eq .Type "pull" }}
46
46
<div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit flex items-center gap-3">
47
-
<div class="bg-purple-600 dark:bg-purple-700 text-white rounded-full p-1">
48
-
{{ i "git-pull-request" "w-4 h-4" }}
47
+
{{ $textColor := "text-gray-800 dark:text-gray-700" }}
48
+
{{ $icon := "git-pull-request-closed" }}
49
+
{{ if .Pull.State.IsOpen }}
50
+
{{ $textColor = "text-green-600 dark:text-green-700" }}
51
+
{{ $icon = "git-pull-request" }}
52
+
{{ else if .Pull.State.IsMerged }}
53
+
{{ $textColor = "text-purple-600 dark:text-purple-700" }}
54
+
{{ $icon = "git-merge" }}
55
+
{{ end }}
56
+
<div class="{{ $textColor }} p-1">
57
+
{{ i $icon "w-5 h-5" }}
49
58
</div>
50
59
<div>
51
60
<p class="text-gray-600 dark:text-gray-300">
···
59
68
</div>
60
69
{{ else if eq .Type "repo" }}
61
70
<div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit flex items-center gap-3">
62
-
<div class="bg-gray-200 dark:bg-gray-300 text-black rounded-full p-1">
63
-
{{ i "book-plus" "w-4 h-4" }}
71
+
<div class="text-black dark:text-white p-1">
72
+
{{ i "book-plus" "w-5 h-5" }}
64
73
</div>
65
74
<div>
66
75
<p class="text-gray-600 dark:text-gray-300">