The pages built so far now live inside the shell of the mockups instead of the M0 placeholder, every interface text comes from Resources/it-IT, and each user keeps their own look and start page. - Shell: top bar, collapsible side menu with fly-out sub-menus, status bar and tabs that keep each page alive (page type and route values per tab, so a tab never shows another page); at most 12 tabs, least-used clean tab evicted. - One shortcut table with Alt variants for the combinations browsers keep (Ctrl+W, Ctrl+Tab, Ctrl+N); command palette for pages and commands. - ITexts over embedded JSON; tests forbid literal texts in .razor components and check that every key used exists. - User settings in sys_user_settings / user_settings; theme written on the server; profile page with live preview, start page, sessions and shortcuts. - Home, coming-soon pages for later milestones, localized sign-in and error pages; ADR 0020; wiki, CHANGELOG, STATUS and data model updated. Refs #25 #26 #31 #33 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.8 KiB
Plaintext
38 lines
1.8 KiB
Plaintext
@inject ShellSession Session
|
|
|
|
@* The user box of the top bar (mockup 004): initials, name, level; the menu opens the profile and signs out. *@
|
|
<div class="pop">
|
|
<button type="button" class="userbox" aria-haspopup="menu" aria-expanded="@Open" @onclick="() => OpenChanged.InvokeAsync(!Open)">
|
|
<span class="avatar" aria-hidden="true">@Session.Initials</span>
|
|
<span class="who">
|
|
<span class="nm">@Session.DisplayName</span><br />
|
|
<span class="rl">@T[Session.LevelKey]</span>
|
|
</span>
|
|
<KhIcon Name="chevron-down" Class="sm" />
|
|
</button>
|
|
@if (Open)
|
|
{
|
|
<div class="popmenu" role="menu">
|
|
<div class="fh">@Session.DisplayName</div>
|
|
<a class="mi" role="menuitem" href="profilo" @onclick="() => OpenChanged.InvokeAsync(false)"><KhIcon Name="user" /><span class="grow">@T["Shell.User.Profile"]</span></a>
|
|
<a class="mi" role="menuitem" href="profilo?scheda=aspetto" @onclick="() => OpenChanged.InvokeAsync(false)"><KhIcon Name="palette" /><span class="grow">@T["Shell.User.Appearance"]</span></a>
|
|
<a class="mi" role="menuitem" href="profilo?scheda=sessioni" @onclick="() => OpenChanged.InvokeAsync(false)"><KhIcon Name="monitor" /><span class="grow">@T["Shell.User.Sessions"]</span></a>
|
|
<hr />
|
|
<form method="post" action="logout">
|
|
<AntiforgeryToken />
|
|
<button type="submit" role="menuitem" class="mi"><KhIcon Name="logout" /><span class="grow">@T["Shell.User.SignOut"]</span></button>
|
|
</form>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@code {
|
|
/// <summary>Whether the menu is open.</summary>
|
|
[Parameter]
|
|
public bool Open { get; set; }
|
|
|
|
/// <summary>Opens or closes the menu.</summary>
|
|
[Parameter]
|
|
public EventCallback<bool> OpenChanged { get; set; }
|
|
}
|