Refactor the chat template button to show icon-only by default

This commit is contained in:
Thorsten Sommer 2025-05-24 18:13:38 +02:00
parent 7b202b6dcd
commit 4a762b3fc0
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -4,9 +4,16 @@
<MudTooltip Placement="Placement.Top" Text="@T("Start a new chat with a chat template")"> <MudTooltip Placement="Placement.Top" Text="@T("Start a new chat with a chat template")">
<MudMenu AnchorOrigin="Origin.TopLeft" TransformOrigin="@Origin.BottomLeft" Class="@this.MarginClass"> <MudMenu AnchorOrigin="Origin.TopLeft" TransformOrigin="@Origin.BottomLeft" Class="@this.MarginClass">
<ActivatorContent> <ActivatorContent>
<MudButton IconSize="Size.Large" StartIcon="@Icons.Material.Filled.RateReview"> @if (this.CurrentChatTemplate != ChatTemplate.NO_CHAT_TEMPLATE)
@(this.CurrentChatTemplate != ChatTemplate.NO_CHATTEMPLATE ? this.CurrentChatTemplate.Name : "") {
<MudButton IconSize="Size.Large" StartIcon="@Icons.Material.Filled.RateReview" IconColor="Color.Default">
@this.CurrentChatTemplate.Name
</MudButton> </MudButton>
}
else
{
<MudIconButton Icon="@Icons.Material.Filled.RateReview" />
}
</ActivatorContent> </ActivatorContent>
<ChildContent> <ChildContent>
@foreach (var chatTemplate in this.SettingsManager.ConfigurationData.ChatTemplates.GetAllChatTemplates()) @foreach (var chatTemplate in this.SettingsManager.ConfigurationData.ChatTemplates.GetAllChatTemplates())