1fc7792cd1
Rename ConfigManager to ConfigManager.Ui to match the Core/CLI/UI project structure, and split the monolithic test project into Core.Tests, Cli.Tests, and Ui.Tests to align with the source project organization.
79 lines
3.8 KiB
XML
79 lines
3.8 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:JdeScoping.ConfigManager.Ui.ViewModels.Dialogs"
|
|
x:Class="JdeScoping.ConfigManager.Ui.Views.Dialogs.SecretEditDialog"
|
|
x:DataType="vm:SecretEditDialogViewModel"
|
|
Title="{Binding DialogTitle}"
|
|
Width="500" Height="320"
|
|
MinWidth="400" MinHeight="280"
|
|
Background="#151920"
|
|
WindowStartupLocation="CenterOwner"
|
|
CanResize="False"
|
|
ShowInTaskbar="False">
|
|
|
|
<DockPanel>
|
|
<!-- Header -->
|
|
<Border DockPanel.Dock="Top" Background="#1C2128" Padding="24,16"
|
|
BorderBrush="#2D3540" BorderThickness="0,0,0,1">
|
|
<TextBlock Text="{Binding DialogTitle}"
|
|
Foreground="#E6EDF5" FontSize="18" FontWeight="SemiBold"/>
|
|
</Border>
|
|
|
|
<!-- Footer -->
|
|
<Border DockPanel.Dock="Bottom" Background="#1C2128" Padding="24,16"
|
|
BorderBrush="#2D3540" BorderThickness="0,1,0,0">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="8">
|
|
<Button Content="Cancel" Click="CancelButton_Click"
|
|
Background="Transparent" BorderBrush="#3D4550"
|
|
Foreground="#9BA8B8" Padding="16,8" MinWidth="80"/>
|
|
<Button Content="Save" Click="SaveButton_Click"
|
|
IsEnabled="{Binding IsValid}"
|
|
Background="#5C9AFF" Foreground="#0D0F12"
|
|
Padding="16,8" FontWeight="Medium" MinWidth="80"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Content -->
|
|
<Grid Background="#151920" Margin="24,16" RowDefinitions="Auto,*,Auto">
|
|
<!-- Key -->
|
|
<Border Grid.Row="0" Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
|
|
CornerRadius="4" Padding="16" Margin="0,0,0,16">
|
|
<Grid ColumnDefinitions="80,*">
|
|
<TextBlock Text="Key:" Foreground="#9BA8B8"
|
|
VerticalAlignment="Center" Margin="0,0,16,0"/>
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding Key, Mode=TwoWay}"
|
|
IsEnabled="{Binding IsKeyEditable}"
|
|
Watermark="Enter secret key..."
|
|
Background="#0D0F12" Foreground="#E6EDF5"
|
|
BorderBrush="#3D4550" Padding="8"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Value -->
|
|
<Border Grid.Row="1" Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
|
|
CornerRadius="4" Padding="16">
|
|
<Grid ColumnDefinitions="80,*">
|
|
<TextBlock Text="Value:" Foreground="#9BA8B8"
|
|
VerticalAlignment="Top" Margin="0,8,16,0"/>
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding Value, Mode=TwoWay}"
|
|
TextWrapping="Wrap"
|
|
AcceptsReturn="True"
|
|
Watermark="Enter secret value..."
|
|
Background="#0D0F12" Foreground="#E6EDF5"
|
|
BorderBrush="#3D4550" Padding="8"
|
|
MinHeight="80"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Validation Error -->
|
|
<TextBlock Grid.Row="2"
|
|
Text="{Binding ValidationError}"
|
|
Foreground="#FF6B6B" FontSize="12"
|
|
IsVisible="{Binding ValidationError, Converter={StaticResource StringToBool}}"
|
|
Margin="0,8,0,0"/>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Window>
|