fix(trips): remaining publish-toggle review findings
- resolveTripChild now asserts the resolved page uses the trip template, so a non-trip direct child of /trips could never be toggled through this endpoint (P3 adversarial). - apiSend gains an optional timeoutMs (AbortController); trip-publish passes 10s so a hung toggle can't leave the switch stuck aria-busy. post-form omits it, keeping media uploads unbounded (P2 reliability). - trips.html.twig reuses trip.html.twig's one-line active-trip slug match instead of a bespoke 3-branch OR (P2 maintainability). - Draft-badge amber is now a --color-draft-accent token shared by the trip and journal badges instead of a twice-hardcoded #E0A458 literal (P3). Rebuilt js/trip-publish.js and js/post/post-form.js (shared api-utils change). PHP lint clean; trip-publish suite 10/10; post suite unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
This commit is contained in:
@@ -289,8 +289,8 @@ body::after {
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
color: #E0A458; /* warm amber — draft/unpublished */
|
||||
border: 1px solid #E0A458;
|
||||
color: var(--color-draft-accent); /* warm amber — draft/unpublished */
|
||||
border: 1px solid var(--color-draft-accent);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 0.1em 0.5em;
|
||||
line-height: 1.5;
|
||||
@@ -1315,9 +1315,9 @@ body::after {
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
color: #E0A458; /* warm amber — matches .journal-draft-badge */
|
||||
color: var(--color-draft-accent); /* warm amber — matches .journal-draft-badge */
|
||||
background: var(--color-canvas);
|
||||
border: 1px solid #E0A458;
|
||||
border: 1px solid var(--color-draft-accent);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 0.15em 0.5em;
|
||||
line-height: 1.5;
|
||||
|
||||
Reference in New Issue
Block a user