Let a plugin add links to the profile menu, and list the setting conflict kind
CI / full-gate (push) Failing after 1m17s

This commit is contained in:
2026-11-08 19:17:57 +01:00
parent 6ba21b8409
commit 777c0bd86d
17 changed files with 141 additions and 34 deletions
+5 -2
View File
@@ -59,8 +59,8 @@
<div class="footer-actions">
<% if (user.email) { %>
<%# Signed in: the same popover block as the menu partial, hand-rolled because this one's
trigger composes escaped user values and its item is a CSRF POST form, neither of which
the partial's Item shapes cover (AGENTS.md). Keep the two in step. %>
trigger composes escaped user values and its Sign-out item is a CSRF POST form, neither of
which the partial's Item shapes cover (AGENTS.md). Keep the two in step. %>
<div class="menu" style="flex:1 1 auto">
<button class="profile" type="button" popovertarget="profile-menu">
<span class="avatar" aria-hidden="true"><%= user.initials %></span>
@@ -71,6 +71,9 @@
</button>
<div id="profile-menu" class="menu-pop left up" popover style="min-width:220px">
<div class="menu-head"><%= t("shell.signedInAs", { name: user.name }) %></div>
<% (user.menu || []).forEach((link) => { %>
<a class="menu-item" href="<%= link.href %>"><% if (link.icon) { %><svg class="ico"><use href="#<%= link.icon %>" /></svg><% } %><%= link.label %></a>
<% }) %>
<%# Sign out is a state change → a POST form (not a GET link), CSRF-guarded by app.ts %>
<form class="menu-item-form" method="post" action="<%= localeHref("/logout") %>">
<input type="hidden" name="_csrf" value="<%= locals.csrfToken || '' %>" />