This commit is contained in:
@@ -13,21 +13,39 @@
|
||||
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
|
||||
<vm:SettingsViewModel/>
|
||||
</Design.DataContext>
|
||||
<ListBox ItemsSource="{Binding Modules}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:ModuleItem">
|
||||
<Border Background="DarkBlue" CornerRadius="5" Padding="10" Margin="5">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
<Button Content="Settings"
|
||||
Grid.Column="1"
|
||||
Command="{Binding SettingsCommand}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<DockPanel LastChildFill="True" Margin="10">
|
||||
<StackPanel DockPanel.Dock="Top" Spacing="10" Margin="0,0,0,10">
|
||||
<TextBlock Text="Ollama Settings" FontSize="20" FontWeight="Bold"/>
|
||||
|
||||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto">
|
||||
<TextBlock Text="Base URL:" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding OllamaBaseUrl}" Margin="0,5"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="Model:" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding OllamaModel}" Margin="0,5"/>
|
||||
</Grid>
|
||||
|
||||
<Button Content="Save Settings" Command="{Binding SaveCommand}" HorizontalAlignment="Right"/>
|
||||
|
||||
<Separator Margin="0,10"/>
|
||||
<TextBlock Text="Modules" FontSize="18" FontWeight="SemiBold"/>
|
||||
</StackPanel>
|
||||
|
||||
<ListBox ItemsSource="{Binding Modules}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:ModuleItem">
|
||||
<Border Background="#2a2a2a" CornerRadius="5" Padding="10" Margin="5">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center"/>
|
||||
<Button Content="Settings"
|
||||
Grid.Column="1"
|
||||
Command="{Binding SettingsCommand}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user