Files
gregExtractor/GUI/Views/SyncView.axaml
T

54 lines
2.6 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:gregExtractor.GUI.ViewModels"
x:Class="gregExtractor.GUI.Views.SyncView">
<Grid RowDefinitions="Auto,Auto,*,Auto">
<Border Classes="greg-card" Grid.Row="0">
<Grid ColumnDefinitions="Auto,*,Auto">
<TextBlock Text="Framework Source" VerticalAlignment="Center" Classes="greg-secondary"/>
<TextBox Grid.Column="1" Text="{Binding FrameworkSourcePath}" Classes="greg-input"/>
<Button Grid.Column="2" Content="Browse" Classes="greg-primary" Command="{Binding BrowseSourcePathCommand}"/>
</Grid>
</Border>
<Border Classes="greg-card" Grid.Row="1">
<StackPanel Orientation="Horizontal" Spacing="16">
<CheckBox Content="Dry Run" IsChecked="{Binding IsDryRun}"/>
<CheckBox Content="Git Diff" IsChecked="{Binding UseGitDiff}"/>
<Button Content="Diff berechnen" Classes="greg-secondary" Command="{Binding CalculateDiffCommand}"/>
<Button Content="Sync ausführen" Classes="greg-primary" Command="{Binding RunSyncCommand}"/>
<Button Content="Backup öffnen" Classes="greg-secondary" Command="{Binding OpenBackupFolderCommand}"/>
</StackPanel>
</Border>
<Grid Grid.Row="2" ColumnDefinitions="2*,*">
<Border Classes="greg-card" Grid.Column="0">
<DataGrid ItemsSource="{Binding DiffEntries}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Kind" Binding="{Binding Kind}" Width="100"/>
<DataGridTextColumn Header="Group" Binding="{Binding Group}" Width="140"/>
<DataGridTextColumn Header="Hook" Binding="{Binding Display}" Width="220"/>
<DataGridTextColumn Header="Signature" Binding="{Binding Signature}" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Border>
<Border Classes="greg-card" Grid.Column="1">
<Grid RowDefinitions="Auto,*,Auto,*">
<TextBlock Text="Log" FontWeight="SemiBold"/>
<ListBox Grid.Row="1" ItemsSource="{Binding SyncLog}"/>
<TextBlock Grid.Row="2" Text="Warnings" FontWeight="SemiBold"/>
<ListBox Grid.Row="3" ItemsSource="{Binding Warnings}"/>
</Grid>
</Border>
</Grid>
<Border IsVisible="{Binding IsLoading}" Background="#880B1220" CornerRadius="12">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="8">
<ProgressBar IsIndeterminate="True" Width="220"/>
<TextBlock Text="Sync läuft..."/>
</StackPanel>
</Border>
</Grid>
</UserControl>