Changeset 475eeda in Klonkt


Ignore:
Timestamp:
06/23/2026 04:57:50 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
5a4c0b0
Parents:
fe6aac9
Message:

feat: premium status badge on the admin dashboard

Below the title, admin now shows a clickable premium badge (3 states):
Premium active (gold), Premium not connected (red), or Premium layer off
(grey). Links to Settings. i18n NL/EN/DE (adash.prem_*).

Co-Authored-By: Claude <noreply@…>

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/services/i18n.js

    rfe6aac9 r475eeda  
    5858    // Beheer-dashboard
    5959    'admin.title': 'Beheer',
     60    'adash.prem_active': 'Premium actief',
     61    'adash.prem_unlinked': 'Premium niet gekoppeld',
     62    'adash.prem_layeroff': 'Premium-laag uit',
    6063    'admin.tagline_solo': 'Solo-modus — jouw site.',
    6164    'admin.tagline_hub': 'Hub-modus — bedrijfssite met gebruikers, elk hun eigen Klonkt Hub.',
     
    10511054    'downloads.btn': '⬇ Download',
    10521055    'admin.title': 'Admin',
     1056    'adash.prem_active': 'Premium active',
     1057    'adash.prem_unlinked': 'Premium not linked',
     1058    'adash.prem_layeroff': 'Premium layer off',
    10531059    'admin.tagline_solo': 'Solo mode — your site.',
    10541060    'admin.tagline_hub': 'Hub mode — a company site with users, each their own Klonkt Hub.',
     
    20382044    'downloads.btn': '⬇ Herunterladen',
    20392045    'admin.title': 'Verwaltung',
     2046    'adash.prem_active': 'Premium aktiv',
     2047    'adash.prem_unlinked': 'Premium nicht verbunden',
     2048    'adash.prem_layeroff': 'Premium-Ebene aus',
    20402049    'admin.tagline_solo': 'Solo-Modus — deine Seite.',
    20412050    'admin.tagline_hub': 'Hub-Modus — eine Firmenseite mit Nutzern, je ein eigener Klonkt Hub.',
  • src/views/pages/admin.ejs

    rfe6aac9 r475eeda  
    11<div class="container admin-page">
    22  <h1><%= t('admin.title') %></h1>
     3  <%
     4    var _premOn = (typeof premiumEnabled !== 'undefined' && premiumEnabled);
     5    var _premActive = _premOn && (typeof isPremium !== 'undefined' && isPremium);
     6    var _premCls = _premActive ? 'on' : (_premOn ? 'off' : 'free');
     7    var _premLbl = _premActive ? ('★ ' + t('adash.prem_active'))
     8                 : (_premOn ? ('⚠ ' + t('adash.prem_unlinked'))
     9                            : t('adash.prem_layeroff'));
     10  %>
     11  <a class="prem-badge <%= _premCls %>" href="/admin/settings" title="<%= t('admin.b_settings') %>"><%= _premLbl %></a>
     12  <style>
     13    .prem-badge{display:inline-flex;align-items:center;gap:.35rem;font-size:.78rem;font-weight:700;letter-spacing:.02em;padding:.3rem .85rem;border-radius:999px;text-decoration:none;border:1px solid transparent;margin:.1rem 0 .3rem}
     14    .prem-badge.on{background:rgba(232,176,75,.16);color:var(--accent);border-color:rgba(232,176,75,.45)}
     15    .prem-badge.off{background:rgba(239,68,68,.12);color:#ef9a9a;border-color:rgba(239,68,68,.35)}
     16    .prem-badge.free{background:var(--paper-2);color:var(--ink-muted);border-color:var(--rule)}
     17    .prem-badge:hover{filter:brightness(1.08)}
     18  </style>
    319  <% if (tenancy === 'hub') { %>
    420    <p class="admin-tagline"><%= t('admin.tagline_hub') %></p>
Note: See TracChangeset for help on using the changeset viewer.