Coffee journaling on ATProto (alpha) alpha.arabica.social
coffee

fix: don't show "add new brew" button when viewing someone else's profile

pdewey.com 535e0443 8c52ef60

verified
+6
+6
templates/partials/brew_list_content.tmpl
··· 1 1 {{define "brew_list_content"}} 2 2 {{if not .Brews}} 3 3 <div class="bg-gradient-to-br from-brown-100 to-brown-200 rounded-xl shadow-xl p-8 text-center border border-brown-300"> 4 + {{if $.IsOwnProfile}} 4 5 <p class="text-brown-800 text-lg mb-4 font-medium">No brews yet! Start tracking your coffee journey.</p> 5 6 <a href="/brews/new" 6 7 class="inline-block bg-gradient-to-r from-brown-700 to-brown-800 text-white py-3 px-6 rounded-lg hover:from-brown-800 hover:to-brown-900 transition-all shadow-lg hover:shadow-xl font-medium"> 7 8 Add Your First Brew 8 9 </a> 10 + {{else}} 11 + <p class="text-brown-800 text-lg font-medium">No brews yet.</p> 12 + {{end}} 9 13 </div> 10 14 {{else}} 11 15 <div class="overflow-x-auto bg-gradient-to-br from-brown-100 to-brown-200 rounded-xl shadow-xl border border-brown-300"> ··· 114 118 <td class="px-4 py-4 whitespace-nowrap text-sm font-medium space-x-2 align-top"> 115 119 <a href="/brews/{{.RKey}}" 116 120 class="text-brown-700 hover:text-brown-900 font-medium">View</a> 121 + {{if $.IsOwnProfile}} 117 122 <button hx-delete="/brews/{{.RKey}}" 118 123 hx-confirm="Are you sure you want to delete this brew?" hx-target="closest tr" 119 124 hx-swap="outerHTML swap:1s" class="text-brown-600 hover:text-brown-800 font-medium"> 120 125 Delete 121 126 </button> 127 + {{end}} 122 128 </td> 123 129 </tr> 124 130 {{end}}