2024-06-12 20:54:10 -07:00
|
|
|
<v:ChromelessWindow 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.Preference"
|
|
|
|
x:DataType="vm:Preference"
|
2024-07-14 00:55:15 -07:00
|
|
|
x:Name="ThisControl"
|
2024-06-12 20:54:10 -07:00
|
|
|
Icon="/App.ico"
|
|
|
|
Title="{DynamicResource Text.Preference}"
|
2024-08-21 02:31:27 -07:00
|
|
|
SizeToContent="WidthAndHeight"
|
2024-06-12 20:54:10 -07:00
|
|
|
CanResize="False"
|
|
|
|
WindowStartupLocation="CenterScreen">
|
2024-08-21 02:31:27 -07:00
|
|
|
<Grid RowDefinitions="Auto,Auto" MinWidth="600">
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- TitleBar -->
|
2024-08-21 21:37:26 -07:00
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30" IsVisible="{Binding !#ThisControl.UseSystemWindowFrame}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
|
Background="{DynamicResource Brush.TitleBar}"
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
2024-03-14 03:23:36 -07:00
|
|
|
PointerPressed="BeginMoveWindow"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<Path Grid.Column="0"
|
|
|
|
Width="14" Height="14"
|
2024-06-17 04:44:54 -07:00
|
|
|
Data="{StaticResource Icons.Settings}"
|
2024-02-05 23:08:37 -08:00
|
|
|
Margin="10,0,0,0"
|
2024-03-14 03:23:36 -07:00
|
|
|
IsVisible="{OnPlatform True, macOS=False}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-09-01 01:54:20 -07:00
|
|
|
<v:CaptionButtonsMacOS Grid.Column="0"
|
|
|
|
Margin="0,2,0,0"
|
|
|
|
IsCloseButtonOnly="True"
|
|
|
|
IsVisible="{OnPlatform False, macOS=True}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
|
Classes="bold"
|
|
|
|
Text="{DynamicResource Text.Preference}"
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
IsHitTestVisible="False"/>
|
|
|
|
|
2024-09-01 01:54:20 -07:00
|
|
|
<v:CaptionButtons Grid.Column="2"
|
|
|
|
IsCloseButtonOnly="True"
|
|
|
|
IsVisible="{OnPlatform True, macOS=False}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Body -->
|
2024-06-12 20:54:10 -07:00
|
|
|
<Border Grid.Row="1">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TabControl>
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.General}"/>
|
|
|
|
</TabItem.Header>
|
2024-10-23 18:31:05 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32" ColumnDefinitions="Auto,*">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.General.Locale}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:Locale.Supported}}"
|
|
|
|
DisplayMemberBinding="{Binding Name, x:DataType=m:Locale}"
|
|
|
|
SelectedItem="{Binding Locale, Mode=TwoWay, Converter={x:Static c:StringConverters.ToLocale}}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
2024-09-13 21:31:31 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.DefaultCloneDir}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding GitDefaultCloneDir, Mode=TwoWay}">
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectDefaultCloneDir">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
2024-06-25 02:46:15 -07:00
|
|
|
Text="{DynamicResource Text.Preference.General.SubjectGuideLength}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-09-13 21:31:31 -07:00
|
|
|
<NumericUpDown Grid.Row="2" Grid.Column="1"
|
2024-06-23 18:39:55 -07:00
|
|
|
Minimum="50" Maximum="1000" Increment="1"
|
|
|
|
Height="28"
|
|
|
|
Padding="4"
|
|
|
|
ShowButtonSpinner="False"
|
|
|
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
|
|
|
|
CornerRadius="3"
|
|
|
|
Value="{Binding SubjectGuideLength, Mode=TwoWay}"/>
|
|
|
|
|
2024-09-13 21:31:31 -07:00
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
2024-03-21 21:29:40 -07:00
|
|
|
Text="{DynamicResource Text.Preference.General.MaxHistoryCommits}"
|
2024-03-14 03:23:36 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-09-13 21:31:31 -07:00
|
|
|
<Grid Grid.Row="3" Grid.Column="1" ColumnDefinitions="*,64">
|
2024-03-21 21:29:40 -07:00
|
|
|
<Slider Grid.Column="0"
|
2024-09-29 00:23:38 -07:00
|
|
|
Minimum="5000" Maximum="100000"
|
2024-03-21 21:29:40 -07:00
|
|
|
TickPlacement="BottomRight" TickFrequency="5000"
|
|
|
|
IsSnapToTickEnabled="True"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Foreground="{DynamicResource Brush.Border1}"
|
2024-07-14 00:55:15 -07:00
|
|
|
Value="{Binding MaxHistoryCommits, Mode=TwoWay}"/>
|
2024-03-21 21:29:40 -07:00
|
|
|
|
|
|
|
<TextBlock Grid.Column="1"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
Foreground="{DynamicResource Brush.FG1}"
|
|
|
|
Text="{Binding MaxHistoryCommits}"/>
|
|
|
|
</Grid>
|
2024-06-23 00:45:54 -07:00
|
|
|
|
2024-09-13 21:31:31 -07:00
|
|
|
<CheckBox Grid.Row="4" Grid.Column="1"
|
2024-03-26 07:11:06 -07:00
|
|
|
Height="32"
|
2024-10-11 18:59:19 -07:00
|
|
|
Content="{DynamicResource Text.Preference.General.ShowAuthorTime}"
|
|
|
|
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowAuthorTimeInGraph, Mode=TwoWay}"/>
|
2024-10-11 18:56:33 -07:00
|
|
|
|
|
|
|
<CheckBox Grid.Row="5" Grid.Column="1"
|
|
|
|
Height="32"
|
2024-10-11 18:59:19 -07:00
|
|
|
Content="{DynamicResource Text.Preference.General.Check4UpdatesOnStartup}"
|
|
|
|
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=Check4UpdatesOnStartup, Mode=TwoWay}"/>
|
2024-03-21 21:29:40 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/>
|
|
|
|
</TabItem.Header>
|
2024-08-21 21:37:26 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
|
2024-03-21 21:29:40 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Appearance.Theme}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
DisplayMemberBinding="{Binding Key, x:DataType=ThemeVariant}"
|
|
|
|
SelectedItem="{Binding Theme, Mode=TwoWay, Converter={x:Static c:StringConverters.ToTheme}}">
|
|
|
|
<ComboBox.Items>
|
|
|
|
<ThemeVariant>Default</ThemeVariant>
|
|
|
|
<ThemeVariant>Dark</ThemeVariant>
|
|
|
|
<ThemeVariant>Light</ThemeVariant>
|
|
|
|
</ComboBox.Items>
|
|
|
|
</ComboBox>
|
2024-06-05 03:23:28 -07:00
|
|
|
|
2024-06-05 03:32:55 -07:00
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
2024-03-21 21:29:40 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Appearance.DefaultFont}"
|
2024-03-21 03:02:06 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-08-19 02:14:41 -07:00
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding DefaultFontFamily, Mode=TwoWay}"/>
|
2024-03-21 03:02:06 -07:00
|
|
|
|
2024-06-05 03:32:55 -07:00
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
2024-03-21 21:29:40 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Appearance.MonospaceFont}"
|
2024-03-21 03:02:06 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-08-19 02:14:41 -07:00
|
|
|
<TextBox Grid.Row="2" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding MonospaceFontFamily, Mode=TwoWay}"/>
|
2024-03-21 03:02:06 -07:00
|
|
|
|
2024-06-05 03:32:55 -07:00
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
2024-03-21 21:29:40 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Appearance.DefaultFontSize}"
|
2024-03-21 21:03:04 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-06-05 03:32:55 -07:00
|
|
|
<NumericUpDown Grid.Row="3" Grid.Column="1"
|
2024-08-09 06:21:28 -07:00
|
|
|
Minimum="10" Maximum="18" Increment="0.5"
|
2024-03-21 21:03:04 -07:00
|
|
|
Height="28"
|
|
|
|
Padding="4"
|
2024-03-21 21:18:03 -07:00
|
|
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
|
2024-03-21 21:03:04 -07:00
|
|
|
CornerRadius="3"
|
2024-06-14 00:46:52 -07:00
|
|
|
Value="{Binding DefaultFontSize, Mode=TwoWay}"/>
|
2024-06-05 03:32:55 -07:00
|
|
|
|
|
|
|
<TextBlock Grid.Row="4" Grid.Column="0"
|
2024-07-08 01:21:57 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Appearance.ThemeOverrides}"
|
2024-06-05 03:32:55 -07:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<TextBox Grid.Row="4" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
2024-07-08 01:21:57 -07:00
|
|
|
Text="{Binding ThemeOverrides, Mode=TwoWay}">
|
2024-06-05 03:32:55 -07:00
|
|
|
<TextBox.InnerRightContent>
|
2024-07-08 01:21:57 -07:00
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectThemeOverrideFile">
|
2024-06-05 03:32:55 -07:00
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-07-29 05:20:27 -07:00
|
|
|
|
|
|
|
<CheckBox Grid.Row="5" Grid.Column="1"
|
|
|
|
Content="{DynamicResource Text.Preference.Appearance.OnlyUseMonoFontInEditor}"
|
|
|
|
IsChecked="{Binding OnlyUseMonoFontInEditor, Mode=TwoWay}"/>
|
2024-08-21 21:37:26 -07:00
|
|
|
|
|
|
|
<CheckBox Grid.Row="6" Grid.Column="1"
|
|
|
|
Height="32"
|
|
|
|
Content="{DynamicResource Text.Preference.Appearance.UseFixedTabWidth}"
|
|
|
|
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/>
|
|
|
|
|
|
|
|
<CheckBox Grid.Row="7" Grid.Column="1"
|
|
|
|
Height="32"
|
|
|
|
Content="{DynamicResource Text.Preference.Appearance.UseNativeWindowFrame}"
|
|
|
|
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSystemWindowFrame, Mode=OneTime}"
|
|
|
|
IsVisible="{OnPlatform False, Linux=True}"
|
|
|
|
IsCheckedChanged="OnUseNativeWindowFrameChanged"/>
|
2024-03-14 03:23:36 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Git}"/>
|
|
|
|
</TabItem.Header>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-09-13 21:31:31 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,32,32,32,32" ColumnDefinitions="Auto,*">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Git.Path}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<TextBox Grid.Row="0" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding GitInstallPath, Mode=TwoWay}">
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectGitExecutable">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Git.Version}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-05-29 03:53:38 -07:00
|
|
|
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
|
2024-07-29 05:48:04 -07:00
|
|
|
<TextBlock Margin="0,0,8,0"
|
2024-10-23 18:31:05 -07:00
|
|
|
Text="{Binding #ThisControl.GitVersion}"
|
2024-07-14 00:55:15 -07:00
|
|
|
IsVisible="{Binding #ThisControl.GitVersion, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
2024-05-29 03:53:38 -07:00
|
|
|
|
|
|
|
<Border Background="Transparent"
|
|
|
|
ToolTip.Tip="{DynamicResource Text.Preference.Git.Invalid}"
|
2024-07-14 00:55:15 -07:00
|
|
|
IsVisible="{Binding #ThisControl.GitVersion, Converter={x:Static c:StringConverters.UnderRecommendGitVersion}}">
|
2024-05-29 03:53:38 -07:00
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red"/>
|
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-09-13 21:09:50 -07:00
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.User}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-09-13 21:31:31 -07:00
|
|
|
<TextBox Grid.Row="2" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
2024-07-14 00:55:15 -07:00
|
|
|
Text="{Binding #ThisControl.DefaultUser, Mode=TwoWay}"
|
2024-03-14 03:23:36 -07:00
|
|
|
Watermark="{DynamicResource Text.Preference.Git.User.Placeholder}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-09-13 21:31:31 -07:00
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.Email}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-09-13 21:31:31 -07:00
|
|
|
<TextBox Grid.Row="3" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
2024-07-14 00:55:15 -07:00
|
|
|
Text="{Binding #ThisControl.DefaultEmail, Mode=TwoWay}"
|
2024-03-14 03:23:36 -07:00
|
|
|
Watermark="{DynamicResource Text.Preference.Git.Email.Placeholder}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-09-13 21:31:31 -07:00
|
|
|
<TextBlock Grid.Row="4" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.Git.CRLF}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-09-13 21:31:31 -07:00
|
|
|
<ComboBox Grid.Row="4" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:CRLFMode.Supported}}"
|
2024-07-14 00:55:15 -07:00
|
|
|
SelectedItem="{Binding #ThisControl.CRLFMode, Mode=TwoWay}">
|
2024-03-14 03:23:36 -07:00
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:CRLFMode}">
|
|
|
|
<Grid ColumnDefinitions="64,*">
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Name}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Desc}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.GPG}"/>
|
|
|
|
</TabItem.Header>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-06-03 19:20:31 -07:00
|
|
|
<Grid Margin="8" RowDefinitions="32,Auto,32,32,32" ColumnDefinitions="Auto,*">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
2024-05-30 09:25:30 -07:00
|
|
|
Text="{DynamicResource Text.Preference.GPG.Format}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:GPGFormat.Supported}}"
|
2024-07-14 00:55:15 -07:00
|
|
|
SelectedItem="{Binding #ThisControl.GPGFormat, Mode=TwoWay}">
|
2024-05-30 09:25:30 -07:00
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:GPGFormat}">
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Name}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Desc}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.GPG.Path}"
|
|
|
|
HorizontalAlignment="Right"
|
2024-06-03 19:20:31 -07:00
|
|
|
Margin="0,0,16,0"
|
2024-07-14 00:55:15 -07:00
|
|
|
IsVisible="{Binding #ThisControl.GPGFormat.NeedFindProgram}"/>
|
2024-05-30 09:25:30 -07:00
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
2024-07-14 00:55:15 -07:00
|
|
|
Text="{Binding #ThisControl.GPGExecutableFile, Mode=TwoWay}"
|
2024-06-03 19:20:31 -07:00
|
|
|
Watermark="{DynamicResource Text.Preference.GPG.Path.Placeholder}"
|
2024-07-14 00:55:15 -07:00
|
|
|
IsVisible="{Binding #ThisControl.GPGFormat.NeedFindProgram}">
|
2024-03-14 03:23:36 -07:00
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectGPGExecutable">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-05-30 09:25:30 -07:00
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
2024-03-14 03:23:36 -07:00
|
|
|
Text="{DynamicResource Text.Preference.GPG.UserKey}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
2024-05-30 09:25:30 -07:00
|
|
|
<TextBox Grid.Row="2" Grid.Column="1"
|
2024-03-14 03:23:36 -07:00
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
2024-07-14 00:55:15 -07:00
|
|
|
Text="{Binding #ThisControl.GPGUserKey, Mode=TwoWay}"
|
2024-03-14 03:23:36 -07:00
|
|
|
Watermark="{DynamicResource Text.Preference.GPG.UserKey.Placeholder}"/>
|
2024-05-23 19:31:20 -07:00
|
|
|
|
2024-05-30 09:25:30 -07:00
|
|
|
<CheckBox Grid.Row="3" Grid.Column="1"
|
|
|
|
Content="{DynamicResource Text.Preference.GPG.CommitEnabled}"
|
2024-07-14 00:55:15 -07:00
|
|
|
IsChecked="{Binding #ThisControl.EnableGPGCommitSigning, Mode=TwoWay}"/>
|
2024-05-30 09:25:30 -07:00
|
|
|
|
|
|
|
<CheckBox Grid.Row="4" Grid.Column="1"
|
|
|
|
Content="{DynamicResource Text.Preference.GPG.TagEnabled}"
|
2024-07-14 00:55:15 -07:00
|
|
|
IsChecked="{Binding #ThisControl.EnableGPGTagSigning, Mode=TwoWay}"/>
|
2024-03-14 03:23:36 -07:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
2024-09-13 21:09:50 -07:00
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Integration}"/>
|
2024-03-14 03:23:36 -07:00
|
|
|
</TabItem.Header>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-09-13 21:09:50 -07:00
|
|
|
<StackPanel Margin="8" MaxWidth="580" Orientation="Vertical" Grid.IsSharedSizeScope="True">
|
2024-09-30 17:55:43 -07:00
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Terminal}"/>
|
|
|
|
<TextBlock Classes="bold" Margin="4,0,0,0" Text="{DynamicResource Text.Preference.Shell}"/>
|
|
|
|
</StackPanel>
|
2024-09-13 21:09:50 -07:00
|
|
|
<Rectangle Margin="0,8" Fill="{DynamicResource Brush.Border2}" Height=".6" HorizontalAlignment="Stretch"/>
|
|
|
|
<Grid Margin="8,0,0,0" RowDefinitions="32,Auto">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="IntegrationLabel"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
2024-10-23 18:31:05 -07:00
|
|
|
|
2024-09-13 21:09:50 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Shell.Type}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:ShellOrTerminal.Supported}}"
|
|
|
|
SelectedIndex="{Binding ShellOrTerminal, Mode=TwoWay}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:ShellOrTerminal}">
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Image Grid.Column="0" Width="16" Height="16" Source="{Binding Icon}" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="6,0,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.Shell.Path}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"
|
|
|
|
IsVisible="{OnPlatform True, macOS=False}"/>
|
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding ShellOrTerminalPath, Mode=TwoWay}"
|
|
|
|
IsVisible="{OnPlatform True, macOS=False}">
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectShellOrTerminal">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
2024-10-23 18:31:05 -07:00
|
|
|
</Grid>
|
2024-09-13 21:09:50 -07:00
|
|
|
|
2024-09-30 17:55:43 -07:00
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,24,0,0">
|
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Diff}"/>
|
|
|
|
<TextBlock Classes="bold" Margin="4,0,0,0" Text="{DynamicResource Text.Preference.DiffMerge}"/>
|
|
|
|
</StackPanel>
|
2024-09-13 21:09:50 -07:00
|
|
|
<Rectangle Margin="0,8" Fill="{DynamicResource Brush.Border2}" Height=".6" HorizontalAlignment="Stretch"/>
|
2024-10-27 20:00:11 -07:00
|
|
|
<Grid Margin="8,0,0,8" RowDefinitions="32,Auto">
|
2024-09-13 21:09:50 -07:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="IntegrationLabel"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
2024-10-23 18:31:05 -07:00
|
|
|
|
2024-09-13 21:09:50 -07:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.DiffMerge.Type}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
MinHeight="28"
|
|
|
|
Padding="8,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
HorizontalContentAlignment="Left"
|
|
|
|
RenderOptions.BitmapInterpolationMode="HighQuality"
|
|
|
|
FontSize="{Binding DefaultFontSize}"
|
|
|
|
ItemsSource="{Binding Source={x:Static m:ExternalMerger.Supported}}"
|
|
|
|
SelectedIndex="{Binding ExternalMergeToolType, Mode=TwoWay}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:ExternalMerger}">
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Image Grid.Column="0" Width="16" Height="16" Source="{Binding IconImage}" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="6,0,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
|
|
Text="{DynamicResource Text.Preference.DiffMerge.Path}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,16,0"
|
|
|
|
IsVisible="{Binding ExternalMergeToolType, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"/>
|
|
|
|
<TextBox Grid.Row="1" Grid.Column="1"
|
|
|
|
Height="28"
|
|
|
|
CornerRadius="3"
|
|
|
|
Text="{Binding ExternalMergeToolPath, Mode=TwoWay}"
|
|
|
|
Watermark="{DynamicResource Text.Preference.DiffMerge.Path.Placeholder}"
|
|
|
|
IsVisible="{Binding ExternalMergeToolType, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button" Width="30" Height="30" Click="SelectExternalMergeTool">
|
|
|
|
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
|
|
|
</Button>
|
|
|
|
</TextBox.InnerRightContent>
|
|
|
|
</TextBox>
|
|
|
|
</Grid>
|
2024-10-27 20:00:11 -07:00
|
|
|
</StackPanel>
|
|
|
|
</TabItem>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-10-27 20:00:11 -07:00
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.AI}"/>
|
|
|
|
</TabItem.Header>
|
2024-09-13 21:09:50 -07:00
|
|
|
|
2024-10-27 20:00:11 -07:00
|
|
|
<Grid ColumnDefinitions="200,*" Margin="0,8,0,16" MinHeight="400">
|
|
|
|
<Border Grid.Column="0"
|
|
|
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
Background="{DynamicResource Brush.Contents}">
|
|
|
|
<Grid RowDefinitions="*,1,Auto">
|
|
|
|
<ListBox Grid.Row="0"
|
|
|
|
Background="Transparent"
|
|
|
|
ItemsSource="{Binding OpenAIServices}"
|
|
|
|
SelectedItem="{Binding #ThisControl.SelectedOpenAIService, Mode=TwoWay}"
|
|
|
|
SelectionMode="Single">
|
|
|
|
<ListBox.Styles>
|
|
|
|
<Style Selector="ListBoxItem">
|
|
|
|
<Setter Property="MinHeight" Value="0"/>
|
|
|
|
<Setter Property="Height" Value="26"/>
|
|
|
|
<Setter Property="Padding" Value="4,2"/>
|
|
|
|
</Style>
|
|
|
|
</ListBox.Styles>
|
|
|
|
|
|
|
|
<ListBox.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel Orientation="Vertical"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ListBox.ItemsPanel>
|
|
|
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<DataTemplate DataType="m:OpenAIService">
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.AIAssist}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
|
|
|
|
|
|
|
<Rectangle Grid.Row="1" Height="1" Fill="{DynamicResource Brush.Border2}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" Background="{DynamicResource Brush.ToolBar}">
|
|
|
|
<Button Classes="icon_button" Click="OnAddOpenAIService">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Plus}"/>
|
|
|
|
</Button>
|
2024-09-13 21:09:50 -07:00
|
|
|
|
2024-10-27 20:00:11 -07:00
|
|
|
<Rectangle Width="1" Fill="{DynamicResource Brush.Border2}" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
|
2024-10-23 18:31:05 -07:00
|
|
|
|
2024-10-27 20:00:11 -07:00
|
|
|
<Button Classes="icon_button" Click="OnRemoveSelectedOpenAIService">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Window.Minimize}"/>
|
|
|
|
</Button>
|
2024-10-24 18:51:51 -07:00
|
|
|
|
2024-10-27 20:00:11 -07:00
|
|
|
<Rectangle Width="1" Fill="{DynamicResource Brush.Border2}" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
<ContentControl Grid.Column="1" Margin="16,0,0,0">
|
|
|
|
<ContentControl.Content>
|
|
|
|
<Binding Path="#ThisControl.SelectedOpenAIService">
|
|
|
|
<Binding.TargetNullValue>
|
|
|
|
<Path Width="64" Height="64"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Fill="{DynamicResource Brush.FG2}"
|
|
|
|
Data="{StaticResource Icons.Empty}"/>
|
|
|
|
</Binding.TargetNullValue>
|
|
|
|
</Binding>
|
|
|
|
</ContentControl.Content>
|
|
|
|
|
|
|
|
<ContentControl.DataTemplates>
|
|
|
|
<DataTemplate DataType="m:OpenAIService">
|
|
|
|
<StackPanel Orientation="Vertical" MaxWidth="680">
|
|
|
|
<TextBlock Text="{DynamicResource Text.Preference.AI.Name}"/>
|
|
|
|
<TextBox Margin="0,4,0,0" CornerRadius="3" Height="28" Text="{Binding Name, Mode=TwoWay}"/>
|
|
|
|
|
|
|
|
<TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Preference.AI.Server}"/>
|
|
|
|
<TextBox Margin="0,4,0,0" CornerRadius="3" Height="28" Text="{Binding Server, Mode=TwoWay}"/>
|
|
|
|
|
|
|
|
<TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Preference.AI.Model}"/>
|
|
|
|
<TextBox Margin="0,4,0,0" CornerRadius="3" Height="28" Text="{Binding Model, Mode=TwoWay}"/>
|
|
|
|
|
|
|
|
<TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Preference.AI.ApiKey}"/>
|
|
|
|
<TextBox Margin="0,4,0,0" CornerRadius="3" Height="28" Text="{Binding ApiKey, Mode=TwoWay}" PasswordChar="*"/>
|
|
|
|
|
|
|
|
<TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Preference.AI.AnalyzeDiffPrompt}"/>
|
|
|
|
<TextBox Height="120"
|
|
|
|
Margin="0,4,0,0"
|
|
|
|
CornerRadius="3"
|
|
|
|
VerticalContentAlignment="Top"
|
|
|
|
Text="{Binding AnalyzeDiffPrompt, Mode=TwoWay}"
|
|
|
|
AcceptsReturn="true"
|
|
|
|
TextWrapping="Wrap"/>
|
|
|
|
|
|
|
|
<TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Preference.AI.GenerateSubjectPrompt}"/>
|
|
|
|
<TextBox Height="120"
|
|
|
|
Margin="0,4,0,0"
|
|
|
|
CornerRadius="3"
|
|
|
|
VerticalContentAlignment="Top"
|
|
|
|
Text="{Binding GenerateSubjectPrompt, Mode=TwoWay}"
|
|
|
|
AcceptsReturn="true"
|
|
|
|
TextWrapping="Wrap"/>
|
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</ContentControl.DataTemplates>
|
|
|
|
</ContentControl>
|
|
|
|
</Grid>
|
2024-03-14 03:23:36 -07:00
|
|
|
</TabItem>
|
|
|
|
</TabControl>
|
2024-10-23 18:31:05 -07:00
|
|
|
</Border>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
2024-06-12 20:54:10 -07:00
|
|
|
</v:ChromelessWindow>
|