FreeTubeSyncer/FreeTubeSyncer/MainWindow.axaml
Mario Steele ad155026d1 Updated MainWindow
Switched from IsPressed to IsChecked, which works as intended.
2025-07-31 07:22:13 -05:00

51 lines
2.8 KiB
XML

<suki:SukiWindow xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
xmlns:vm="clr-namespace:FreeTubeSyncer.Models"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="345"
Width="400" Height="345"
x:Class="FreeTubeSyncer.MainWindow"
x:DataType="vm:AppSettings"
BackgroundStyle="GradientDarker"
CanResize="False"
CanMaximize="False"
Title="FreeTubeSyncer">
<StackPanel Orientation="Vertical" Margin="10" Spacing="5">
<Label Content="Settings" FontSize="24"/>
<Separator/>
<Grid
ColumnDefinitions="182,*"
RowDefinitions="*,*">
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Text="REST API Backend Server: " FontWeight="Bold"/>
<TextBox Grid.Row="0" Grid.Column="1" Watermark="http://localhost:8080" Text="{Binding RestBaseUrl, Mode=TwoWay}"/>
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Text="Refresh Interval: " FontWeight="Bold"/>
<NumericUpDown Grid.Row="1" Grid.Column="1" Watermark="30" suki:NumericUpDownExtensions.Unit="seconds" FormatString="N0" Value="{Binding CheckInterval, Mode=TwoWay}"/>
</Grid>
<Grid
ColumnDefinitions="170,*"
RowDefinitions="*,*,*">
<ToggleSwitch Grid.Row="0" Grid.Column="0" IsChecked="{Binding SyncHistory, Mode=TwoWay}" OnContent="Sync History" />
<ToggleSwitch Grid.Row="0" Grid.Column="1" IsChecked="{Binding SyncPlaylist, Mode=TwoWay}" OnContent="Sync Playlists"/>
<ToggleSwitch Grid.Row="1" Grid.Column="0" IsChecked="{Binding SyncProfile, Mode=TwoWay}" OnContent="Sync Profiles"/>
<ToggleSwitch Grid.Row="1" Grid.Column="1" IsChecked="{Binding SyncSearchHistory, Mode=TwoWay}" OnContent="Sync Search History"/>
<ToggleSwitch Grid.Row="2" Grid.Column="0" IsChecked="{Binding SyncSettings, Mode=TwoWay}" OnContent="Sync Settings"/>
</Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="10">
<Button
IsEnabled="{Binding SettingsDirty}"
Classes="Flat Accent"
Click="SaveSettings_OnClick"
Content="Save"/>
<Button
IsEnabled="True"
Classes="Danger"
Click="CloseWindow_OnClick"
Content="Cancel"/>
</StackPanel>
</StackPanel>
</suki:SukiWindow>