Changeset f6c414e in Klonkt for src/views/pages


Ignore:
Timestamp:
06/24/2026 04:37:32 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
9cc0f9f
Parents:
434c2e9
Message:

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@…>

Location:
src/views/pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post.ejs

    r434c2e9 rf6c414e  
    3333    <% if (post.status === 'published') { %>
    3434      <div class="post-like-row">
    35         <%- include('../partials/like-button', { post: post, likedByMe: (typeof likedByMe !== 'undefined' && likedByMe), likeCount: (typeof likeCount !== 'undefined' ? likeCount : 0), loggedIn: !!user, loginNext: _base + '/' + post.slug }) %>
     35        <%- include('../partials/like-button', { post: post, noteUri: (typeof ogOrigin !== 'undefined' && ogOrigin ? ogOrigin : '') + (typeof _base !== 'undefined' && _base ? _base : '') + '/' + post.slug, fediLikeCount: (typeof fediverse !== 'undefined' && fediverse ? fediverse.likeCount : 0), fediPh: t('fedi.remote_ph') }) %>
    3636      </div>
    3737    <% } %>
     
    127127          + '<button type="submit" class="btn btn-primary fedi-remote-go" aria-label="ok">&rarr;</button>'
    128128          + '<button type="button" class="fedi-remote-cancel" aria-label="x">&times;</button>';
    129         f.querySelector('input').placeholder = b.getAttribute('data-fedi-ph') || '@name@server.social';
     129        f.querySelector('input').placeholder = b.getAttribute('data-fedi-ph') || 'mastodon.social';
    130130        document.body.appendChild(f);            // floating popover → no layout reflow
    131131        place(f, b); current = f; currentBtn = b;
  • src/views/pages/timeline.ejs

    r434c2e9 rf6c414e  
    111111      var f = document.createElement('form'); f.className='fedi-remote-form'; f.dataset.uri = b.getAttribute('data-fedi-uri')||'';
    112112      f.innerHTML = '<input type="text" autocomplete="off" spellcheck="false"><button type="submit" class="btn btn-primary fedi-remote-go" aria-label="ok">&rarr;</button><button type="button" class="fedi-remote-cancel" aria-label="x">&times;</button>';
    113       f.querySelector('input').placeholder = b.getAttribute('data-fedi-ph') || '@name@server.social';
     113      f.querySelector('input').placeholder = b.getAttribute('data-fedi-ph') || 'mastodon.social';
    114114      document.body.appendChild(f); place(f, b); current=f; currentBtn=b; f.querySelector('input').focus();
    115115      return;
Note: See TracChangeset for help on using the changeset viewer.