temp/Views/ConfigWindow.axaml

26 lines
1.9 KiB
Plaintext
Raw Normal View History

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:app.ViewModels"
x:DataType="vm:MainWindowViewModel"
x:Class="app.Views.ConfigWindow">
2025-01-31 19:20:33 -08:00
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="Configure your application!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Grid ShowGridLines="False" Margin="5" ColumnDefinitions="Auto, Auto" RowDefinitions="Auto, Auto, Auto, Auto">
<Label Grid.Row="0" Grid.Column="0">API Key:</Label>
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ApiKey, Mode=TwoWay}"/>
<Label Grid.Row="1" Grid.Column="0">Speak Model</Label>
<ComboBox Grid.Row="1" Grid.Column="1" SelectedItem="{Binding SpeakModel, Mode=TwoWay}" ItemsSource="{Binding SpeakModels}">
</ComboBox>
<Label Grid.Row="2" Grid.Column="0">Listen Model:</Label>
<ComboBox Grid.Row="2" Grid.Column="1" SelectedIndex="0" SelectedItem="{Binding ListenModel, Mode=TwoWay}" ItemsSource="{Binding ListenModels}">
</ComboBox>
<Label Grid.Row="3" Grid.Column="0">Think Model:</Label>
<ComboBox Grid.Row="3" Grid.Column="1" SelectedIndex="0" SelectedItem="{Binding ThinkModel, Mode=TwoWay}" ItemsSource="{Binding ThinkModels}">
</ComboBox>
</Grid>
2025-01-31 19:20:33 -08:00
<Grid ShowGridLines="False" Margin="5" ColumnDefinitions="Auto, Auto" RowDefinitions="Auto">
<Button Grid.Row="0" Grid.Column="0" CornerRadius="10" Background="Blue" Command="{Binding SaveConfig}">Save</Button>
<Button Grid.Row="0" Grid.Column="1" CornerRadius="10" Foreground="Black" Background="Yellow" Command="{Binding CancelConfig}" IsVisible="{Binding ApiKey}">Cancel</Button>
</Grid>
</StackPanel>
</UserControl>