mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Username is now correctly persisted
Set credentials validation works as intended Getting settings has default values Add parent group in Move searchbox Moving entries work as intended Removed unreferenced code files
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using Windows.Storage.AccessCache;
|
||||
using Windows.Storage.Pickers;
|
||||
using Windows.UI.Xaml;
|
||||
using ModernKeePass.Domain.Dtos;
|
||||
using ModernKeePass.ViewModels;
|
||||
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||
@@ -29,19 +28,14 @@ namespace ModernKeePass.Views
|
||||
SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
|
||||
SuggestedFileName = "New Database"
|
||||
};
|
||||
savePicker.FileTypeChoices.Add("KeePass 2.x database", new List<string> { ".kdbx" });
|
||||
savePicker.FileTypeChoices.Add("KeePass 2.x database", new List<string> {".kdbx"});
|
||||
|
||||
var file = await savePicker.PickSaveFileAsync().AsTask();
|
||||
if (file == null) return;
|
||||
|
||||
var token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
|
||||
var fileInfo = new FileInfo
|
||||
{
|
||||
Id = token,
|
||||
Path = file.Path,
|
||||
Name = file.DisplayName
|
||||
};
|
||||
Model.OpenFile(fileInfo);
|
||||
Model.Token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
|
||||
Model.Name = file.Name;
|
||||
Model.Path = file.Path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,9 @@ namespace ModernKeePass.Views
|
||||
var file = e.Parameter as FileInfo;
|
||||
if (file != null)
|
||||
{
|
||||
Model.OpenFile(file);
|
||||
Model.Path = file.Path;
|
||||
Model.Name = file.Name;
|
||||
Model.Token = file.Id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,14 +48,9 @@ namespace ModernKeePass.Views
|
||||
if (file == null) return;
|
||||
|
||||
// TODO: use service
|
||||
var token = StorageApplicationPermissions.MostRecentlyUsedList.Add(file, file.Path);
|
||||
var fileInfo = new FileInfo
|
||||
{
|
||||
Path = file.Path,
|
||||
Name = file.DisplayName,
|
||||
Id = token
|
||||
};
|
||||
Model.OpenFile(fileInfo);
|
||||
Model.Token = StorageApplicationPermissions.MostRecentlyUsedList.Add(file, file.Path);
|
||||
Model.Path = file.Path;
|
||||
Model.Name = file.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -117,19 +117,6 @@
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Initial">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PasswordBox" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxBorderThemeBrush}"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ConfirmPasswordBox" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxBorderThemeBrush}"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HyperlinkButton" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HyperlinkForegroundThemeBrush}"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<interactivity:Interaction.Behaviors>
|
||||
@@ -145,9 +132,6 @@
|
||||
<core:DataTriggerBehavior Binding="{Binding IsKeyFileValid}" Value="True">
|
||||
<core:GoToStateAction StateName="KeyFileValid"/>
|
||||
</core:DataTriggerBehavior>
|
||||
<core:DataTriggerBehavior Binding="{Binding IsValid}" Value="True">
|
||||
<core:GoToStateAction StateName="Initial"/>
|
||||
</core:DataTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
@@ -44,9 +44,8 @@ namespace ModernKeePass.Views.UserControls
|
||||
var file = await picker.PickSingleFileAsync();
|
||||
if (file == null) return;
|
||||
|
||||
var token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
|
||||
Model.KeyFilePath = token;
|
||||
Model.KeyFileText = file.DisplayName;
|
||||
Model.KeyFilePath = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
|
||||
Model.KeyFileText = file.Name;
|
||||
}
|
||||
|
||||
private async void CreateKeyFileButton_Click(object sender, RoutedEventArgs e)
|
||||
@@ -61,9 +60,8 @@ namespace ModernKeePass.Views.UserControls
|
||||
var file = await savePicker.PickSaveFileAsync();
|
||||
if (file == null) return;
|
||||
|
||||
var token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
|
||||
Model.KeyFilePath = token;
|
||||
Model.KeyFileText = file.DisplayName;
|
||||
Model.KeyFilePath = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
|
||||
Model.KeyFileText = file.Name;
|
||||
await Model.GenerateKeyFile();
|
||||
}
|
||||
}
|
||||
|
@@ -202,7 +202,7 @@ namespace ModernKeePass.Views.UserControls
|
||||
{
|
||||
args.Request.SearchSuggestionCollection.AppendResultSuggestion(
|
||||
group.Title,
|
||||
group.ParentGroupName,
|
||||
group.ParentGroupName ?? string.Empty,
|
||||
group.Id,
|
||||
imageUri,
|
||||
string.Empty);
|
||||
|
Reference in New Issue
Block a user