encyption wip
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
@@ -55,14 +54,25 @@ public partial class App : Application
|
||||
{
|
||||
args.AddServices(services =>
|
||||
{
|
||||
services.AddTransient<IEncryptor, AesEncryptor>();
|
||||
services.AddTransient<IDecryptor, AesDecryptor>();
|
||||
|
||||
services.AddTransient<IPasswordHasher, PasswordHasher>();
|
||||
services.AddTransient<IKeyDeriver, KeyDeriver>();
|
||||
|
||||
services.AddDbContextFactory<VaultDbContext>(args =>
|
||||
{
|
||||
args.UseSqlite();
|
||||
});
|
||||
|
||||
services.AddDbContextFactory<VaultDbContext>();
|
||||
services.AddHandler<VaultStorageHandler>();
|
||||
|
||||
services.AddHandler<OpenVaultHandler>();
|
||||
|
||||
services.AddHandler<CreateVaultStorageHandler>();
|
||||
services.AddHandler<OpenVaultStorageHandler>();
|
||||
|
||||
services.AddTemplate<VaultNavigationViewModel, VaultNavigationView>();
|
||||
services.AddTemplate<AllNavigationViewModel, AllNavigationView>();
|
||||
services.AddTemplate<StarredNavigationViewModel, StarredNavigationView>();
|
||||
services.AddTemplate<CategoriesNavigationViewModel, CategoriesNavigationView>();
|
||||
@@ -74,15 +84,13 @@ public partial class App : Application
|
||||
})!);
|
||||
|
||||
services.AddSingleton<IVaultHostCollection, VaultHostCollection>();
|
||||
services.AddHandler<VaultHandler>();
|
||||
services.AddHandler<CreateVaultHandler>();
|
||||
|
||||
//services.AddInitializer<VaultsInitializer>();
|
||||
services.AddInitializer<VaultCollectionInitializer>();
|
||||
|
||||
services.AddTemplate<MainViewModel, MainView>("Main");
|
||||
|
||||
services.AddTemplate<VaultNavigationViewModel, VaultNavigationView>();
|
||||
services.AddHandler<VaultNavigationViewModelHandler>();
|
||||
|
||||
services.AddTransient<FooterViewModel>();
|
||||
|
||||
services.AddTemplate<ManageNavigationViewModel, ManageNavigationView>();
|
||||
|
||||
@@ -12,7 +12,15 @@
|
||||
Margin="0,0,0,18"
|
||||
Text="{Binding Name}"
|
||||
Watermark="Enter vault name" />
|
||||
<TextBox Margin="0,0,0,18" Watermark="Enter password" />
|
||||
<TextBox Watermark="Confirm password" />
|
||||
<TextBox
|
||||
Margin="0,0,0,18"
|
||||
Classes="revealPasswordButton"
|
||||
PasswordChar="●"
|
||||
Text="{Binding Password}"
|
||||
Watermark="Enter password" />
|
||||
<TextBox
|
||||
Classes="revealPasswordButton"
|
||||
PasswordChar="●"
|
||||
Watermark="Confirm password" />
|
||||
</StackPanel>
|
||||
</ContentDialog>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.LockView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:LockViewModel">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBox
|
||||
Width="300"
|
||||
Classes="revealPasswordButton"
|
||||
PasswordChar="●">
|
||||
PasswordChar="●"
|
||||
Text="{Binding Password}">
|
||||
<Interaction.Behaviors>
|
||||
<KeyBindingTriggerBehavior Gesture="Enter">
|
||||
<NavigateAction Context="Main" Route="Vault" />
|
||||
</KeyBindingTriggerBehavior>
|
||||
<KeyBindingTriggerBehavior Gesture="Enter">
|
||||
<InvokeCommandAction Command="{Binding UnlockCommand}" />
|
||||
</KeyBindingTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user