main
|
Last change
on this file since 48ca5fc was f6c414e, checked in by Robin Genis <roboburr@…>, 3 months ago |
|
feat(fediverse): star = like via your own fediverse account (server-only input)
The post heart is now a star that lets any visitor like the post from their own
fediverse account: click -> enter just your server (e.g. mastodon.social) -> bounce
to your server's authorize_interaction. No full @handle needed (your server knows
who you are). Count shows incoming fediverse likes. Reuses the remote-interaction
popover; placeholder simplified to the server.
Co-Authored-By: Claude <noreply@…>
|
-
Property mode
set to
100644
|
|
File size:
950 bytes
|
| Line | |
|---|
| 1 | <%# Fediverse like — a visitor likes this post out loud from their OWN fediverse
|
|---|
| 2 | account. Click → popover asks only for their server (e.g. mastodon.social) →
|
|---|
| 3 | bounces to that server's /authorize_interaction, where they favourite it.
|
|---|
| 4 | Reuses the .fedi-remote-reply-btn popover wired in post.ejs. The count shows
|
|---|
| 5 | the incoming fediverse likes.
|
|---|
| 6 | Expects: noteUri (post's public URL), fediLikeCount, fediPh (server hint). %>
|
|---|
| 7 | <button type="button" class="like-btn fedi-remote-reply-btn"
|
|---|
| 8 | data-fedi-uri="<%= typeof noteUri !== 'undefined' ? noteUri : '' %>"
|
|---|
| 9 | data-fedi-ph="<%= typeof fediPh !== 'undefined' && fediPh ? fediPh : 'mastodon.social' %>"
|
|---|
| 10 | aria-label="<%= t('like.fedi_title') %>" title="<%= t('like.fedi_title') %>">
|
|---|
| 11 | <span class="like-heart" aria-hidden="true">★</span>
|
|---|
| 12 | <span class="like-count"><%= (typeof fediLikeCount !== 'undefined' && fediLikeCount) ? fediLikeCount : 0 %></span>
|
|---|
| 13 | </button>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.