Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: header profile menu — initials avatar, authelia settings + logout (#3570)

Adds an "/api/whoami" same-origin nginx proxy to authelia's own
GET /api/user/info (session-cookie authenticated, no swarm-controller
code needed) and a new UserMenu header component: a generated initials
avatar (first letter of display name, coloured from the same seven
base16 chromatic slots the nav accent already cycles through) opening a
popover with the signed-in name, a link to authelia settings, and log
out — both reusing the existing "Authelia" entry from GET /api/links
rather than a second source of the domain.

Per mara's call on the open avatar-mechanism question: initials now,
a real uploaded photo (authelia's settings UI implies pics are
settable) is an explicit future item, not blocking this.
This commit is contained in:
iris 2026-08-24 00:00:13 +02:00
commit dabd0fc823
4 changed files with 249 additions and 0 deletions

View file

@ -31,6 +31,7 @@ import type { ComponentChildren } from 'preact';
import { Link, useLocation } from 'wouter-preact';
import { LinksMenu } from './LinksMenu.js';
import { SettingsMenu } from './SettingsMenu.js';
import { UserMenu } from './UserMenu.js';
import { useApplyThemeOverride } from '../lib/theme-apply.js';
import { useApplyMotionOverride } from '../lib/motion-apply.js';
import './Shell.css';
@ -284,6 +285,7 @@ export function Shell({ children }: { children: ComponentChildren }) {
<div class="shell-header-actions">
<SettingsMenu />
<LinksMenu />
<UserMenu />
</div>
</header>
{/* Keyed by route so it remounts (and replays its entrance