mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Enhance copy confirmation in Ask.razor and update package
Updated the copy confirmation feature in `Ask.razor` by replacing the `isCopied` variable with `showCopyConfirmation`, improving user feedback with a longer display duration for the checkmark icon. Also, updated the `Microsoft.SemanticKernel` package version from `1.52.1` to `1.53.1` for potential bug fixes and improvements.
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
<div class="text-end bg-transparent">
|
<div class="text-end bg-transparent">
|
||||||
<Tooltip Title="@toolTipText" Color="TooltipColor.Dark" Placement="TooltipPlacement.Bottom">
|
<Tooltip Title="@toolTipText" Color="TooltipColor.Dark" Placement="TooltipPlacement.Bottom">
|
||||||
<Button Type="ButtonType.Button" Outline="false" @onclick="@(async () => await CopyToClipboardAsync(message.Text))">
|
<Button Type="ButtonType.Button" Outline="false" @onclick="@(async () => await CopyToClipboardAsync(message.Text))">
|
||||||
@if (isCopied)
|
@if (showCopyConfirmation)
|
||||||
{
|
{
|
||||||
<Icon Name="IconName.Check" Class="text-success" />
|
<Icon Name="IconName.Check" Class="text-success" />
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
private Guid conversationId = Guid.NewGuid();
|
private Guid conversationId = Guid.NewGuid();
|
||||||
private bool isAsking = false;
|
private bool isAsking = false;
|
||||||
|
|
||||||
private bool isCopied = false;
|
private bool showCopyConfirmation = false;
|
||||||
private string toolTipText = "Copy to Clipboard";
|
private string toolTipText = "Copy to Clipboard";
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
@@ -219,14 +219,14 @@
|
|||||||
|
|
||||||
await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", text);
|
await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", text);
|
||||||
|
|
||||||
isCopied = true;
|
showCopyConfirmation = true;
|
||||||
toolTipText = "Copied!";
|
toolTipText = "Copied!";
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
|
|
||||||
await Task.Delay(1500); // Shows the checkmark for 1.5 seconds
|
await Task.Delay(3000); // Shows the checkmark for 3 seconds
|
||||||
|
|
||||||
toolTipText = "Copy to Clipboard";
|
toolTipText = "Copy to Clipboard";
|
||||||
isCopied = false;
|
showCopyConfirmation = false;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.2" />
|
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.2" />
|
||||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.2" />
|
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.2" />
|
||||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.2" />
|
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.2" />
|
||||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.52.1" />
|
<PackageReference Include="Microsoft.SemanticKernel" Version="1.53.1" />
|
||||||
<PackageReference Include="MimeMapping" Version="3.1.0" />
|
<PackageReference Include="MimeMapping" Version="3.1.0" />
|
||||||
<PackageReference Include="MinimalHelpers.FluentValidation" Version="1.1.3" />
|
<PackageReference Include="MinimalHelpers.FluentValidation" Version="1.1.3" />
|
||||||
<PackageReference Include="MinimalHelpers.Routing.Analyzers" Version="1.1.3" />
|
<PackageReference Include="MinimalHelpers.Routing.Analyzers" Version="1.1.3" />
|
||||||
|
|||||||
Reference in New Issue
Block a user