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

Configure Feed

Select the types of activity you want to include in your feed.

fix: action bar diviver regression

+20 -5
+20 -5
internal/web/components/action_bar.templ
··· 36 36 AuthorDID string // DID of the content author (for block action) 37 37 } 38 38 39 + // hasModActions returns true if any moderation menu items will render. 40 + func (p ActionBarProps) hasModActions() bool { 41 + return (p.CanHideRecord && p.SubjectURI != "") || 42 + (p.CanBlockUser && p.AuthorDID != "" && !p.IsOwner) 43 + } 44 + 45 + // hasReportAction returns true if the report menu item will render. 46 + func (p ActionBarProps) hasReportAction() bool { 47 + return p.IsAuthenticated && !p.IsOwner 48 + } 49 + 39 50 // ActionBar renders the action bar with Comments, Like, Share, and More menu 40 51 // Order: [💬 Comments] [♡ Like] [↗ Share] [⋯ More] 41 52 templ ActionBar(props ActionBarProps) { ··· 89 100 </svg> 90 101 </button> 91 102 <!-- Dropdown menu --> 92 - // FIX: the line shows above the popup modal in many cases 93 - // FIX: the modal should open in the other direction if it would extend past the edge of the viewport 94 103 <div 95 104 x-show="moreOpen" 96 105 x-transition:enter="transition ease-out duration-100" ··· 127 136 Delete 128 137 </button> 129 138 } 130 - <div class="action-menu-divider"></div> 139 + if props.hasModActions() || props.hasReportAction() { 140 + <div class="action-menu-divider"></div> 141 + } 131 142 } 132 143 <!-- Moderation actions (for moderators/admins) --> 133 144 if props.CanHideRecord && props.SubjectURI != "" { ··· 162 173 Hide from feed 163 174 </button> 164 175 } 165 - <div class="action-menu-divider"></div> 176 + if (props.CanBlockUser && props.AuthorDID != "" && !props.IsOwner) || props.hasReportAction() { 177 + <div class="action-menu-divider"></div> 178 + } 166 179 } 167 180 if props.CanBlockUser && props.AuthorDID != "" && !props.IsOwner { 168 181 <button ··· 179 192 </svg> 180 193 Block user 181 194 </button> 182 - <div class="action-menu-divider"></div> 195 + if props.hasReportAction() { 196 + <div class="action-menu-divider"></div> 197 + } 183 198 } 184 199 <!-- Report (available to authenticated users) --> 185 200 if props.IsAuthenticated && !props.IsOwner {