From d6615ea0e4d56ea4f190abfda0c5e7551e52ff25 Mon Sep 17 00:00:00 2001 From: BeepBeepBopBop <116374330+BeepBeepBopBop@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:16:29 +0100 Subject: [PATCH] fix razor routes, inherit pagebase --- LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml | 47 +++++++------------ .../UI/Pages/AssistantsPage.xaml.cs | 2 +- LM-Kit-Maestro/UI/Pages/ChatPage.xaml | 9 ++-- LM-Kit-Maestro/UI/Razor/Components/Chat.razor | 4 +- .../UI/Razor/{ => Components}/Routes.razor | 0 5 files changed, 25 insertions(+), 37 deletions(-) rename LM-Kit-Maestro/UI/Razor/{ => Components}/Routes.razor (100%) diff --git a/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml b/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml index 301d7a2..acb386e 100644 --- a/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml +++ b/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml @@ -1,5 +1,5 @@ - - - - - - - - + + + + - - - - - + + - + - - \ No newline at end of file + + + \ No newline at end of file diff --git a/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml.cs b/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml.cs index a1d7ed9..c48a7d9 100644 --- a/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml.cs +++ b/LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml.cs @@ -2,7 +2,7 @@ namespace LMKit.Maestro.UI; -public partial class AssistantsPage : ContentPage +public partial class AssistantsPage : PageBase { private readonly AssistantsPageViewModel _assistantsPageViewModel; diff --git a/LM-Kit-Maestro/UI/Pages/ChatPage.xaml b/LM-Kit-Maestro/UI/Pages/ChatPage.xaml index 92bd954..4f794de 100644 --- a/LM-Kit-Maestro/UI/Pages/ChatPage.xaml +++ b/LM-Kit-Maestro/UI/Pages/ChatPage.xaml @@ -129,14 +129,15 @@ x:Name="chatsSidebar" WidthRequest="{Binding Source={x:Reference chatPage}, Path=ChatsSidebarWidth, x:DataType=ui:ChatPage}" Grid.Row="1"/> - + + HostPage="wwwroot/index.html" + StartPath="/chat"> - + @@ -148,4 +149,4 @@ BindingContext="{Binding SettingsViewModel}"/> - + \ No newline at end of file diff --git a/LM-Kit-Maestro/UI/Razor/Components/Chat.razor b/LM-Kit-Maestro/UI/Razor/Components/Chat.razor index 1eef6d3..68ed672 100644 --- a/LM-Kit-Maestro/UI/Razor/Components/Chat.razor +++ b/LM-Kit-Maestro/UI/Razor/Components/Chat.razor @@ -1,4 +1,6 @@ -@inject LMKitService LMKitService + @page "/chat" + +@inject LMKitService LMKitService @inject HttpClient Http @inject IJSRuntime JS @inject IScrollHandler ScrollHandler diff --git a/LM-Kit-Maestro/UI/Razor/Routes.razor b/LM-Kit-Maestro/UI/Razor/Components/Routes.razor similarity index 100% rename from LM-Kit-Maestro/UI/Razor/Routes.razor rename to LM-Kit-Maestro/UI/Razor/Components/Routes.razor