Improved assistant footer handling

This commit is contained in:
Thorsten Sommer 2024-08-23 13:43:35 +02:00
parent 82f6a0cbde
commit f6f505b00e
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 7 additions and 5 deletions

View File

@ -33,10 +33,11 @@
<div id="@AFTER_RESULT_DIV_ID" class="mt-3"> <div id="@AFTER_RESULT_DIV_ID" class="mt-3">
</div> </div>
</ChildContent>
<FooterContent>
@if (this.FooterButtons.Count > 0) @if (this.FooterButtons.Count > 0)
{ {
<MudStack Row="@true" Wrap="Wrap.Wrap" Class="mt-3 mr-2"> <MudStack Row="@true" Wrap="Wrap.Wrap" Class="ma-1">
@foreach (var button in this.FooterButtons) @foreach (var button in this.FooterButtons)
{ {
switch (button) switch (button)
@ -54,14 +55,14 @@
@buttonData.Text @buttonData.Text
</MudButton> </MudButton>
break; break;
case SendToButton sendToButton: case SendToButton sendToButton:
<MudMenu StartIcon="@Icons.Material.Filled.Apps" EndIcon="@Icons.Material.Filled.KeyboardArrowDown" Label="Send to ..." Variant="Variant.Filled" Color="Color.Info"> <MudMenu StartIcon="@Icons.Material.Filled.Apps" EndIcon="@Icons.Material.Filled.KeyboardArrowDown" Label="Send to ..." Variant="Variant.Filled" Color="Color.Info">
@foreach (var assistant in Enum.GetValues<SendTo>().OrderBy(n => n.Name().Length)) @foreach (var assistant in Enum.GetValues<SendTo>().OrderBy(n => n.Name().Length))
{ {
if(assistant is SendTo.NONE || sendToButton.Self == assistant) if(assistant is SendTo.NONE || sendToButton.Self == assistant)
continue; continue;
<MudMenuItem OnClick="() => this.SendToAssistant(assistant, sendToButton)"> <MudMenuItem OnClick="() => this.SendToAssistant(assistant, sendToButton)">
@assistant.Name() @assistant.Name()
</MudMenuItem> </MudMenuItem>
@ -78,5 +79,5 @@
</MudButton> </MudButton>
</MudStack> </MudStack>
} }
</ChildContent> </FooterContent>
</InnerScrolling> </InnerScrolling>

View File

@ -2,6 +2,7 @@
- Added an e-mail writing assistant. - Added an e-mail writing assistant.
- Added the possibility to preselect some e-mail writing assistant options. - Added the possibility to preselect some e-mail writing assistant options.
- Fixed the header height of assistant pages. - Fixed the header height of assistant pages.
- Improved assistant footer handling; the footer is now fixed at the bottom of the page.
- Improved the coding assistant by adding a button to delete a context. - Improved the coding assistant by adding a button to delete a context.
- Improved chat page by scrolling to the bottom after loading (configurable; default is on). - Improved chat page by scrolling to the bottom after loading (configurable; default is on).
- Improved all assistants to provide a button to copy their respective result to the clipboard. - Improved all assistants to provide a button to copy their respective result to the clipboard.