mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix<Stashes>: show time of stash
This commit is contained in:
parent
f04ab92efc
commit
22416812a0
2 changed files with 34 additions and 24 deletions
|
@ -66,32 +66,42 @@
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Stashes List -->
|
<!-- Stashes List -->
|
||||||
<ListView
|
<DataGrid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
x:Name="stashList"
|
x:Name="stashList"
|
||||||
Background="{DynamicResource Brush.Contents}"
|
Background="{DynamicResource Brush.Contents}"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
SelectionMode="Single"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
SelectionUnit="FullRow"
|
||||||
SelectionChanged="OnStashSelectionChanged">
|
SelectedCellsChanged="OnStashSelectionChanged">
|
||||||
<ListView.ItemTemplate>
|
<DataGrid.Columns>
|
||||||
<DataTemplate DataType="{x:Type models:Stash}">
|
<DataGridTemplateColumn Width="*">
|
||||||
<Border BorderBrush="{DynamicResource Brush.Border3}" BorderThickness="0,0,0,1" Background="Transparent" Padding="6" ContextMenuOpening="OnStashContextMenuOpening">
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<StackPanel Orientation="Vertical">
|
<DataTemplate DataType="{x:Type models:Stash}">
|
||||||
<Grid>
|
<Border BorderBrush="{DynamicResource Brush.Border3}" BorderThickness="0,0,0,1" Background="Transparent" Padding="6" ContextMenuOpening="OnStashContextMenuOpening">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid>
|
||||||
<ColumnDefinition Width="*"/>
|
<Grid.RowDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
<RowDefinition Height="Auto"/>
|
||||||
<TextBlock Grid.Column="0" Text="{Binding SHA}" Foreground="{DynamicResource Brush.FG2}"/>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Author.Time}" Foreground="{DynamicResource Brush.FG2}"/>
|
|
||||||
</Grid>
|
<Grid Grid.Row="0">
|
||||||
<TextBlock Text="{Binding Message}" Margin="0,8,0,0"/>
|
<Grid.ColumnDefinitions>
|
||||||
</StackPanel>
|
<ColumnDefinition Width="*"/>
|
||||||
</Border>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</DataTemplate>
|
</Grid.ColumnDefinitions>
|
||||||
</ListView.ItemTemplate>
|
<TextBlock Grid.Column="0" Text="{Binding SHA}" Foreground="DarkOrange"/>
|
||||||
</ListView>
|
<TextBlock Grid.Column="1" Text="{Binding TimeStr}" Foreground="{DynamicResource Brush.FG2}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="1" Text="{Binding Message}" Margin="0,8,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
|
||||||
<!-- Change List Group -->
|
<!-- Change List Group -->
|
||||||
<Border Grid.Row="2" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,1">
|
<Border Grid.Row="2" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,1">
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace SourceGit.Views.Widgets {
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnStashSelectionChanged(object sender, SelectionChangedEventArgs e) {
|
private async void OnStashSelectionChanged(object sender, SelectedCellsChangedEventArgs e) {
|
||||||
changeList.ItemsSource = null;
|
changeList.ItemsSource = null;
|
||||||
selected = null;
|
selected = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue