-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEditorWindow.xaml
85 lines (76 loc) · 5.68 KB
/
EditorWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<Window x:Class="Flow.Launcher.Plugin.OneTimePassword.EditorWindow"
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:vm="clr-namespace:Flow.Launcher.Plugin.OneTimePassword" Title="{DynamicResource flowlauncher_plugin_otp_editor_title}" Width="550" Background="{DynamicResource PopupBGColor}" Foreground="{DynamicResource PopupTextColor}" ResizeMode="NoResize" SizeToContent="Height" WindowStartupLocation="CenterScreen" d:DataContext="{d:DesignInstance vm:EditorWindowViewModel}" mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Grid.Column="4" Click="OnCancel" Style="{StaticResource TitleBarCloseButtonStyle}">
<Path Width="46" Height="32" Data="M 18,11 27,20 M 18,20 27,11" Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>
<StackPanel Margin="26,12,26,12">
<Grid>
<StackPanel Orientation="Horizontal">
<Grid x:Name="Grid" Width="500">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Margin="10,10,15,10" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" Text="{DynamicResource flowlauncher_plugin_otp_editor_form_uri_label}" />
<TextBox Grid.Row="0" Grid.Column="1" Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Uri, Mode=TwoWay}" />
<TextBlock Grid.Row="1" Grid.Column="1" Margin="10,-10,0,0" Foreground="{DynamicResource TextControlPlaceholderForeground}" Text="{DynamicResource flowlauncher_plugin_otp_editor_form_uri_tooltip}" />
<TextBlock Grid.Row="2" Grid.Column="0" Margin="10,10,15,10" HorizontalAlignment="Stretch" VerticalAlignment="Center" FontSize="14" Text="{DynamicResource flowlauncher_plugin_otp_editor_form_label_label}" />
<TextBox Grid.Row="2" Grid.Column="1" Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Label, Mode=TwoWay}" />
<TextBlock Grid.Row="3" Grid.Column="0" Margin="10,10,15,10" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" Text="{DynamicResource flowlauncher_plugin_otp_editor_form_icon_label}" />
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal" Margin="10">
<Button Height="35" VerticalAlignment="Center" Click="OnSelectIcon" Content="{DynamicResource flowlauncher_plugin_otp_editor_form_icon_button}" />
<Image x:Name="OtpIcon" Width="24" Height="24" Margin="15,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</StackPanel>
</StackPanel>
<Border Grid.Row="1" Background="{DynamicResource PopupButtonAreaBGColor}" BorderBrush="{DynamicResource PopupButtonAreaBorderColor}" BorderThickness="0,1,0,0">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Button MinWidth="140" Margin="10,0,5,0" Click="OnCancel" Content="{DynamicResource flowlauncher_plugin_otp_editor_cancel_button}" />
<Button MinWidth="140" Margin="5,0,10,0" Click="OnConfirm" Content="{DynamicResource flowlauncher_plugin_otp_editor_confirm_button}" Style="{DynamicResource AccentButtonStyle}" />
</StackPanel>
</Border>
</Grid>
</Window>