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"
|
|
|
|
xmlns:m="using:SourceGit.Models"
|
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
2024-04-02 01:23:47 -07:00
|
|
|
xmlns:v="using:SourceGit.Views"
|
2024-02-05 23:08:37 -08:00
|
|
|
xmlns:c="using:SourceGit.Converters"
|
2024-05-25 21:17:15 -07:00
|
|
|
xmlns:ac="using:Avalonia.Controls.Converters"
|
2024-02-05 23:08:37 -08:00
|
|
|
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.CreateBranch"
|
|
|
|
x:DataType="vm:CreateBranch">
|
|
|
|
<StackPanel Orientation="Vertical" Margin="8,0">
|
|
|
|
<TextBlock FontSize="18"
|
2024-04-02 01:23:47 -07:00
|
|
|
Classes="bold"
|
2024-06-17 23:47:55 -07:00
|
|
|
Text="{DynamicResource Text.CreateBranch.Title}"/>
|
2024-08-22 19:57:33 -07:00
|
|
|
<Grid Margin="0,16,0,0" ColumnDefinitions="140,*">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="32"/>
|
|
|
|
<RowDefinition Height="32"/>
|
|
|
|
<RowDefinition Height="Auto" MinHeight="32"/>
|
|
|
|
<RowDefinition Height="32"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2024-07-14 00:55:15 -07: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.CreateBranch.BasedOn}"/>
|
2024-07-14 00:55:15 -07:00
|
|
|
<ContentControl Grid.Row="0" Grid.Column="1" Content="{Binding BasedOn}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<ContentControl.DataTemplates>
|
|
|
|
<DataTemplate DataType="m:Branch">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Branch}"/>
|
2024-07-01 19:23:21 -07:00
|
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding FriendlyName}" Margin="8,0,0,0"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="m:Commit">
|
2024-06-11 21:04:51 -07:00
|
|
|
<Grid ColumnDefinitions="Auto,Auto,*">
|
|
|
|
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
2024-07-29 05:48:04 -07:00
|
|
|
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
2024-06-11 21:04:51 -07:00
|
|
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
|
|
|
</Grid>
|
2024-02-05 23:08:37 -08:00
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="m:Tag">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Tag}"/>
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" Margin="8,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</ContentControl.DataTemplates>
|
|
|
|
</ContentControl>
|
|
|
|
|
|
|
|
<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.CreateBranch.Name}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
|
|
|
Height="26"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
CornerRadius="2"
|
2024-04-02 01:23:47 -07:00
|
|
|
Text="{Binding Name, Mode=TwoWay}"
|
2024-06-18 05:14:36 -07:00
|
|
|
Watermark="{DynamicResource Text.CreateBranch.Name.Placeholder}"
|
2024-04-02 01:23:47 -07:00
|
|
|
v:AutoFocusBehaviour.IsEnabled="True"/>
|
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.CreateBranch.LocalChanges}"/>
|
2024-08-22 19:57:33 -07:00
|
|
|
<WrapPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
|
2024-06-19 00:29:40 -07:00
|
|
|
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
|
2024-11-27 02:31:50 -08:00
|
|
|
x:Name="RadioDoNothing"
|
2024-06-19 00:29:40 -07:00
|
|
|
GroupName="LocalChanges"
|
2024-08-22 19:57:33 -07:00
|
|
|
Margin="0,0,8,0"
|
2024-11-27 02:31:50 -08:00
|
|
|
IsCheckedChanged="OnLocalChangeActionIsCheckedChanged"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.StashAndReply}"
|
2024-11-27 02:31:50 -08:00
|
|
|
x:Name="RadioStashAndReply"
|
2024-02-05 23:08:37 -08:00
|
|
|
GroupName="LocalChanges"
|
2024-08-22 19:57:33 -07:00
|
|
|
Margin="0,0,8,0"
|
2024-11-27 02:31:50 -08:00
|
|
|
IsCheckedChanged="OnLocalChangeActionIsCheckedChanged"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.Discard}"
|
2024-11-27 02:31:50 -08:00
|
|
|
x:Name="RadioDiscard"
|
2024-02-05 23:08:37 -08:00
|
|
|
GroupName="LocalChanges"
|
2024-11-27 02:31:50 -08:00
|
|
|
IsCheckedChanged="OnLocalChangeActionIsCheckedChanged"/>
|
2024-08-22 19:57:33 -07:00
|
|
|
</WrapPanel>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<CheckBox Grid.Row="3" Grid.Column="1"
|
|
|
|
Content="{DynamicResource Text.CreateBranch.Checkout}"
|
|
|
|
IsChecked="{Binding CheckoutAfterCreated, Mode=TwoWay}"/>
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</UserControl>
|