2024-02-05 23:08:37 -08:00
|
|
|
<UserControl 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"
|
2024-07-23 20:44:13 -07:00
|
|
|
xmlns:m="using:SourceGit.Models"
|
2024-02-05 23:08:37 -08:00
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
xmlns:c="using:SourceGit.Converters"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.Reset"
|
|
|
|
x:DataType="vm:Reset">
|
|
|
|
<StackPanel Orientation="Vertical" Margin="8,0">
|
|
|
|
<TextBlock FontSize="18"
|
2024-04-02 01:23:47 -07:00
|
|
|
Classes="bold"
|
|
|
|
Text="{DynamicResource Text.Reset}"/>
|
2024-06-24 04:52:00 -07:00
|
|
|
<Grid Margin="0,16,0,0" RowDefinitions="32,32,32" ColumnDefinitions="120,*">
|
2024-02-05 23:08:37 -08:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
2024-04-02 01:23:47 -07:00
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
Text="{DynamicResource Text.Reset.Target}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" Height="20" VerticalAlignment="Center">
|
|
|
|
<Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Branch}"/>
|
|
|
|
<TextBlock Text="{Binding Current.Name}"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
2024-04-02 01:23:47 -07:00
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
Text="{DynamicResource Text.Reset.MoveTo}"/>
|
2024-06-11 21:04:51 -07:00
|
|
|
<Grid Grid.Row="1" Grid.Column="1" ColumnDefinitions="Auto,Auto,*" Height="20" VerticalAlignment="Center">
|
|
|
|
<Path Grid.Column="0" Margin="0,6,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
2024-07-29 05:48:04 -07:00
|
|
|
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding To.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
2024-06-11 21:04:51 -07:00
|
|
|
<TextBlock Grid.Column="2" Text="{Binding To.Subject}" Margin="8,0,0,0" TextTrimming="CharacterEllipsis"/>
|
|
|
|
</Grid>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
2024-04-02 01:23:47 -07:00
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
Text="{DynamicResource Text.Reset.Mode}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<ComboBox Grid.Row="2" Grid.Column="1"
|
|
|
|
Height="28" Padding="8,0"
|
|
|
|
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
2024-07-23 20:44:13 -07:00
|
|
|
ItemsSource="{Binding Source={x:Static m:ResetMode.Supported}}"
|
2024-02-05 23:08:37 -08:00
|
|
|
SelectedItem="{Binding SelectedMode, Mode=TwoWay}">
|
|
|
|
<ComboBox.ItemTemplate>
|
2024-07-23 20:44:13 -07:00
|
|
|
<DataTemplate DataType="m:ResetMode">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Grid ColumnDefinitions="16,60,*">
|
|
|
|
<Ellipse Grid.Column="0" Width="12" Height="12" Fill="{Binding Color}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="4,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="2" Text="{Binding Desc}" FontSize="11" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</UserControl>
|