feat(ui): batch-merge cockpit view with checkboxes and conflicts panel
This commit is contained in:
@@ -60,8 +60,12 @@
|
|||||||
CommandParameter="{Binding}"/>
|
CommandParameter="{Binding}"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</Border.ContextMenu>
|
</Border.ContextMenu>
|
||||||
<Grid ColumnDefinitions="*,90,80,80">
|
<Grid ColumnDefinitions="Auto,*,90,90,80,80">
|
||||||
<StackPanel Grid.Column="0" Orientation="Vertical" Spacing="2">
|
<CheckBox Grid.Column="0" VerticalAlignment="Center" Margin="0,0,8,0"
|
||||||
|
IsChecked="{Binding IsChecked, Mode=TwoWay}"
|
||||||
|
IsEnabled="{Binding IsActive}"
|
||||||
|
IsVisible="{Binding IsActive}"/>
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Vertical" Spacing="2">
|
||||||
<TextBlock Classes="title" Text="{Binding TaskTitle}"/>
|
<TextBlock Classes="title" Text="{Binding TaskTitle}"/>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||||
<TextBlock Classes="meta" Text="{Binding TaskStatus}"/>
|
<TextBlock Classes="meta" Text="{Binding TaskStatus}"/>
|
||||||
@@ -72,13 +76,16 @@
|
|||||||
ToolTip.Tip="{loc:Tr modals.worktreesOverview.phantomTooltip}"/>
|
ToolTip.Tip="{loc:Tr modals.worktreesOverview.phantomTooltip}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border Grid.Column="1" CornerRadius="3" Padding="6,2" VerticalAlignment="Center"
|
<TextBlock Grid.Column="2" Classes="meta" VerticalAlignment="Center"
|
||||||
|
Text="{Binding MergeOutcome}"
|
||||||
|
IsVisible="{Binding HasOutcome}"/>
|
||||||
|
<Border Grid.Column="3" CornerRadius="3" Padding="6,2" VerticalAlignment="Center"
|
||||||
Background="{Binding State, Converter={StaticResource WorktreeStateColor}}">
|
Background="{Binding State, Converter={StaticResource WorktreeStateColor}}">
|
||||||
<TextBlock Classes="meta" Text="{Binding State}" Foreground="{DynamicResource TextBrush}"
|
<TextBlock Classes="meta" Text="{Binding State}" Foreground="{DynamicResource TextBrush}"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"/>
|
||||||
</Border>
|
</Border>
|
||||||
<TextBlock Grid.Column="2" Classes="meta" Text="{Binding DiffStat}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Column="4" Classes="meta" Text="{Binding DiffStat}" VerticalAlignment="Center"/>
|
||||||
<TextBlock Grid.Column="3" Classes="meta" Text="{Binding AgeText}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Column="5" Classes="meta" Text="{Binding AgeText}" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -98,7 +105,20 @@
|
|||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<Button Classes="btn" Content="{loc:Tr modals.worktreesOverview.refresh}" Command="{Binding RefreshCommand}" IsEnabled="{Binding !IsBusy}"/>
|
<Button Classes="btn" Content="{loc:Tr modals.worktreesOverview.refresh}" Command="{Binding RefreshCommand}" IsEnabled="{Binding !IsBusy}"/>
|
||||||
<Button Classes="btn" Content="{loc:Tr modals.worktreesOverview.cleanupFinished}" Command="{Binding CleanupFinishedCommand}" IsEnabled="{Binding !IsBusy}"/>
|
<Button Classes="btn" Content="{loc:Tr modals.worktreesOverview.cleanupFinished}" Command="{Binding CleanupFinishedCommand}" IsEnabled="{Binding !IsBusy}"/>
|
||||||
<TextBlock Text="{Binding StatusMessage}" VerticalAlignment="Center" Margin="12,0,0,0"
|
<Button Classes="btn" Content="{loc:Tr modals.worktreesOverview.selectAll}" Command="{Binding ToggleSelectAllCommand}"/>
|
||||||
|
<Border Width="1" Background="{DynamicResource LineBrush}" Margin="4,2"/>
|
||||||
|
<TextBlock Text="{loc:Tr modals.worktreesOverview.targetLabel}" VerticalAlignment="Center" Foreground="{DynamicResource TextDimBrush}"/>
|
||||||
|
<ComboBox MinWidth="160"
|
||||||
|
ItemsSource="{Binding MergeTargets}"
|
||||||
|
SelectedItem="{Binding SelectedTarget, Mode=TwoWay}"/>
|
||||||
|
<Button Classes="btn accent"
|
||||||
|
Content="{loc:Tr modals.worktreesOverview.mergeAll}"
|
||||||
|
Command="{Binding MergeAllCommand}"/>
|
||||||
|
<TextBlock Text="{Binding SelectedCount, StringFormat='{}{0} selected'}"
|
||||||
|
VerticalAlignment="Center" Foreground="{DynamicResource TextDimBrush}"/>
|
||||||
|
<TextBlock Text="{Binding BatchProgress}" VerticalAlignment="Center" Margin="8,0,0,0"
|
||||||
|
Foreground="{DynamicResource TextDimBrush}"/>
|
||||||
|
<TextBlock Text="{Binding StatusMessage}" VerticalAlignment="Center" Margin="8,0,0,0"
|
||||||
Foreground="{DynamicResource TextDimBrush}"/>
|
Foreground="{DynamicResource TextDimBrush}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -106,12 +126,35 @@
|
|||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<ScrollViewer Padding="20,16">
|
<ScrollViewer Padding="20,16">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
|
<Border IsVisible="{Binding ConflictRows.Count}"
|
||||||
|
Background="{DynamicResource ErrorTintBrush}"
|
||||||
|
BorderBrush="{DynamicResource StatusErrorBrush}"
|
||||||
|
BorderThickness="1" CornerRadius="6" Padding="12,8" Margin="0,0,0,12">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<TextBlock Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.needsResolution}"/>
|
||||||
|
<ItemsControl ItemsSource="{Binding ConflictRows}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="vm:WorktreeOverviewRowViewModel">
|
||||||
|
<Grid ColumnDefinitions="*,Auto" Margin="0,2">
|
||||||
|
<TextBlock Grid.Column="0" Classes="meta" VerticalAlignment="Center"
|
||||||
|
Text="{Binding TaskTitle}"/>
|
||||||
|
<Button Grid.Column="1" Classes="btn"
|
||||||
|
Content="{loc:Tr modals.worktreesOverview.resolve}"
|
||||||
|
Command="{Binding $parent[Window].((vm:WorktreesOverviewModalViewModel)DataContext).ResolveConflictCommand}"
|
||||||
|
CommandParameter="{Binding}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
<!-- Column headers -->
|
<!-- Column headers -->
|
||||||
<Grid ColumnDefinitions="*,90,80,80" Margin="12,0,12,4">
|
<Grid ColumnDefinitions="Auto,*,90,90,80,80" Margin="12,0,12,4">
|
||||||
<TextBlock Grid.Column="0" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnTask}"/>
|
<TextBlock Grid.Column="1" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnTask}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnState}"/>
|
<TextBlock Grid.Column="2" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnOutcome}"/>
|
||||||
<TextBlock Grid.Column="2" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnDiff}"/>
|
<TextBlock Grid.Column="3" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnState}"/>
|
||||||
<TextBlock Grid.Column="3" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnAge}"/>
|
<TextBlock Grid.Column="4" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnDiff}"/>
|
||||||
|
<TextBlock Grid.Column="5" Classes="eyebrow" Text="{loc:Tr modals.worktreesOverview.columnAge}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Border Height="1" Background="{DynamicResource LineBrush}" Margin="0,0,0,8"/>
|
<Border Height="1" Background="{DynamicResource LineBrush}" Margin="0,0,0,8"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user