Changeset bdc3c1e in Klonkt for src/views


Ignore:
Timestamp:
06/16/2026 04:23:01 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
974de34
Parents:
a742e9f
Message:

Always guarantee a primary site (solo/hub/circle) via ensurePrimarySite

An admin created via a script (or an empty sites table) left an instance
without a site → no settings, dashboard crashed. New boot-time helper
ensurePrimarySite() idempotently creates a default site when there is an
admin but no site. Dashboard shows "Create your site" as an extra fallback
if no site exists unexpectedly.

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

File:
1 edited

Legend:

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

    ra742e9f rbdc3c1e  
    2121      <% if (primarySite) { %>
    2222        <a href="/admin/sites/<%= primarySite.slug %>/edit" class="btn">🎨 Uiterlijk</a>
     23      <% } else { %>
     24        <a href="/admin/sites/new" class="btn">🎨 Maak je site aan</a>
    2325      <% } %>
    2426      <% if (tenancy === 'circle') { %>
Note: See TracChangeset for help on using the changeset viewer.