Added group for the right side panel and improved get post patch delete ui for requests
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
</Storyboard>
|
||||
|
||||
<local:ItemToListConverter x:Key="ItemToListConverter" />
|
||||
<local:UpperCaseConverter x:Key="UpperCaseConverter" />
|
||||
|
||||
<DataTemplate x:Key="ConnectionTemplate"
|
||||
DataType="{x:Type local:ConnectionViewModel}">
|
||||
@@ -590,8 +591,8 @@
|
||||
|
||||
<Border HorizontalAlignment="Right"
|
||||
MinWidth="200"
|
||||
MaxWidth="300"
|
||||
MaxHeight="500"
|
||||
MaxWidth="350"
|
||||
MaxHeight="600"
|
||||
Padding="7"
|
||||
Margin="10"
|
||||
CornerRadius="3"
|
||||
@@ -612,34 +613,102 @@
|
||||
FontWeight="Bold"
|
||||
DockPanel.Dock="Top" />
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding Calculator.OperationsMenu.AvailableOperations}"
|
||||
Focusable="False">
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style>
|
||||
<Setter Property="FrameworkElement.Margin"
|
||||
Value="5" />
|
||||
<Setter Property="FrameworkElement.HorizontalAlignment"
|
||||
Value="Left" />
|
||||
<Setter Property="FrameworkElement.Cursor"
|
||||
Value="Hand" />
|
||||
<Setter Property="FrameworkElement.ToolTip"
|
||||
Value="Drag and drop into the editor" />
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:OperationViewModel}">
|
||||
<nodify:Node Content="{Binding Title}"
|
||||
Input="{Binding Input}"
|
||||
Output="{Binding Output}"
|
||||
BorderBrush="{StaticResource AnimatedBrush}"
|
||||
BorderThickness="2"
|
||||
MouseMove="OnNodeDrag"
|
||||
Focusable="True"
|
||||
KeyboardNavigation.TabNavigation="None">
|
||||
</nodify:Node>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<StackPanel>
|
||||
<!-- System nodes (non-API) -->
|
||||
<ItemsControl ItemsSource="{Binding Calculator.OperationsMenu.SystemNodes}"
|
||||
Focusable="False">
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style>
|
||||
<Setter Property="FrameworkElement.Margin" Value="5" />
|
||||
<Setter Property="FrameworkElement.HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="FrameworkElement.Cursor" Value="Hand" />
|
||||
<Setter Property="FrameworkElement.ToolTip" Value="Drag and drop into the editor" />
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:OperationViewModel}">
|
||||
<nodify:Node Content="{Binding Title}"
|
||||
Input="{Binding Input}"
|
||||
Output="{Binding Output}"
|
||||
BorderBrush="{StaticResource AnimatedBrush}"
|
||||
BorderThickness="2"
|
||||
MouseMove="OnNodeDrag"
|
||||
Focusable="True"
|
||||
KeyboardNavigation.TabNavigation="None">
|
||||
</nodify:Node>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<!-- Grouped Swagger API operations -->
|
||||
<ItemsControl ItemsSource="{Binding Calculator.OperationsMenu.GroupedSwaggerOperations}"
|
||||
Focusable="False">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Expander IsExpanded="True" Margin="0 6 0 0">
|
||||
<Expander.Header>
|
||||
<TextBlock Text="{Binding GroupName}"
|
||||
FontWeight="Bold"
|
||||
FontSize="15"
|
||||
Foreground="{DynamicResource ForegroundBrush}" />
|
||||
</Expander.Header>
|
||||
<ItemsControl ItemsSource="{Binding Operations}" Focusable="False" Margin="4 2 0 0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Margin="2 3" Padding="5 4" CornerRadius="4"
|
||||
Cursor="Hand"
|
||||
MouseMove="OnSwaggerItemDrag"
|
||||
ToolTip="Drag and drop into the editor"
|
||||
Tag="{Binding}">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="{DynamicResource BackgroundColor}" Opacity="0.5" />
|
||||
</Border.Background>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Border CornerRadius="3" Padding="6 2" Margin="0 0 6 0" MinWidth="50"
|
||||
HorizontalAlignment="Left">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="#61AFFE" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding OPType}" Value="post">
|
||||
<Setter Property="Background" Value="#49CC90" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding OPType}" Value="put">
|
||||
<Setter Property="Background" Value="#FCA130" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding OPType}" Value="delete">
|
||||
<Setter Property="Background" Value="#F93E3E" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding OPType}" Value="patch">
|
||||
<Setter Property="Background" Value="#50E3C2" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock FontWeight="Bold" Foreground="White"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Text" Value="{Binding OPType, Converter={StaticResource UpperCaseConverter}}" />
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
<TextBlock Text="{Binding Title}"
|
||||
Foreground="{DynamicResource ForegroundBrush}"
|
||||
VerticalAlignment="Center"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
MaxWidth="220" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Expander>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
Reference in New Issue
Block a user