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
@@ -0,0 +1,65 @@
|
||||
namespace Khaemhat.Web.Shell;
|
||||
|
||||
/// <summary>
|
||||
/// The wiki page of each part of the application (SPEC §17: F1 and "?" open the page of the screen). The address is
|
||||
/// the deepest prefix that matches; anything unknown opens the wiki home.
|
||||
/// </summary>
|
||||
public static class HelpLinks
|
||||
{
|
||||
/// <summary>The wiki of the project, used when no other address is configured.</summary>
|
||||
public const string DefaultBaseUrl = "https://gitea.encke-hake.ts.net/BalboSoft/Khaemhat/wiki/";
|
||||
|
||||
private static readonly (string Prefix, string Page)[] Pages =
|
||||
[
|
||||
("/anagrafiche/articoli", "Articoli-e-listini"),
|
||||
("/anagrafiche/listini", "Articoli-e-listini"),
|
||||
("/anagrafiche", "Anagrafiche"),
|
||||
("/crm", "CRM"),
|
||||
("/vendite", "Vendite"),
|
||||
("/acquisti", "Acquisti"),
|
||||
("/magazzino", "Magazzino"),
|
||||
("/contabilita/liquidazione-iva", "IVA"),
|
||||
("/contabilita/registri-iva", "IVA"),
|
||||
("/contabilita", "Contabilita"),
|
||||
("/scadenzario", "Scadenzario"),
|
||||
("/fatturazione-elettronica", "Fatturazione-elettronica"),
|
||||
("/cespiti", "Cespiti"),
|
||||
("/servizi", "Servizi"),
|
||||
("/canali", "Canali-e-commerce"),
|
||||
("/report", "Report"),
|
||||
("/tabelle", "Tabelle-azienda"),
|
||||
("/automazioni", "Automazioni"),
|
||||
("/amministrazione/licenze", "Licenze-e-moduli"),
|
||||
("/amministrazione/log", "Log"),
|
||||
("/amministrazione/attivita", "Attivita-programmate"),
|
||||
("/amministrazione/stato", "Stato-sistema"),
|
||||
("/amministrazione/utenti", "Utenti-e-permessi"),
|
||||
("/amministrazione/ruoli", "Utenti-e-permessi"),
|
||||
("/amministrazione", "Istanza-e-database"),
|
||||
("/profilo", "Preferenze-utente"),
|
||||
("/", "Dashboard"),
|
||||
];
|
||||
|
||||
/// <summary>The wiki page of a path.</summary>
|
||||
/// <param name="path">The path, without query.</param>
|
||||
/// <returns>The page name, for example <c>Anagrafiche</c>.</returns>
|
||||
public static string PageFor(string path)
|
||||
{
|
||||
var p = TabService.PathOf(path);
|
||||
foreach (var (prefix, page) in Pages)
|
||||
{
|
||||
if (prefix == "/" ? p == "/" : p.Equals(prefix, StringComparison.OrdinalIgnoreCase) || p.StartsWith(prefix + "/", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return page;
|
||||
}
|
||||
}
|
||||
|
||||
return "Home";
|
||||
}
|
||||
|
||||
/// <summary>The address of the help of a path.</summary>
|
||||
/// <param name="baseUrl">The wiki address, ending with a slash.</param>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns>The address.</returns>
|
||||
public static string UrlFor(string baseUrl, string path) => baseUrl + PageFor(path);
|
||||
}
|
||||
Reference in new issue
Block a user