mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-04-22 15:36:29 +03:00
add password entry field and button to unlock screen
This commit is contained in:
@@ -52,7 +52,18 @@
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:LockedRepositoryViewModel}">
|
||||
|
||||
<StackPanel Margin="20"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<TextBox x:Name="UnlockPasswordEdit"
|
||||
PasswordChar="*"
|
||||
Width="450" />
|
||||
|
||||
<Button x:Name="UnlockButton"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="Black"
|
||||
Content="Unlock!" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</Window.DataTemplates>
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ public class RepositoryWindowViewModel : ViewModelBase
|
||||
|
||||
private void UpdateLockStatus()
|
||||
{
|
||||
if (currentPage is LockedRepositoryViewModel && !passStore.Locked)
|
||||
if ((currentPage == null || currentPage is LockedRepositoryViewModel) && !passStore.Locked)
|
||||
SwitchToUnlocked();
|
||||
else if (currentPage is UnlockedRepositoryViewModel && passStore.Locked)
|
||||
else if ((currentPage == null || currentPage is UnlockedRepositoryViewModel) && passStore.Locked)
|
||||
SwitchToLocked();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user