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:c="using:SourceGit.Converters"
|
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
xmlns:v="using:SourceGit.Views"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.EditRepositoryNode"
|
|
|
|
x:DataType="vm:EditRepositoryNode">
|
|
|
|
<StackPanel Orientation="Vertical" Margin="8,0,0,0">
|
|
|
|
<TextBlock FontSize="18"
|
|
|
|
Classes="bold"
|
|
|
|
Text="{DynamicResource Text.EditRepositoryNode.TitleForGroup}"
|
|
|
|
IsVisible="{Binding !IsRepository}"/>
|
|
|
|
|
|
|
|
<TextBlock FontSize="18"
|
|
|
|
Classes="bold"
|
|
|
|
Text="{DynamicResource Text.EditRepositoryNode.TitleForRepository}"
|
|
|
|
IsVisible="{Binding IsRepository}"/>
|
|
|
|
|
|
|
|
<Grid Height="28" Margin="8,16,0,0" ColumnDefinitions="120,*" >
|
|
|
|
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,8,0" Text="{DynamicResource Text.EditRepositoryNode.Target}"/>
|
|
|
|
<TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Name, Mode=OneTime}" IsVisible="{Binding !IsRepository}"/>
|
|
|
|
<TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Id, Mode=TwoWay}" IsVisible="{Binding IsRepository}"/>
|
|
|
|
</Grid>
|
|
|
|
<Grid Height="28" Margin="8,4,0,0" ColumnDefinitions="120,*">
|
|
|
|
<TextBlock Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,8,0" Text="{DynamicResource Text.EditRepositoryNode.Name}"/>
|
2024-04-02 01:23:47 -07:00
|
|
|
<TextBox Grid.Column="1" CornerRadius="3" Text="{Binding Name, Mode=TwoWay}" v:AutoFocusBehaviour.IsEnabled="True"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
<Grid Height="28" Margin="8,4,0,0" ColumnDefinitions="120,*" IsVisible="{Binding IsRepository}">
|
|
|
|
<TextBlock Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,8,0" Text="{DynamicResource Text.EditRepositoryNode.Bookmark}"/>
|
|
|
|
<ComboBox Grid.Column="1"
|
|
|
|
BorderThickness="0"
|
|
|
|
Height="28"
|
|
|
|
ItemsSource="{x:Static m:Bookmarks.Supported}"
|
|
|
|
SelectedIndex="{Binding Bookmark, Mode=TwoWay}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Border Height="20" VerticalAlignment="Center">
|
|
|
|
<Path Width="12" Height="12"
|
2024-03-13 01:02:39 -07:00
|
|
|
Fill="{Binding Converter={x:Static c:BookmarkConverters.ToBrush}}"
|
2024-02-05 23:08:37 -08:00
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
Data="{StaticResource Icons.Bookmark}"/>
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</UserControl>
|