Changeset dd856db in Klonkt for src/views/pages


Ignore:
Timestamp:
06/24/2026 05:23:33 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
48ca5fc
Parents:
34076d7
Message:

Remove hub mode (step 1/2): keystone coercion + drop hub UI

getTenancy() now only returns 'solo'|'circle' (legacy 'hub' -> 'solo'), so every
tenancy==='hub' branch is unreachable. Removed the Hub tenancy radio + hub-home
branding form from settings, and the dead hub premium gate. Solo + Circle paths
unchanged. Dead hub code (hub.js, artists.js, hub-home view, /user routing, etc.)
gets deleted in step 2.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-settings.ejs

    r34076d7 rdd856db  
    1818          <strong><%= t('aset.solo') %></strong> — <%= t('aset.solo_title') %>
    1919          <small><%= t('aset.solo_desc') %></small>
    20         </span>
    21       </label>
    22       <% var _hubLocked = (typeof premiumUnlocked !== 'undefined') && !premiumUnlocked && tenancy !== 'hub'; %>
    23       <label class="set-opt">
    24         <input type="radio" name="tenancy" value="hub" <%= tenancy === 'hub' ? 'checked' : '' %> <%= _hubLocked ? 'disabled' : '' %>>
    25         <span>
    26           <strong><%= t('aset.hub') %></strong> — <%= t('aset.hub_title') %> <code>/user/</code>.
    27           <% if (_hubLocked) { %><span style="display:inline-block;font-size:.7rem;font-weight:700;color:var(--accent);border:1px solid var(--accent);border-radius:999px;padding:.05rem .45rem;margin-left:.3rem;vertical-align:1px;">🔒 <%= t('aset.premium_badge') %></span><% } %>
    28           <small><%= t('aset.hub_desc') %><% if (_hubLocked) { %> <em><%= t('aset.hub_locked_note') %></em><% } %></small>
    2920        </span>
    3021      </label>
     
    7869  </section>
    7970
    80   <%# Mode-specific config — placed directly below the Mode card so it visually
    81       belongs to the selected mode (Hub under hub, Circle under circle). %>
    82   <% if (tenancy === 'hub') { %>
    83   <section class="set-card set-card--mode" style="margin-top:1rem">
    84     <h2><%= t('aset.hub_home') %></h2>
    85     <p class="set-help">
    86       <%= t('aset.hub_home_help_1') %> (<code>/</code>) <%= t('aset.hub_home_help_2') %> <code>/user/</code>.
    87     </p>
    88     <form method="post" action="/admin/settings" class="set-form" enctype="multipart/form-data">
    89       <label class="set-field">
    90         <span><%= t('aset.name') %></span>
    91         <input type="text" name="hub_title" maxlength="80" value="<%= hubTitle %>" placeholder="<%= t('aset.name_ph') %>">
    92       </label>
    93       <label class="set-field">
    94         <span><%= t('aset.tagline') %></span>
    95         <input type="text" name="hub_tagline" maxlength="120" value="<%= hubTagline %>" placeholder="<%= t('aset.tagline_ph') %>">
    96       </label>
    97       <label class="set-field">
    98         <span><%= t('aset.intro') %></span>
    99         <textarea name="hub_intro" maxlength="400" rows="3" placeholder="<%= t('aset.intro_ph') %>"><%= hubIntro %></textarea>
    100       </label>
    101       <label class="set-field">
    102         <span><%= t('aset.hero_image') %> <small style="font-weight:400;color:var(--ink-muted)">— <%= t('aset.hero_image_hint') %></small></span>
    103         <input type="text" name="hub_hero_image" maxlength="300" value="<%= hubHeroImage %>" placeholder="/media/... of https://...">
    104       </label>
    105       <label class="set-field">
    106         <span><%= t('aset.hero_upload') %> <small style="font-weight:400;color:var(--ink-muted)">— <%= t('aset.hero_upload_hint') %></small></span>
    107         <input type="file" name="hub_hero_file" accept="image/png,image/jpeg,image/webp,image/gif">
    108       </label>
    109       <label class="set-field">
    110         <span><%= t('aset.hero_overlay') %> <small style="font-weight:400;color:var(--ink-muted)">— <%= t('aset.hero_overlay_hint') %></small></span>
    111         <span style="display:flex;align-items:center;gap:0.75rem">
    112           <input type="range" name="hub_hero_overlay" min="0" max="100" step="5" value="<%= hubHeroOverlay %>" style="flex:1"
    113             oninput="this.parentNode.querySelector('.ov-val').textContent=this.value+'%';var o=document.getElementById('hero-ov-preview');if(o)o.style.opacity=this.value/100">
    114           <span class="ov-val" style="min-width:3.5ch;text-align:right;font-variant-numeric:tabular-nums"><%= hubHeroOverlay %>%</span>
    115         </span>
    116       </label>
    117       <% if (hubHeroImage) { %>
    118       <div class="set-field">
    119         <span style="font-weight:400;color:var(--ink-muted);font-size:0.9rem"><%= t('aset.preview_overlay') %></span>
    120         <div style="position:relative;width:100%;aspect-ratio:16/7;margin-top:0.4rem;border-radius:8px;overflow:hidden;border:1px solid var(--rule);background:var(--paper-2)">
    121           <img src="<%= hubHeroImage %>" alt="<%= t('aset.hero_preview_alt') %>" style="display:block;width:100%;height:100%;object-fit:cover">
    122           <div id="hero-ov-preview" style="position:absolute;inset:0;background:#000;opacity:<%= (hubHeroOverlay/100).toFixed(2) %>;pointer-events:none"></div>
    123         </div>
    124       </div>
    125       <% } %>
    126       <button type="submit" class="btn btn-primary"><%= t('aset.save') %></button>
    127     </form>
    128   </section>
    129   <% } %>
    130 
     71  <%# Mode-specific config — Circle settings below the mode card. (Hub removed.) %>
    13172  <% if (tenancy === 'circle') { %>
    13273  <section class="set-card set-card--mode" style="margin-top:1rem">
Note: See TracChangeset for help on using the changeset viewer.