feat: in-app help, notifications panel and global search (#32)
F1 and "?" now open the wiki page of the screen inside the application (/aiuto, mockup 011) from a copy of the wiki shipped next to the program, so help works offline and always matches the installed version. Markdown is converted in-house and fully encoded; images of the repository are served from the copy. KHAEMHAT_HELP_URL sets the online wiki behind "Apri nel wiki"; "Segnala un problema" opens a new issue of that repo. A test checks that every page and menu entry has an existing wiki page. The bell opens a notifications panel (mockup 010) with all/unread filters and mark read. Broadcast notifications are now read per user through sys_notification_reads / notification_reads instead of one shared read_at. The global search asks ISearchProvider implementations through GlobalSearchService after a short pause; the first provider finds help pages and sections, # and @ say which modules will fill them. Escape also closes a side panel when the focus fell out of it. Decisions in ADR 0023. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
acb7e598d1
commit
f415dc37a8
39 files changed
+1976
-107
No files matched your search
@@ -62,4 +62,24 @@ public static class HelpLinks
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns>The address.</returns>
|
||||
public static string UrlFor(string baseUrl, string path) => baseUrl + PageFor(path);
|
||||
|
||||
/// <summary>The help page of a path inside the application (F1, mockup 011).</summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns>The relative address, such as <c>aiuto/Anagrafiche</c>.</returns>
|
||||
public static string LocalFor(string path) => Khaemhat.Web.Help.WikiLibrary.Href(PageFor(path));
|
||||
|
||||
/// <summary>The online wiki: <c>KHAEMHAT_HELP_URL</c> or the project wiki, always ending with a slash.</summary>
|
||||
/// <param name="configured">The configured address, if any.</param>
|
||||
/// <returns>The address.</returns>
|
||||
public static string BaseUrl(string? configured) =>
|
||||
string.IsNullOrWhiteSpace(configured) ? DefaultBaseUrl : configured.EndsWith('/') ? configured : configured + "/";
|
||||
|
||||
/// <summary>Where to report a problem: the issues of the repository whose wiki it is (Gitea and GitHub alike).</summary>
|
||||
/// <param name="baseUrl">The wiki address.</param>
|
||||
/// <returns>The address of a new issue, or <see langword="null"/> when the wiki is not a repository wiki.</returns>
|
||||
public static string? IssuesUrl(string baseUrl)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(baseUrl);
|
||||
return baseUrl.EndsWith("/wiki/", StringComparison.OrdinalIgnoreCase) ? baseUrl[..^"wiki/".Length] + "issues/new" : null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user