Skip to content

Commit

Permalink
Add "Save" option to PKCS#11 key store user's password
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxhy committed Feb 8, 2024
1 parent 2fddf21 commit a86be25
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,27 @@
<ComboBox Grid.Row="3" Grid.Column="0" ItemsSource="{Binding UserTypes}" SelectedItem="{Binding PKCS11Properties.User}"
materialDesign:HintAssist.HelperText="{x:Static properties:Resources.UserHelper}"
materialDesign:HintAssist.Hint="{x:Static properties:Resources.User}" Margin="5,5,5,5" />
<PasswordBox Grid.Row="3" Grid.Column="1" materialDesign:HintAssist.HelperText="{x:Static properties:Resources.UserPINHelper}"
materialDesign:HintAssist.Hint="{x:Static properties:Resources.UserPIN}"
materialDesign:TextFieldAssist.HasClearButton="True"
Style="{StaticResource MaterialDesignFloatingHintRevealPasswordBox}"
materialDesign:PasswordBoxAssist.Password="{Binding Properties.Secret, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<DockPanel Grid.Row="3" Grid.Column="1">
<StackPanel DockPanel.Dock="Right">
<ToggleButton IsChecked="{Binding Properties.StoreSecret, Mode=TwoWay}"
Style="{StaticResource MaterialDesignSwitchToggleButton}"
ToolTip="{x:Static properties:Resources.StoreSecret}"
Width="35" Margin="2">
<materialDesign:PackIcon Kind="ContentSave" RenderTransformOrigin=".5,.5">
<materialDesign:PackIcon.RenderTransform>
<RotateTransform Angle="45" />
</materialDesign:PackIcon.RenderTransform>
</materialDesign:PackIcon>
<materialDesign:ToggleButtonAssist.OnContent>
<materialDesign:PackIcon Kind="ContentSave" />
</materialDesign:ToggleButtonAssist.OnContent>
</ToggleButton>
</StackPanel>
<PasswordBox materialDesign:HintAssist.HelperText="{x:Static properties:Resources.UserPINHelper}"
materialDesign:HintAssist.Hint="{x:Static properties:Resources.UserPIN}"
materialDesign:TextFieldAssist.HasClearButton="True"
Style="{StaticResource MaterialDesignFloatingHintRevealPasswordBox}"
materialDesign:PasswordBoxAssist.Password="{Binding Properties.Secret, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</DockPanel>
</Grid>
</UserControl>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<data name="SlotFilterTypeHelper" xml:space="preserve">
<value>Filtre de sélection du slot</value>
</data>
<data name="StoreSecret" xml:space="preserve">
<value>Enregistrer</value>
</data>
<data name="User" xml:space="preserve">
<value>Utilisateur</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<data name="SlotFilterTypeHelper" xml:space="preserve">
<value>Filter for slot selection</value>
</data>
<data name="StoreSecret" xml:space="preserve">
<value>Save</value>
</data>
<data name="User" xml:space="preserve">
<value>User</value>
</data>
Expand Down

0 comments on commit a86be25

Please sign in to comment.