mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Refactor navigation and update styles and dependencies
- Rearranged navigation items in `MainLayout.razor`. - Removed `ToastService` injection and modified key handling in `Ask.razor`. - Downgraded `Microsoft.SemanticKernel` version in project file. - Updated CSS styles for sidebar brand icon and navigation item states. - Fixed error message content in `.blazor-error-boundary` class.
This commit is contained in:
@@ -49,8 +49,8 @@
|
||||
{
|
||||
navItems = [
|
||||
new() { Id = "1", Href = "/", IconName = IconName.HouseDoorFill, Text = "Home", Match = NavLinkMatch.All},
|
||||
new() { Id = "2", Href = "/ask", IconName = IconName.ChatDots, Text = "Ask"},
|
||||
new() { Id = "3", Href= "/documents", IconName = IconName.FileText, Text = "Documents" }
|
||||
new() { Id = "2", Href= "/documents", IconName = IconName.FileText, Text = "Documents" },
|
||||
new() { Id = "3", Href = "/ask", IconName = IconName.ChatDots, Text = "Ask"}
|
||||
];
|
||||
|
||||
return navItems;
|
||||
|
||||
@@ -107,9 +107,6 @@
|
||||
private Guid conversationId = Guid.NewGuid();
|
||||
private bool isAsking = false;
|
||||
|
||||
[Inject]
|
||||
protected ToastService ToastService { get; set; } = default!;
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (!firstRender)
|
||||
@@ -122,10 +119,19 @@
|
||||
|
||||
private async Task HandleKeyDown(KeyboardEventArgs e)
|
||||
{
|
||||
if (e.Key == "Enter" && !isAsking && !string.IsNullOrWhiteSpace(question))
|
||||
if (isAsking)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Key == "Enter" && !string.IsNullOrWhiteSpace(question))
|
||||
{
|
||||
await AskQuestion();
|
||||
}
|
||||
else if (e.Key == "ArrowUp" && messages.Count >= 2)
|
||||
{
|
||||
question = messages[^2].Text;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task AskQuestion()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.38.0" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.37.0" />
|
||||
<PackageReference Include="MimeMapping" Version="3.1.0" />
|
||||
<PackageReference Include="MinimalHelpers.OpenApi" Version="2.1.4" />
|
||||
<PackageReference Include="PdfPig" Version="0.1.9" />
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
--bb-sidebar2-top-row-background-color: rgba(0,0,0,0.08);
|
||||
--bb-sidebar2-top-row-border-color: rgb(194,192,192);
|
||||
--bb-sidebar2-title-text-color: rgb(0,0,0);
|
||||
--bb-sidebar2-brand-icon-color: #6f42c1;
|
||||
--bb-sidebar2-brand-icon-color: rgb(0,0,0);
|
||||
--bb-sidebar2-brand-image-width: 24px;
|
||||
--bb-sidebar2-brand-image-height: 24px;
|
||||
--bb-sidebar2-title-badge-text-color: rgb(255,255,255);
|
||||
@@ -21,19 +21,15 @@
|
||||
--bb-sidebar2-nav-item-group-background-color: rgba(var(--bb-sidebar-nav-item-text-active-color-rgb),0.08);
|
||||
}
|
||||
|
||||
.bb-sidebar2 nav .nav-item a {
|
||||
color: var(--bb-sidebar2-nav-item-text-color) !important;
|
||||
.bb-sidebar2 nav .nav-item a:hover {
|
||||
background-color: rgba(0,0,0,0.08) !important;
|
||||
color: rgba(0,0,0,0.9) !important;
|
||||
}
|
||||
|
||||
.bb-sidebar2 nav .nav-item a:hover {
|
||||
background-color: var(--bb-sidebar2-nav-item-background-hover-color) !important;
|
||||
color: var(--bb-sidebar2-nav-item-text-hover-color) !important;
|
||||
}
|
||||
|
||||
.bb-sidebar2 nav .nav-item a.active {
|
||||
background-color: var(--bb-sidebar2-nav-item-background-hover-color) !important;
|
||||
color: var(--bb-sidebar2-nav-item-text-active-color) !important;
|
||||
}
|
||||
.bb-sidebar2 nav .nav-item a.active {
|
||||
background-color: rgb(194,192,192) !important;
|
||||
color: rgba(0,0,0,0.9) !important;
|
||||
}
|
||||
|
||||
h1:focus {
|
||||
outline: none;
|
||||
|
||||
Reference in New Issue
Block a user