242 lines
10 KiB
XML
242 lines
10 KiB
XML
<ContentDialog
|
|
x:Class="FluentTerminal.App.Dialogs.SshInfoDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:enums="using:FluentTerminal.Models.Enums"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:profiles="using:FluentTerminal.App.ViewModels.Profiles"
|
|
xmlns:views="using:FluentTerminal.App.Views"
|
|
x:Uid="SshInfoDialog"
|
|
Title="SSH Info"
|
|
d:DataContext="{d:DesignInstance profiles:SshConnectViewModel,
|
|
IsDesignTimeCreatable=False}"
|
|
DefaultButton="Primary"
|
|
PrimaryButtonClick="OnPrimaryButtonClick"
|
|
mc:Ignorable="d">
|
|
|
|
<ContentDialog.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<views:TemplateSelectors />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</ContentDialog.Resources>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Width="500" Orientation="Vertical">
|
|
|
|
<Grid Margin="4,8,4,0" HorizontalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Row -->
|
|
<TextBox
|
|
x:Name="UserTextBox"
|
|
x:Uid="UserTextBox"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Width="140"
|
|
PlaceholderText="user"
|
|
Text="{x:Bind ViewModel.Username, Mode=TwoWay}" />
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
FontSize="22"
|
|
Text="@" />
|
|
<TextBox
|
|
x:Name="HostTextBox"
|
|
x:Uid="HostTextBox"
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
PlaceholderText="host"
|
|
Text="{x:Bind ViewModel.Host, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="3"
|
|
Margin="2,0,0,0"
|
|
FontSize="22"
|
|
Text=":" />
|
|
<TextBox
|
|
x:Uid="PortTextBox"
|
|
Grid.Row="0"
|
|
Grid.Column="4"
|
|
HorizontalAlignment="Stretch"
|
|
BeforeTextChanging="Port_OnBeforeTextChanging"
|
|
PlaceholderText="port"
|
|
Text="{x:Bind ViewModel.SshPort, Mode=TwoWay}" />
|
|
|
|
<!-- Row -->
|
|
<TextBox
|
|
x:Uid="IdentityFileTextBox"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
Margin="0,8,0,0"
|
|
IsReadOnly="False"
|
|
PlaceholderText="Identity file path"
|
|
Text="{x:Bind ViewModel.IdentityFile, Mode=TwoWay}" />
|
|
<Button
|
|
x:Uid="BrowseButton"
|
|
Grid.Row="1"
|
|
Grid.Column="4"
|
|
Margin="0,8,0,0"
|
|
HorizontalAlignment="Stretch"
|
|
Command="{x:Bind BrowseIdentityFileCommand}"
|
|
Content="Browse" />
|
|
|
|
<!-- Row -->
|
|
<CheckBox
|
|
x:Uid="UseMoshCheckBox"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="5"
|
|
Margin="0,8,0,0"
|
|
Content="Use Mosh"
|
|
IsChecked="{x:Bind ViewModel.UseMosh, Mode=TwoWay}" />
|
|
|
|
</Grid>
|
|
|
|
<controls:Expander
|
|
x:Uid="AdvancedExpander"
|
|
Margin="4,10,4,0"
|
|
Padding="0,10,0,10"
|
|
HorizontalContentAlignment="Stretch"
|
|
Header="Advanced"
|
|
IsExpanded="False">
|
|
<Grid Margin="5,20,5,20">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="8" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Row -->
|
|
<TextBlock
|
|
x:Uid="MoshPorts"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="0,8,8,0"
|
|
VerticalAlignment="Center"
|
|
Text="Mosh ports:"
|
|
Visibility="{x:Bind ViewModel.UseMosh, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
|
|
<TextBox
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="0,8,0,0"
|
|
VerticalAlignment="Center"
|
|
BeforeTextChanging="Port_OnBeforeTextChanging"
|
|
Text="{x:Bind ViewModel.MoshPortFrom, Mode=TwoWay}"
|
|
Visibility="{x:Bind ViewModel.UseMosh, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Margin="2,8,0,0"
|
|
VerticalAlignment="Center"
|
|
Text=":"
|
|
Visibility="{x:Bind ViewModel.UseMosh, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
|
|
<TextBox
|
|
Grid.Row="0"
|
|
Grid.Column="3"
|
|
Margin="0,8,0,0"
|
|
VerticalAlignment="Center"
|
|
BeforeTextChanging="Port_OnBeforeTextChanging"
|
|
Text="{x:Bind ViewModel.MoshPortTo, Mode=TwoWay}"
|
|
Visibility="{x:Bind ViewModel.UseMosh, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
|
|
|
|
<!-- Row -->
|
|
<TextBlock
|
|
x:Uid="SshInfoDialog_TabColor"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="0,8,8,0"
|
|
VerticalAlignment="Center"
|
|
Text="Tab color:" />
|
|
<ComboBox
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="3"
|
|
Margin="0,8,0,0"
|
|
HorizontalAlignment="Stretch"
|
|
ItemTemplateSelector="{StaticResource TabThemeTemplateSelector}"
|
|
ItemsSource="{x:Bind ViewModel.TabThemes, Mode=OneWay}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedTabTheme, Mode=TwoWay}" />
|
|
|
|
<!-- Row -->
|
|
<TextBlock
|
|
x:Uid="Theme"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Margin="0,8,8,0"
|
|
VerticalAlignment="Center"
|
|
Text="Theme:" />
|
|
<ComboBox
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="3"
|
|
Margin="0,8,0,0"
|
|
HorizontalAlignment="Stretch"
|
|
ItemTemplateSelector="{StaticResource TerminalThemeTemplateSelector}"
|
|
ItemsSource="{x:Bind ViewModel.TerminalThemes, Mode=OneWay}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedTerminalTheme, Mode=TwoWay}" />
|
|
|
|
<!-- Row -->
|
|
<CheckBox
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Margin="0,8,0,0"
|
|
Content="{x:Bind Converter={StaticResource I18NConverter}, ConverterParameter=UseConPty}"
|
|
IsChecked="{x:Bind ViewModel.UseConPty, Mode=TwoWay}" />
|
|
|
|
<!-- Row -->
|
|
<CheckBox
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Margin="0,8,0,0"
|
|
Content="{x:Bind Converter={StaticResource I18NConverter}, ConverterParameter=UseBuffer}"
|
|
IsChecked="{x:Bind ViewModel.UseBuffer, Mode=TwoWay}" />
|
|
|
|
</Grid>
|
|
</controls:Expander>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button
|
|
x:Uid="SaveShortcutButton"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="0,10,4,0"
|
|
HorizontalAlignment="Stretch"
|
|
Command="{x:Bind SaveLinkCommand}"
|
|
Content="Save Shortcut" />
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</ContentDialog> |