mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-09-25 12:22:09 +00:00
e86af675ad
* Add logic to sort identities in the main identity list * Add column headers to sortable identity fields * Modify Identity Item renderer to use a grid to line up with main list column headers * Add sort option and direction to settings * Update sort logic to allow for ascending/descending sort - Remove sort option from view state and just read directly from settings - Add header separator to column headers - Add Unicode arrows to indicate current sort direction - Move repeated column header fields to style * Refactor sort UI to use arrows indicating sort direction Use shared size group between main window and identity item for name/status/services columns, use grid rows and column defs to possibly clean up header margins * Update sort indicator from main window constructor so indicator is always present Shift name column header to left * Move main view model to new file, move sort logic to vm, bind sort ui to vm tweak column header style
564 lines
35 KiB
XML
564 lines
35 KiB
XML
<!--
|
|
Copyright NetFoundry Inc.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<Window x:Class="ZitiDesktopEdge.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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:local="clr-namespace:ZitiDesktopEdge"
|
|
xmlns:debug="clr-namespace:Ziti.Desktop.Edge.Views.Screens"
|
|
xmlns:i="clr-namespace:Lada.Windows.Input;assembly=WpfMouseWheelLib"
|
|
mc:Ignorable="d"
|
|
ShowInTaskbar="False"
|
|
x:Name="MainUI"
|
|
Title="Ziti Desktop Edge"
|
|
Width="{StaticResource MaxWindowWidth}"
|
|
MaxWidth="{StaticResource MaxWindowWidth}"
|
|
ResizeMode="NoResize"
|
|
ClipToBounds="False"
|
|
Icon="Assets/Images/icon.png" AllowsTransparency="True"
|
|
Closing="Window_Closing"
|
|
i:MouseWheel.Enhanced="True"
|
|
i:MouseWheel.LogicalScrollDebouncing="Auto"
|
|
i:MouseWheel.LogicalScrollIncrement="1"
|
|
i:MouseWheel.ScrollMode="Auto"
|
|
PreviewMouseDown="MainUI_PreviewMouseDown"
|
|
WindowStyle="None" Loaded="MainWindow_Loaded" Background="#000F0F23"
|
|
>
|
|
<Window.Resources>
|
|
<Style TargetType="Image">
|
|
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
|
|
</Style>
|
|
<SolidColorBrush x:Key="ProgressBar.Progress" Color="#FF06B025"/>
|
|
<SolidColorBrush x:Key="ProgressBar.Background" Color="#FFE6E6E6"/>
|
|
<SolidColorBrush x:Key="ProgressBar.Border" Color="#FFBCBCBC"/>
|
|
<Style TargetType="{x:Type ProgressBar}">
|
|
<Setter Property="Foreground" Value="{StaticResource ProgressBar.Progress}"/>
|
|
<Setter Property="Background" Value="{StaticResource ProgressBar.Background}"/>
|
|
<Setter Property="BorderBrush" Value="{StaticResource ProgressBar.Border}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ProgressBar}">
|
|
<Grid x:Name="TemplateRoot">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Determinate"/>
|
|
<VisualState x:Name="Indeterminate">
|
|
<Storyboard RepeatBehavior="Forever">
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Animation">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0.25"/>
|
|
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25"/>
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25"/>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="Animation">
|
|
<EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5"/>
|
|
<EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5"/>
|
|
<EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5"/>
|
|
</PointAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="5" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
|
|
<Rectangle x:Name="PART_Track"/>
|
|
<Grid x:Name="PART_Indicator" ClipToBounds="true" HorizontalAlignment="Left">
|
|
<Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}"/>
|
|
<Rectangle x:Name="Animation" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
|
<Rectangle.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform/>
|
|
<SkewTransform/>
|
|
<RotateTransform/>
|
|
<TranslateTransform/>
|
|
</TransformGroup>
|
|
</Rectangle.RenderTransform>
|
|
</Rectangle>
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="Orientation" Value="Vertical">
|
|
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
|
<Setter.Value>
|
|
<RotateTransform Angle="-90"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="IsIndeterminate" Value="true">
|
|
<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="SortLabelStyle" TargetType="Label">
|
|
<Setter Property="Foreground" Value="{StaticResource ColumnHeaderTextBrush}"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Padding" Value="0,4"/>
|
|
<Setter Property="Typography.Capitals" Value="AllSmallCaps"/>
|
|
</Style>
|
|
<Style x:Key="HeaderStackPanelStyle" TargetType="StackPanel">
|
|
<Setter Property="Orientation" Value="Horizontal"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
</Style>
|
|
<Style x:Key="SortArrowStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="10"/>
|
|
<Setter Property="Margin" Value="4,0,0,0"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Foreground" Value="{StaticResource ColumnHeaderTextBrush}"/>
|
|
</Style>
|
|
<ControlTemplate x:Key="AddIdentityContextMenuTemplate" TargetType="MenuItem">
|
|
<Border x:Name="ItemBorder"
|
|
Background="{TemplateBinding Background}"
|
|
Padding="10,10"
|
|
Margin="1,1"
|
|
BorderBrush="#555" BorderThickness="0">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock x:Name="ItemText" Text="{TemplateBinding Header}" VerticalAlignment="Center" Foreground="{StaticResource ContextMenuTextNormalBrush}" FontSize="16" />
|
|
</StackPanel>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="Background" Value="{StaticResource DarkBackgroundBrush}" />
|
|
<Setter TargetName="ItemText" Property="Foreground" Value="{StaticResource ContextMenuTextHoverBrush}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="Background" Value="{StaticResource LightBackgroundBrush}" />
|
|
<Setter TargetName="ItemText" Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Window.Resources>
|
|
<Window.Triggers>
|
|
<EventTrigger RoutedEvent="Window.Loaded">
|
|
<BeginStoryboard>
|
|
<Storyboard Name="FormFade">
|
|
<DoubleAnimation Name="FormFadeAnimation" Storyboard.TargetName="MainUI" Storyboard.TargetProperty="(Window.Opacity)" From="0.0" To="1.0" Duration="0:0:0.5" AutoReverse="False" RepeatBehavior="1x" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
<EventTrigger RoutedEvent="Window.Unloaded">
|
|
<BeginStoryboard>
|
|
<Storyboard Name="FormFadeOut" Completed="FormFadeOut_Completed">
|
|
<DoubleAnimation Name="FormFadeOutAnimation" Storyboard.TargetName="MainUI" Storyboard.TargetProperty="(Window.Opacity)" From="1.0" To="0.0" Duration="0:0:0.5" AutoReverse="False" RepeatBehavior="1x" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</Window.Triggers>
|
|
<Grid x:Name="MainGrid" Margin="0,0,0,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Canvas x:Name="ArrowCanvas" ClipToBounds="False">
|
|
<Rectangle x:Name="Arrow" HorizontalAlignment="Center" Height="20" Fill="#070826" Width="20" ClipToBounds="True" Canvas.Left="185" Canvas.Bottom="-10">
|
|
<Rectangle.LayoutTransform>
|
|
<RotateTransform Angle="-45"/>
|
|
</Rectangle.LayoutTransform>
|
|
</Rectangle>
|
|
</Canvas>
|
|
<Border Margin="10,10,10,10" Name="UIBorder" BorderBrush="Black" BorderThickness="8" CornerRadius="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="15" Direction="1" RenderingBias="Quality" ShadowDepth="1" Opacity="1"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
<Rectangle Margin="10,10,10,10" Name="BgColor" Stroke="Black" RadiusY="10" RadiusX="10" ClipToBounds="True">
|
|
<Rectangle.Fill>
|
|
<ImageBrush ImageSource="/Assets/Images/background.png" />
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<StackPanel x:Name="MainView" Margin="10,10,10,-20" MinHeight="500">
|
|
<Grid HorizontalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="100"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="100"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" Cursor="Hand" Orientation="Vertical" Margin="14,16,14,14" MouseLeftButtonUp="ShowMenu">
|
|
<Image Source="/Assets/Images/hamburger.png" Margin="5,0,0,-4" Width="26" Height="26" HorizontalAlignment="Left">
|
|
<Image.Effect>
|
|
<DropShadowEffect Color="white" BlurRadius="1" ShadowDepth="1" Direction="90" Opacity="1" />
|
|
</Image.Effect>
|
|
</Image>
|
|
<Label Content="MAIN" Foreground="White" Height="25" FontSize="10"></Label>
|
|
<Label Content="MENU" Foreground="White" Height="25" Margin="0,-14,0,0" FontSize="10"></Label>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Orientation="Vertical" HorizontalAlignment="Stretch" Margin="0,12">
|
|
<Image Source="/Assets/Images/z.png"
|
|
Height="40"
|
|
RenderOptions.BitmapScalingMode="Fant"
|
|
MouseUp="HandleAttach"
|
|
MouseDown="Window_MouseDown"
|
|
Cursor="ScrollAll"
|
|
ToolTip="Drag to detach/move, right click to reattach"
|
|
/>
|
|
<Label x:Name="ConnectLabel"
|
|
Content="{Binding ConnectLabelContent}"
|
|
d:Content="Tap to Connect"
|
|
Margin="0,-3,0,0"
|
|
FontFamily="pack://application:,,,/Assets/Fonts/#Russo One"
|
|
FontSize="14"
|
|
Foreground="White"
|
|
HorizontalAlignment="Center"
|
|
/>
|
|
</StackPanel>
|
|
<StackPanel x:Name="AddIdAreaButton" Grid.Column="2" Cursor="Hand" Orientation="Vertical" Margin="14,16,14,14" MouseLeftButtonUp="AddIdentityContextMenu">
|
|
<Image Source="/Assets/Images/identity.png" Margin="0,0,5,-4" Width="26" Height="26" HorizontalAlignment="Right">
|
|
<Image.Effect>
|
|
<DropShadowEffect Color="white" BlurRadius="1" ShadowDepth="1" Direction="90" Opacity="1" />
|
|
</Image.Effect>
|
|
</Image>
|
|
<Label Content="ADD" Foreground="White" Height="25" FontSize="10" HorizontalAlignment="Right"></Label>
|
|
<Label Content="IDENTITY" Foreground="White" Height="25" Margin="0,-14,0,0" FontSize="10" HorizontalAlignment="Right"></Label>
|
|
<StackPanel.ContextMenu>
|
|
<ContextMenu>
|
|
<ContextMenu.Template>
|
|
<ControlTemplate TargetType="ContextMenu">
|
|
<Border Background="{StaticResource DarkBackgroundBrush}"
|
|
BorderBrush="Gray"
|
|
BorderThickness="3"
|
|
CornerRadius="10"
|
|
Padding="0">
|
|
<StackPanel>
|
|
<ItemsPresenter />
|
|
</StackPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</ContextMenu.Template>
|
|
|
|
<MenuItem Header="With JWT" Click="AddIdentity_Click"
|
|
Template="{StaticResource AddIdentityContextMenuTemplate}" />
|
|
<MenuItem Header="With URL" Click="WithUrl_Click"
|
|
Template="{StaticResource AddIdentityContextMenuTemplate}" />
|
|
</ContextMenu>
|
|
</StackPanel.ContextMenu>
|
|
|
|
</StackPanel>
|
|
</Grid>
|
|
<Canvas Name="ConnectButton" Cursor="Hand" Width="400" Height="160" MouseUp="StartZitiService" Visibility="Collapsed">
|
|
<Grid Width="{Binding ActualWidth, ElementName=ConnectButton}" Height="140">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="221*"/>
|
|
<ColumnDefinition Width="129*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Image Source="/Assets/Images/connect.png" Height="140" HorizontalAlignment="Center" Grid.ColumnSpan="2" Margin="105,0" />
|
|
</Grid>
|
|
</Canvas>
|
|
<Canvas Name="DisconnectButton" Cursor="Hand" Width="400" Height="160" MouseUp="Disconnect" Visibility="Collapsed">
|
|
<Grid Width="{Binding ActualWidth, ElementName=DisconnectButton}" Height="140">
|
|
<Image Source="/Assets/Images/connected.png" Height="140" HorizontalAlignment="Center" />
|
|
</Grid>
|
|
<Grid Width="{Binding ActualWidth, ElementName=DisconnectButton}" Height="140">
|
|
<Label Name="ConnectedTime" HorizontalAlignment="Center" Content="00:00:00" Foreground="White" Padding="0,90,0,0"/>
|
|
</Grid>
|
|
<Grid Width="{Binding ActualWidth, ElementName=DisconnectButton}" Height="140">
|
|
<Label HorizontalAlignment="Center" Content="STOP" Foreground="White" Padding="0,105,0,0"/>
|
|
</Grid>
|
|
</Canvas>
|
|
<Grid x:Name="StatArea" HorizontalAlignment="Stretch" Width="Auto" Margin="0,30,0,0" Visibility="Collapsed">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" Orientation="Vertical">
|
|
<Grid HorizontalAlignment="Stretch" Width="Auto">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="40"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Grid.Column="0" Content="Download Speed" Foreground="White" HorizontalAlignment="Right" FontSize="14" ></Label>
|
|
<Image Grid.Column="1" Source="/Assets/Images/down.png" Width="20" HorizontalAlignment="Left" Height="20"></Image>
|
|
</Grid>
|
|
<Label Name="DownloadSpeed" Margin="0,-16,0,0" Foreground="#0069FF" Content="0" FontSize="40" HorizontalAlignment="Center" />
|
|
<Label Name="DownloadSpeedLabel" Foreground="White" Margin="0,-20,0,30" Content="KBps" FontSize="11" HorizontalAlignment="Center" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Orientation="Vertical">
|
|
<Grid HorizontalAlignment="Stretch" Width="Auto">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="50"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Grid.Column="0" Content="Upload Speed" Foreground="White" HorizontalAlignment="Right" FontSize="14" ></Label>
|
|
<Image Grid.Column="1" Source="/Assets/Images/up.png" Width="20" HorizontalAlignment="Left" Height="20"></Image>
|
|
</Grid>
|
|
<Label Name="UploadSpeed" Margin="0,-16,0,0" Foreground="#FF0047" Content="0" FontSize="40" HorizontalAlignment="Center" />
|
|
<Label Name="UploadSpeedLabel" Foreground="White" Margin="0,-20,0,30" Content="KBps" FontSize="11" HorizontalAlignment="Center" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Grid HorizontalAlignment="Stretch" Margin="0,8,0,8" Grid.IsSharedSizeScope="True">
|
|
<!-- Mock the grid definitions for identity items so the headers align with list items -->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="6"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="6"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="30"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Grid.Column="0" Grid.Row="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="70" SharedSizeGroup="Status"/>
|
|
<ColumnDefinition Width="*" SharedSizeGroup="Name"/>
|
|
<ColumnDefinition Width="80" SharedSizeGroup="Services"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" Style="{StaticResource HeaderStackPanelStyle}" MouseDown="SortByStatus_Click">
|
|
<Label x:Name="SortByStatus" Content="Status" Style="{StaticResource SortLabelStyle}"/>
|
|
<TextBlock x:Name="SortByStatusArrow" Style="{StaticResource SortArrowStyle}" Text="{Binding SortArrowText}"
|
|
Visibility="{Binding StatusArrowVisibility}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Style="{StaticResource HeaderStackPanelStyle}" MouseDown="SortByName_Click"
|
|
HorizontalAlignment="Left">
|
|
<Label x:Name="SortByName" Content="Name" Style="{StaticResource SortLabelStyle}"/>
|
|
<TextBlock x:Name="SortByNameArrow" Style="{StaticResource SortArrowStyle}" Text="{Binding SortArrowText}"
|
|
Visibility="{Binding NameArrowVisibility}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2" Style="{StaticResource HeaderStackPanelStyle}" MouseDown="SortByServices_Click">
|
|
<Label x:Name="SortByServices" Content="Services" Style="{StaticResource SortLabelStyle}"/>
|
|
<TextBlock x:Name="SortByServicesArrow" Style="{StaticResource SortArrowStyle}" Text="{Binding SortArrowText}"
|
|
Visibility="{Binding ServicesArrowVisibility}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
<Rectangle Fill="White" Height="1" Opacity="0.1" Grid.ColumnSpan="2" Grid.Row="4" Margin="8,0"/>
|
|
</Grid>
|
|
<ScrollViewer Name="IdListScroller" MinHeight="60" HorizontalScrollBarVisibility="Hidden"
|
|
VerticalScrollBarVisibility="Auto" FocusVisualStyle="{x:Null}" CanContentScroll="True"
|
|
ClipToBounds="True" PanningMode="VerticalOnly" PanningRatio=".1" Grid.Row="1">
|
|
<StackPanel Name="IdList" Orientation="Vertical" IsItemsHost="False"
|
|
LayoutUpdated="IdList_LayoutUpdated" FocusVisualStyle="{x:Null}"/>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
<Grid HorizontalAlignment="Stretch" Margin="0,20,0,10" Width="Auto">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Name="AddIdButton" Padding="0,0,0,0" Grid.Column="0" Margin="0,0,0,0" Content="" Foreground="#0069FF" FontSize="12 " HorizontalAlignment="Center" VerticalAlignment="Center" ></Label>
|
|
</Grid>
|
|
</StackPanel>
|
|
<Canvas x:Name="AlertCanvas" ClipToBounds="False" Visibility="Collapsed">
|
|
<Image Source="/Assets/Images/UpdateWarn.png" Canvas.Left="50" Canvas.Top="32" Width="14" Height="14"></Image>
|
|
</Canvas>
|
|
<!-- Form for debugging -->
|
|
<!--debug:Debugging x:Name="DebugForm" Visibility="Collapsed" /-->
|
|
<!-- Menu UI -->
|
|
<local:MainMenu x:Name="MainMenu" Visibility="Collapsed"></local:MainMenu>
|
|
<!-- ID Detail UI -->
|
|
<local:IdentityDetails x:Name="IdentityMenu"
|
|
Visibility="Collapsed"
|
|
d:Visibility="Visible"
|
|
OnMFAToggled="MFAToggled"
|
|
AuthenticateTOTP="ShowAuthenticate"
|
|
Recovery="ShowRecovery"
|
|
OnLoading="DoLoading"
|
|
OnShowMFA="ShowAuthenticate"
|
|
ShowBlurb="IdentityMenu_ShowBlurb"
|
|
CompleteExternalAuth="CompleteExternalAuthEvent"
|
|
/>
|
|
|
|
<!-- Modal Background -->
|
|
<Rectangle x:Name="ModalBg" MouseDown="Window_MouseDown" Margin="10,10,10,10" Fill="Black" RadiusY="10" RadiusX="10" Opacity="0" Visibility="Collapsed"></Rectangle>
|
|
<!-- MFA Setup Prompt -->
|
|
<local:MFAScreen x:Name="MFASetup" Visibility="Collapsed" Margin="0,0,0,0" OnClose="DoClose"></local:MFAScreen>
|
|
<local:AddIdentityUrl x:Name="AddIdentityByURL"
|
|
Visibility="Collapsed"
|
|
Margin="0,0,0,0"
|
|
OnClose="CloseJoinByUrl"
|
|
Height="Auto"
|
|
OnAddIdentity="OnAddIdentityAction" />
|
|
<local:AddIdentityCA x:Name="AddIdentityBy3rdPartyCA"
|
|
Visibility="Collapsed"
|
|
Margin="0,0,0,0"
|
|
OnClose="CloseJoinByUrl"
|
|
Height="Auto"
|
|
OnAddIdentity="OnAddIdentityAction" />
|
|
|
|
<!-- Small messages screen that opens at the bottom -->
|
|
<Grid x:Name="BlurbArea" Visibility="Collapsed" Height="80" Margin="0,500,0,0" VerticalAlignment="Bottom">
|
|
<Border Margin="10,10,10,10" BorderBrush="Black" BorderThickness="8" CornerRadius="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="20" Direction="1" RenderingBias="Quality" ShadowDepth="1" Opacity="1"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
<Rectangle Margin="10,10,10,10" RadiusX="10" RadiusY="10" ClipToBounds="True">
|
|
<Rectangle.Fill>
|
|
<SolidColorBrush Color="#FFFFFF" Opacity="0.97"/>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<Grid Margin="30,0,30,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="30"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="30"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="60"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Image x:Name="RedBlurb" Source="/Assets/Images/WarningRed.png" Grid.Column="0" Width="30" Grid.Row="1" Height="30" Margin="0,0,0,0"></Image>
|
|
<Image x:Name="InfoBlurb" Visibility="Collapsed" Source="/Assets/Images/Warning.png" Grid.Column="0" Width="30" Grid.Row="1" Height="30" Margin="0,0,0,0"></Image>
|
|
<Label x:Name="Blurb" Content="An Update is available!" MouseUp="BlurbAction" Grid.Column="1" Padding="0,0,0,0" Grid.Row="1" Margin="0,0,0,0" Foreground="#000000" FontSize="12" Cursor="Hand" HorizontalAlignment="Center" VerticalAlignment="Center"></Label>
|
|
<Image Source="/Assets/Images/closeBlack.png" Grid.Column="2" Width="10" Height="10" Grid.Row="1" Margin="0,0,0,0" Cursor="Hand" MouseUp="DoHideBlurb"></Image>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid x:Name="NoServiceView" Visibility="Collapsed" Margin="10,10,10,10">
|
|
<Rectangle RadiusX="10" RadiusY="10">
|
|
<Rectangle.Fill>
|
|
<SolidColorBrush Color="Black" Opacity="0.9"/>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="60"></RowDefinition>
|
|
<RowDefinition Height="30"></RowDefinition>
|
|
<RowDefinition Height="30"></RowDefinition>
|
|
<RowDefinition Height="30"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Label x:Name="ErrorMsg" Foreground="White" Content="Service Not Started" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" />
|
|
<Label x:Name="ErrorMsgDetail" Foreground="LightGray" Content="Start the Ziti Tunnel Service to get started" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" />
|
|
|
|
<Grid Grid.Row="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Button x:Name="CloseErrorButton" Grid.Column="0" Margin="40,0,20,0" Cursor="Hand" BorderThickness="0" Foreground="#FFFFFF" Background="#0068F9" Content="Close Error" Click="CloseError" >
|
|
<Button.Resources>
|
|
<Style TargetType="Border">
|
|
<Setter Property="CornerRadius" Value="5"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
</Button>
|
|
<Button x:Name="QuitButton" Grid.Column="1" Margin="20,0,40,0" Cursor="Hand" BorderThickness="0" Foreground="#FFFFFF" Background="#F4044D" Content="Quit App" Click="CloseApp" >
|
|
<Button.Resources>
|
|
<Style TargetType="Border">
|
|
<Setter Property="CornerRadius" Value="5"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid x:Name="LoadingScreen" MouseDown="Window_MouseDown" Visibility="Collapsed" Margin="10,10,10,10">
|
|
<Rectangle RadiusX="10" RadiusY="10">
|
|
<Rectangle.Fill>
|
|
<SolidColorBrush Color="Black" Opacity="0.9"/>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
</Grid>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="60"></RowDefinition>
|
|
<RowDefinition Height="40"></RowDefinition>
|
|
<RowDefinition Height="10"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Label x:Name="LoadingTitle" Foreground="White" Content="Loading" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" />
|
|
<TextBlock x:Name="LoadingDetails" TextWrapping="WrapWithOverflow" Foreground="LightGray" Padding="10" Text="${x:DefaultLoadText}" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" FontSize="14" />
|
|
<ProgressBar x:Name="LoadProgress" Width="100" Grid.Row="3" IsEnabled="True" />
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid x:Name="ErrorView" MouseDown="Window_MouseDown" Visibility="Collapsed" Margin="10,10,10,10">
|
|
<Rectangle RadiusX="10" RadiusY="10">
|
|
<Rectangle.Fill>
|
|
<SolidColorBrush Color="Black" Opacity="0.9"/>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
</Grid>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="60"></RowDefinition>
|
|
<RowDefinition Height="120"></RowDefinition>
|
|
<RowDefinition Height="30"></RowDefinition>
|
|
<RowDefinition Height="30"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock x:Name="ErrorTitle" TextWrapping="WrapWithOverflow" Width="400" Foreground="White" Text="An Error Occurred" Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" FontSize="24" />
|
|
<StackPanel x:Name="ErrorPanel"
|
|
Grid.Row="2"
|
|
Width="400">
|
|
<TextBlock x:Name="ErrorDetails"
|
|
TextWrapping="WrapWithOverflow" Foreground="LightGray"
|
|
Padding="10"
|
|
Text="An Unknown Error Occurred, you could try restarting the service and the interface to continue"
|
|
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
TextAlignment="Center"
|
|
FontSize="14" />
|
|
</StackPanel>
|
|
<Label Grid.Row="3" Foreground="Gray" FontWeight="Light" Content="Check the Log for Details" HorizontalAlignment="Center"></Label>
|
|
|
|
<Grid Grid.Row="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Grid.Column="0" Margin="40,0,20,0" Cursor="Hand" BorderThickness="0" Foreground="#FFFFFF" Background="#0068F9" Content="Close Error" Click="CloseError" >
|
|
<Button.Resources>
|
|
<Style TargetType="Border">
|
|
<Setter Property="CornerRadius" Value="5"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
</Button>
|
|
<Button Grid.Column="1" Margin="20,0,40,0" Cursor="Hand" BorderThickness="0" Foreground="#FFFFFF" Background="#F4044D" Content="Quit App" Click="CloseApp" >
|
|
<Button.Resources>
|
|
<Style TargetType="Border">
|
|
<Setter Property="CornerRadius" Value="5"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<local:ConfirmationDialog
|
|
x:Name="OverrideKeychain"
|
|
Title="Delete Item?"
|
|
Visibility="Collapsed"
|
|
Description="Are you sure you want to delete this item? This action cannot be undone."
|
|
/>
|
|
</Grid>
|
|
</Window>
|