Files
KeyKeeper/src/KeyKeeper/Views/EntryEditWindow.axaml
2026-02-28 23:00:04 +03:00

61 lines
2.6 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:KeyKeeper.ViewModels"
x:Class="KeyKeeper.Views.EntryEditWindow"
Title="Add Entry"
CanResize="False"
Width="540"
Height="300"
Background="White">
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto" ColumnDefinitions="*,*" Margin="5">
<TextBlock Text="Add New Password Entry" FontSize="20" HorizontalAlignment="Center"
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"/>
<TextBlock Text="Entry name:" HorizontalAlignment="Right"
Grid.Row="1" Grid.Column="0" Margin="5" />
<TextBox Name="EntryNameEdit" Grid.Row="1" Grid.Column="1" Margin="5" />
<TextBlock Text="Username:" HorizontalAlignment="Right"
Grid.Row="2" Grid.Column="0" Margin="5" />
<TextBox Name="UsernameEdit" Grid.Row="2" Grid.Column="1" Margin="5" />
<TextBlock Text="Password:" HorizontalAlignment="Right"
Grid.Row="3" Grid.Column="0" Margin="5" />
<!-- Êîíòåéíåð äëÿ ïîëÿ ïàðîëÿ è èíäèêàòîðà -->
<Grid Grid.Row="3" Grid.Column="1" Margin="5" RowDefinitions="Auto,Auto">
<TextBox Name="PasswordEdit" Grid.Row="0" PasswordChar="*" />
<!-- Èíäèêàòîð íàäåæíîñòè ïàðîëÿ -->
<Border Name="PasswordStrengthIndicator" Grid.Row="1"
Height="4" CornerRadius="2" Margin="0,3,0,0"
Background="#ddd">
<Border Name="PasswordStrengthFill"
Width="0" Height="4"
HorizontalAlignment="Left"
CornerRadius="2" />
</Border>
</Grid>
<Button Content="Add!" HorizontalAlignment="Center"
Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2"
Background="#aaa" Click="AddButton_Click" />
</Grid>
<Window.Styles>
<Style Selector="TextBlock">
<Setter Property="Foreground" Value="Black" />
</Style>
<Style Selector="TextBox">
<Setter Property="Foreground" Value="Black" />
</Style>
<Style Selector="Button /template/ ContentPresenter">
<Setter Property="Foreground" Value="Black" />
</Style>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Foreground" Value="Black" />
<Setter Property="Background" Value="#ccc" />
</Style>
</Window.Styles>
</Window>