feat: application shell, localized texts and user preferences (M3, part 1)
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>
This commit is contained in:
1 parent
1c30054e3d
commit
cf6f849cc1
72 files changed
+5785
-259
No files matched your search
@@ -12,10 +12,10 @@
|
||||
@inject NavigationManager Navigation
|
||||
@inject TimeProvider Clock
|
||||
|
||||
<PageTitle>Accedi · Khaemhat</PageTitle>
|
||||
<PageTitle>@T["Auth.Login.Title"] · @T["Common.ProductName"]</PageTitle>
|
||||
|
||||
<h1>Accedi</h1>
|
||||
<p class="sub">Scegli l'azienda e inserisci le credenziali.</p>
|
||||
<h1>@T["Auth.Login.Title"]</h1>
|
||||
<p class="sub">@T["Auth.Login.Subtitle"]</p>
|
||||
|
||||
@foreach (var message in Errors)
|
||||
{
|
||||
@@ -23,24 +23,24 @@
|
||||
}
|
||||
|
||||
<EditForm Model="Input" method="post" FormName="login" OnSubmit="SubmitAsync" class="kh-form">
|
||||
<label for="company">Azienda</label>
|
||||
<label for="company">@T["Auth.Login.Company"]</label>
|
||||
<InputSelect id="company" @bind-Value="Input.CompanyCode">
|
||||
<option value="">Nessuna (account di istanza)</option>
|
||||
<option value="">@T["Auth.Login.NoCompany"]</option>
|
||||
@foreach (var company in AvailableCompanies)
|
||||
{
|
||||
<option value="@company.Code">@company.Name (@company.Code)</option>
|
||||
<option value="@company.Code">@T.Format("Auth.Login.CompanyOption", company.Name, company.Code)</option>
|
||||
}
|
||||
</InputSelect>
|
||||
|
||||
<label for="user">Nome utente</label>
|
||||
<label for="user">@T["Auth.Login.UserName"]</label>
|
||||
<InputText id="user" @bind-Value="Input.UserName" autocomplete="username" autofocus required />
|
||||
|
||||
<label for="password">Password</label>
|
||||
<label for="password">@T["Auth.Login.Password"]</label>
|
||||
<InputText id="password" type="password" @bind-Value="Input.Password" autocomplete="current-password" required />
|
||||
|
||||
<label class="check"><InputCheckbox @bind-Value="Input.Remember" /> Ricordami su questo dispositivo</label>
|
||||
<label class="check"><InputCheckbox @bind-Value="Input.Remember" /> @T["Auth.Login.Remember"]</label>
|
||||
|
||||
<button type="submit" class="kh-btn primary">Accedi</button>
|
||||
<button type="submit" class="kh-btn primary">@T["Auth.Login.Submit"]</button>
|
||||
</EditForm>
|
||||
|
||||
@if (TrialNotice is not null)
|
||||
@@ -77,11 +77,11 @@
|
||||
var license = Licenses.Current;
|
||||
if (license.Kind == LicenseKind.Trial)
|
||||
{
|
||||
TrialNotice = $"Licenza in modalità prova: restano {license.DaysLeft(Clock.GetUtcNow().UtcDateTime)} giorni, con i moduli Base e Contabilità e {license.MaxConcurrentUsers} utenti collegati.";
|
||||
TrialNotice = T.Format("Auth.Login.Trial", license.DaysLeft(Clock.GetUtcNow().UtcDateTime), license.MaxConcurrentUsers);
|
||||
}
|
||||
else if (license.Status != LicenseStatus.Valid)
|
||||
{
|
||||
TrialNotice = "La licenza è scaduta: rivolgiti all'amministratore.";
|
||||
TrialNotice = T["Auth.Login.Expired"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
Input.Password = null;
|
||||
if (!result.Succeeded || result.Cookie is null)
|
||||
{
|
||||
Errors = LoginFlow.Messages(result.Error);
|
||||
Errors = LoginFlow.Messages(T, Policy, result.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user