Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
BeepBeepBopBop committed Nov 23, 2024
1 parent 317a41f commit eeace0f
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 133 deletions.
4 changes: 1 addition & 3 deletions LM-Kit-Maestro/AppConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ internal static class AppConstants

public const double AlertPopupWidth = 400;

public const double TabBarHeight = 64;
public const double TabBarHeight = 48;

public const double PageTopBarHeight = 64;

public const double ChatPageTopBarHeight = TabBarHeight + 64 - 8;

public const double ModelSelectionButtonMaxWidth = 568;

public const double MinimizedHeaderButtonWidth = ChatWindowLayoutMinimumWidth - (16 * 2);
Expand Down
7 changes: 3 additions & 4 deletions LM-Kit-Maestro/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<!--<BoxView Grid.RowSpan="" HeightRequest="1" VerticalOptions="Start"/>-->
<!--<BoxView Grid.RowSpan="3" HeightRequest="1" VerticalOptions="End"/>-->

<Grid BackgroundColor="Transparent">
<Grid BackgroundColor="{StaticResource Primary}"/>
<Border StrokeThickness="0" BackgroundColor="{StaticResource Surface}" Stroke="Transparent" StrokeShape="RoundRectangle 4 4 0 0" ZIndex="1">
<Grid Padding="12, 0">
<HorizontalStackLayout
VerticalOptions="Center"
Expand Down Expand Up @@ -85,7 +84,7 @@
</BindableLayout.ItemTemplate>
</HorizontalStackLayout>
</Grid>
</Grid>
</Border>

<shell:SimpleNavigationHost Grid.Row="1"/>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/UI/ChatConversationsView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private async void OnConversationListItemShowMoreClicked(object? sender, EventAr
ChatConversationActionPopupViewModel chatConversationActionPopupViewModel = new ChatConversationActionPopupViewModel()
{
ConversationX = collectionView.ScrollX + conversationItem.Width,
ConversationY = conversationItem.Y - collectionView.ScrollY + conversationItem.Height + AppConstants.ChatPageTopBarHeight,
ConversationY = conversationItem.Y - collectionView.ScrollY + conversationItem.Height + AppConstants.TabBarHeight + AppConstants.PageTopBarHeight,
ConversationItemHeight = conversationItem.Height,
ConversationListHeight = Height
};
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/UI/Pages/ChatPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace LMKit.Maestro.UI;
public partial class ChatPage : PageBase
{
private const int SidebarAnimationLength = 100;
public static readonly Thickness ChatViewMargin = new Thickness(AppConstants.HeaderHorizontalMargin, AppConstants.ChatPageHeaderHeight, AppConstants.PageTopBarHeight, 0);
public static readonly Thickness ChatViewMargin = new Thickness(AppConstants.HeaderHorizontalMargin, AppConstants.PageTopBarHeight + AppConstants.TabBarHeight, AppConstants.HeaderHorizontalMargin, 0);

private readonly ChatPageViewModel _chatViewModel;

Expand Down
233 changes: 118 additions & 115 deletions LM-Kit-Maestro/UI/Pages/ModelsPage.xaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LM-Kit-Maestro/UI/Pages/ModelsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace LMKit.Maestro.UI;

public partial class ModelsPage : ContentPage
public partial class ModelsPage : PageBase
{
private readonly ModelsPageViewModel _modelsPageViewModel;

Expand Down
15 changes: 9 additions & 6 deletions LM-Kit-Maestro/UI/Pages/PageBase.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
Title="PageBase"
x:Name="pageBase"
>
<Grid RowDefinitions="auto, *">
<Grid RowDefinitions="auto, 1, *">
<Border StrokeThickness="0" BackgroundColor="{StaticResource Surface}" Stroke="Transparent" StrokeShape="RoundRectangle 0 0 0 0" ZIndex="1">
<ContentView
HeightRequest="{x:Static local:AppConstants.PageTopBarHeight}"
Content="{Binding Source={x:Reference pageBase}, Path=Header}"/>
</Border>

<BoxView Grid.Row="1" />
<ContentView
BackgroundColor="Red"
HeightRequest="{x:Static local:AppConstants.PageTopBarHeight}"
Content="{Binding Source={x:Reference pageBase}, Path=Header}"/>
<ContentView
Grid.Row="1"
Grid.Row="2"
Content="{Binding Source={x:Reference pageBase}, Path=Body}"/>
</Grid>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private async void OnDeleteClicked(object sender, EventArgs e)
private void OnPopupContentSizeChanged(object sender, EventArgs e)
{
var popupBottom = popupContentGrid.Height + _chatConversationActionPopupViewModel.ConversationY;
var pageBottom = _chatConversationActionPopupViewModel.ConversationListHeight + AppConstants.ChatPageTopBarHeight;
var pageBottom = _chatConversationActionPopupViewModel.ConversationListHeight + AppConstants.PageTopBarHeight + AppConstants.TabBarHeight;

if (popupBottom > pageBottom)
{
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/UI/TopBarScaffold.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xmlns:vm="clr-namespace:LMKit.Maestro.ViewModels"
x:Class="LMKit.Maestro.UI.TopBarScaffold">
<Grid
HeightRequest="{x:Static local:AppConstants.ChatPageTopBarHeight}"
HeightRequest="128"
BackgroundColor="{StaticResource Surface}">
</Grid>
</ContentView>

0 comments on commit eeace0f

Please sign in to comment.