mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
08ebc517c8
- 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.
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
@using System.Runtime.InteropServices
|
|
|
|
@inherits LayoutComponentBase
|
|
|
|
<Toasts class="p-3" AutoHide="true" Placement="ToastsPlacement.TopRight" />
|
|
|
|
<BlazorBootstrapLayout StickyHeader="true">
|
|
<HeaderSection>
|
|
<a href="https://github.com/marcominerva/SqlDatabaseVectorSearch" target="_blank" class="text-decoration-none" title="View on GitHub">
|
|
<Icon Name="IconName.Github" Class="ps-3 ps-lg-2" Size="IconSize.x2" Color="IconColor.Muted"></Icon>
|
|
</a>
|
|
</HeaderSection>
|
|
|
|
<SidebarSection>
|
|
<Sidebar2 Href="/"
|
|
IconName="IconName.Search"
|
|
Title="SQL Vector Search"
|
|
DataProvider="Sidebar2DataProvider"
|
|
WidthUnit="Unit.Px" />
|
|
</SidebarSection>
|
|
|
|
<ContentSection>
|
|
@Body
|
|
</ContentSection>
|
|
|
|
<FooterSection>
|
|
<div class="footer-content">
|
|
<span class="ms-auto">@RuntimeInformation.FrameworkDescription</span>
|
|
</div>
|
|
</FooterSection>
|
|
|
|
</BlazorBootstrapLayout>
|
|
|
|
@code {
|
|
private IEnumerable<NavItem> navItems = default!;
|
|
|
|
private Task<Sidebar2DataProviderResult> Sidebar2DataProvider(Sidebar2DataProviderRequest request)
|
|
{
|
|
if (navItems is null)
|
|
{
|
|
navItems = GetNavItems();
|
|
}
|
|
|
|
var result = request.ApplyTo(navItems);
|
|
return Task.FromResult(result);
|
|
}
|
|
|
|
private IEnumerable<NavItem> GetNavItems()
|
|
{
|
|
navItems = [
|
|
new() { Id = "1", Href = "/", IconName = IconName.HouseDoorFill, Text = "Home", Match = NavLinkMatch.All},
|
|
new() { Id = "2", Href= "/documents", IconName = IconName.FileText, Text = "Documents" },
|
|
new() { Id = "3", Href = "/ask", IconName = IconName.ChatDots, Text = "Ask"}
|
|
];
|
|
|
|
return navItems;
|
|
}
|
|
}
|
|
|
|
<div id="blazor-error-ui" data-nosnippet>
|
|
An unhandled error has occurred.
|
|
<a href="." class="reload">Reload</a>
|
|
<span class="dismiss">🗙</span>
|
|
</div>
|