Improved formatting

This commit is contained in:
Thorsten Sommer 2025-08-09 21:22:43 +02:00
parent c9dd01a1ec
commit 0e9b9770b3
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 3 additions and 10 deletions

View File

@ -1,6 +1,3 @@
@using AIStudio.Chat
<MudTooltip Text="@this.ToolTipMessage" Placement="Placement.Bottom">
<MudIconButton Icon="@Icons.Material.Filled.ContentCopy"
Size="Size.Small"
OnClick="@(() => HandleCopyClick())"/>
<MudTooltip Text="@this.TooltipMessage" Placement="Placement.Bottom">
<MudIconButton Icon="@Icons.Material.Filled.ContentCopy" Size="Size.Small" OnClick="@(() => this.HandleCopyClick())"/>
</MudTooltip>

View File

@ -32,7 +32,7 @@ public partial class MudCopyClipboardButton : ComponentBase
/// The tooltip that should be shown to the user.
/// </summary>
[Parameter]
public string ToolTipMessage { get; set; } = TB("Copies the content to the clipboard");
public string TooltipMessage { get; set; } = TB("Copies the content to the clipboard");
[Inject]
private ISnackbar Snackbar { get; init; } = null!;
@ -43,13 +43,9 @@ public partial class MudCopyClipboardButton : ComponentBase
private async Task HandleCopyClick()
{
if (this.Type == ContentType.NONE)
{
await this.CopyToClipboard(this.StringContent);
}
else
{
await this.CopyToClipboard(this.Content!);
}
}
/// <summary>