Changeset 07775b7 in Klonkt


Ignore:
Timestamp:
06/14/2026 08:21:55 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
8b014ef
Parents:
6351545
Message:

tenancy: Appearance page back link is mode-aware (solo -> Admin instead of Sites)

In solo there is no Sites list, so the "back" button on site-edit (Appearance)
pointed to a non-existent context. Now: solo -> /admin (Admin), hub -> /admin/sites.
Title shows "Appearance:" instead of "Edit:".

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

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/routes/admin-sites.js

    r6351545 r07775b7  
    2323import { renderPage } from '../middleware/render.js';
    2424import { requireGod } from '../middleware/auth.js';
     25import { getTenancy } from '../services/SettingsService.js';
    2526import ThemeService from '../services/ThemeService.js';
    2627import { listPlatforms, PLATFORMS } from '../services/PlatformIcons.js';
     
    161162    pageTitle: 'New site',
    162163    bodyClass: 'on-admin',
     164    tenancy: getTenancy(),
    163165    isNew: true,
    164166    site: { slug: '', ...siteEditableFields() },
     
    230232    pageTitle: `Edit: ${site.title}`,
    231233    bodyClass: 'on-admin',
     234    tenancy: getTenancy(),
    232235    isNew: false,
    233236    site,
  • src/views/pages/admin-site-edit.ejs

    r6351545 r07775b7  
    11<div class="container admin-site-edit-page">
    2   <p><a href="/admin/sites" class="btn">&larr; Sites</a></p>
    3   <h1><%= isNew ? 'New site' : 'Edit: ' + site.title %></h1>
     2  <% if (typeof tenancy !== 'undefined' && tenancy === 'solo') { %>
     3    <p><a href="/admin" class="btn">&larr; Beheer</a></p>
     4  <% } else { %>
     5    <p><a href="/admin/sites" class="btn">&larr; Sites</a></p>
     6  <% } %>
     7  <h1><%= isNew ? 'New site' : 'Uiterlijk: ' + site.title %></h1>
    48
    59  <% if (typeof success !== 'undefined' && success) { %><div class="audio-flash audio-flash--ok"><%= success %></div><% } %>
Note: See TracChangeset for help on using the changeset viewer.