Changeset 3d37c67 in Klonkt for src/config


Ignore:
Timestamp:
06/26/2026 11:38:25 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
2f42b60
Parents:
3289a64
Message:

feat(fedi): interact page like/boost are 2 icon+label toggle buttons

Replace the '★ Like this post' / '🔁 Boost this post' buttons with two pill buttons
(gold star + Like, green repeat + Boost) that are real toggles. New ap_my_reactions
table tracks your like/boost state on a REMOTE post; clicking again retracts (Undo
Like / Undo Announce). The like/boost POST now redirects back to the interact page so
the state shows in place (no more separate confirmation screen).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config/database.js

    r3289a64 r3d37c67  
    354354    );
    355355    CREATE INDEX IF NOT EXISTS idx_ap_outbox_post ON ap_outbox(post_id);
     356    -- Your like/boost state on a REMOTE post (the interact page), so those become toggles.
     357    CREATE TABLE IF NOT EXISTS ap_my_reactions (
     358      site_slug TEXT NOT NULL,
     359      target_uri TEXT NOT NULL,
     360      kind TEXT NOT NULL,             -- 'like' | 'boost'
     361      created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
     362      UNIQUE(site_slug, target_uri, kind)
     363    );
    356364  `);
    357365  ensureColumn('ap_interactions', 'parent_uri', 'TEXT'); // nesting (existing DBs)
Note: See TracChangeset for help on using the changeset viewer.