Let a plugin add links to the profile menu, and list the setting conflict kind
CI / full-gate (push) Failing after 1m17s
CI / full-gate (push) Failing after 1m17s
This commit is contained in:
@@ -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 || '' %>" />
|
||||
|
||||
Reference in New Issue
Block a user