Changeset 8aa85d0 in Klonkt for src/views/partials


Ignore:
Timestamp:
06/16/2026 06:58:03 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
2c246d4
Parents:
eef691e
Message:

Prutter = premium Hub feature: Hub-only + behind premium gate

Prutter (DMs) is now hard-scoped to Hub mode (route 404s outside hub) and
locked behind the premium gate via the new premiumUnlocked() (= premium off
→ freely available, demos keep working; premium on → Patreon required).
UI entry points (topnav/bottom-tab/Send DM) follow the same condition.
Added to the premium description in Admin → Settings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

Location:
src/views/partials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/bottom-tab.ejs

    reef691e r8aa85d0  
    1313const _canPost     = !!(user && (typeof canMutate === 'undefined' || canMutate)
    1414                        && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site));
    15 const _hasPrutter  = !!(user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub'));
     15const _hasPrutter  = !!(user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked));
    1616const _ownProfile  = user ? ('/users/' + user.username) : null;
    1717
  • src/views/partials/topnav.ejs

    reef691e r8aa85d0  
    1515const _isAdmin     = typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-admin') >= 0;
    1616const _hasSearch   = !site || site.show_search === undefined || site.show_search;
    17 const _hasPrutter  = user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub');
     17const _hasPrutter  = user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked);
    1818const _canPost     = user && (typeof canMutate === 'undefined' || canMutate)
    1919                     && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site);
Note: See TracChangeset for help on using the changeset viewer.