Improved assistant footer handling (#91)

This commit is contained in:
Thorsten Sommer 2024-08-23 13:44:27 +02:00 committed by GitHub
parent a6c5b3de23
commit 537a608e7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 57 additions and 50 deletions

View File

@ -4,7 +4,7 @@
@(this.Title) @(this.Title)
</MudText> </MudText>
<InnerScrolling HeaderHeight="12.3em"> <InnerScrolling HeaderHeight="6em">
<ChildContent> <ChildContent>
<MudForm @ref="@(this.form)" @bind-IsValid="@(this.inputIsValid)" @bind-Errors="@(this.inputIssues)" Class="pr-2"> <MudForm @ref="@(this.form)" @bind-IsValid="@(this.inputIsValid)" @bind-Errors="@(this.inputIssues)" Class="pr-2">
<MudText Typo="Typo.body1" Align="Align.Justify" Class="mb-6"> <MudText Typo="Typo.body1" Align="Align.Justify" Class="mb-6">
@ -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)
@ -78,5 +79,5 @@
</MudButton> </MudButton>
</MudStack> </MudStack>
} }
</ChildContent> </FooterContent>
</InnerScrolling> </InnerScrolling>

View File

@ -9,5 +9,10 @@
</div> </div>
</div> </div>
@if (this.FooterContent is not null)
{
<MudPaper Class="pa-3 border-solid border rounded-lg">
@this.FooterContent @this.FooterContent
</MudPaper>
}
</div> </div>

View File

@ -27,11 +27,10 @@
} }
</ChildContent> </ChildContent>
<FooterContent> <FooterContent>
<MudPaper Style="flex: 0 0 auto;"> <MudElement Style="flex: 0 0 auto;">
<MudTextField T="string" @ref="@this.inputField" @bind-Text="@this.userInput" Variant="Variant.Outlined" AutoGrow="@true" Lines="3" MaxLines="12" Label="@this.InputLabel" Placeholder="@this.ProviderPlaceholder" Adornment="Adornment.End" AdornmentIcon="@Icons.Material.Filled.Send" OnAdornmentClick="() => this.SendMessage()" ReadOnly="!this.IsProviderSelected || this.isStreaming" Immediate="@true" OnKeyUp="this.InputKeyEvent" UserAttributes="@USER_INPUT_ATTRIBUTES"/> <MudTextField T="string" @ref="@this.inputField" @bind-Text="@this.userInput" Variant="Variant.Outlined" AutoGrow="@true" Lines="3" MaxLines="12" Label="@this.InputLabel" Placeholder="@this.ProviderPlaceholder" Adornment="Adornment.End" AdornmentIcon="@Icons.Material.Filled.Send" OnAdornmentClick="() => this.SendMessage()" ReadOnly="!this.IsProviderSelected || this.isStreaming" Immediate="@true" OnKeyUp="this.InputKeyEvent" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
</MudPaper> </MudElement>
<MudPaper Class="mt-1" Outlined="@true"> <MudToolBar WrapContent="true" Gutters="@false" Class="border border-solid rounded" Style="border-color: lightgrey;">
<MudToolBar WrapContent="true">
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES) @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
{ {
<MudTooltip Text="Your workspaces" Placement="@TOOLBAR_TOOLTIP_PLACEMENT"> <MudTooltip Text="Your workspaces" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
@ -71,7 +70,6 @@
</MudTooltip> </MudTooltip>
} }
</MudToolBar> </MudToolBar>
</MudPaper>
</FooterContent> </FooterContent>
</InnerScrolling> </InnerScrolling>

View File

@ -1,6 +1,8 @@
# v0.8.12, build 174 # v0.8.12, build 174
- 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.
- 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.
@ -9,3 +11,4 @@
- Improved the chat options readability by separating the preselection of values. - Improved the chat options readability by separating the preselection of values.
- Improved some default settings. Default key for sending input is now `Enter`. The default update check is now set to hourly. The navigation menu behavior is now set to use tooltips. - Improved some default settings. Default key for sending input is now `Enter`. The default update check is now set to hourly. The navigation menu behavior is now set to use tooltips.
- Refactored the "send to" implementation of assistants. - Refactored the "send to" implementation of assistants.
- Refactored & unified footer border style handling.