mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-06 03:29:40 +00:00
Fixed the source headings being oversized and their tooltip too long
This commit is contained in:
5 files changed
+66
-11
No files matched your search
@@ -5,7 +5,9 @@
|
||||
<div class="mud-markdown-body">
|
||||
@foreach (var group in this.groups)
|
||||
{
|
||||
<MudText Typo="Typo.h2">
|
||||
@* A level-two heading was shown as h5 while this list was Markdown, because that is what
|
||||
Markdown.DefaultConfig overrides it to. The heading keeps that size here. *@
|
||||
<MudText Typo="Typo.h5">
|
||||
@group.Heading
|
||||
</MudText>
|
||||
<ul>
|
||||
@@ -15,7 +17,7 @@
|
||||
@($"[{entry.Number}] ")
|
||||
@if (entry.Document is { } document)
|
||||
{
|
||||
<MudTooltip Text="@this.GetDocumentTooltip(document)" Placement="Placement.Top">
|
||||
<MudTooltip Text="@T("Opens this document in the program your system uses for it")" Placement="Placement.Top">
|
||||
<MudLink Typo="Typo.body1" OnClick="@(() => this.OpenDocument(document))">
|
||||
@entry.Title
|
||||
</MudLink>
|
||||
|
||||
@@ -65,10 +65,6 @@ public partial class SourcesList : MSGComponentBase
|
||||
}
|
||||
}
|
||||
|
||||
private string GetDocumentTooltip(SourceDocumentLocation document) => document.PageNumber is > 0
|
||||
? string.Format(T("Opens {0} on page {1}"), document.Path, document.PageNumber)
|
||||
: string.Format(T("Opens {0}"), document.Path);
|
||||
|
||||
/// <summary>
|
||||
/// Opens a document in the program the system uses for it.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user