Skip to content

Commit

Permalink
Start adding Key Store diff feature
Browse files Browse the repository at this point in the history
Bump version to v1.15.0
  • Loading branch information
Maxhy committed Mar 11, 2024
1 parent 1ae7904 commit 362f266
Show file tree
Hide file tree
Showing 23 changed files with 224 additions and 93 deletions.
2 changes: 1 addition & 1 deletion KeyManager.Library.KeyGen/KeyManager.Library.KeyGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Title>Leosac Key Manager Key Generation Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Title>Leosac Key Manager File Key Store Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Title>Leosac Key Manager LCP Key Store Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableDynamicLoading>true</EnableDynamicLoading>
<EnableDynamicLoading>true</EnableDynamicLoading>
<RootNamespace>Leosac.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Title>Leosac Key Manager Plugin UI Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
2 changes: 1 addition & 1 deletion KeyManager.Library.Plugin/KeyManager.Library.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Title>Leosac Key Manager Plugin Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
26 changes: 26 additions & 0 deletions KeyManager.Library.UI/DiffKeyStoreDialog.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<UserControl x:Class="Leosac.KeyManager.Library.UI.DiffKeyStoreDialog"
xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http:https://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http:https://schemas.microsoft.com/expression/blend/2008"
xmlns:domain="clr-namespace:Leosac.KeyManager.Library.UI.Domain"
xmlns:local="clr-namespace:Leosac.KeyManager.Library.UI"
xmlns:materialDesign="http:https://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:properties="clr-namespace:Leosac.KeyManager.Library.UI.Properties"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance domain:PublishKeyStoreDialogViewModel}"
d:DesignHeight="200" d:DesignWidth="500"
MinWidth="300">
<DockPanel LastChildFill="True">
<TextBlock DockPanel.Dock="Top" Text="{x:Static properties:Resources.DiffKeyStore}" FontSize="18" Margin="5" />
<WrapPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,25,5,5">
<Button Width="100" IsDefault="True" Content="{x:Static properties:Resources.OK}" Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" CommandParameter="{Binding Favorite}"/>
<Button Width="100" IsCancel="True" Content="{x:Static properties:Resources.Cancel}" Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" Margin="15,0,0,0"/>
</WrapPanel>
<TabControl>
<TabItem Header="{x:Static properties:Resources.General}">
<local:FavoriteKeyStoreSelectionControl SelectedKeyStoreFavorite="{Binding Favorite, Mode=TwoWay}" />
</TabItem>
</TabControl>
</DockPanel>
</UserControl>
28 changes: 28 additions & 0 deletions KeyManager.Library.UI/DiffKeyStoreDialog.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Leosac.KeyManager.Library.UI
{
/// <summary>
/// Interaction logic for DiffKeyStoreDialog.xaml
/// </summary>
public partial class DiffKeyStoreDialog : UserControl
{
public DiffKeyStoreDialog()
{
InitializeComponent();
}
}
}
2 changes: 1 addition & 1 deletion KeyManager.Library.UI/KeyManager.Library.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Title>Leosac Key Manager UI Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
9 changes: 9 additions & 0 deletions KeyManager.Library.UI/Properties/Resources.Designer.cs

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

3 changes: 3 additions & 0 deletions KeyManager.Library.UI/Properties/Resources.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
<data name="DerivatePassword" xml:space="preserve">
<value>Dériver une clé à partir d'un mot de passe (en utilisant RFC 2898)</value>
</data>
<data name="DiffKeyStore" xml:space="preserve">
<value>Comparer avec un autre magasin de clés</value>
</data>
<data name="Directories" xml:space="preserve">
<value>Répertoires</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions KeyManager.Library.UI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
<data name="DerivatePassword" xml:space="preserve">
<value>Derivate a Key from a Password (using RFC 2898)</value>
</data>
<data name="DiffKeyStore" xml:space="preserve">
<value>Diff with another Key Store</value>
</data>
<data name="Directories" xml:space="preserve">
<value>Directories</value>
</data>
Expand Down
2 changes: 1 addition & 1 deletion KeyManager.Library/KeyManager.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Title>Leosac Key Manager Core Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
14 changes: 11 additions & 3 deletions KeyManager.Library/KeyStore/KeyStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,16 @@ public virtual async Task Publish(KeyStore store, Func<string, KeyStore?> getFav

public virtual async Task Publish(KeyStore store, Func<string, KeyStore?> getFavoriteKeyStore, KeyEntryClass keClass, Action<KeyStore, KeyEntryClass, int>? initCallback)
{
var ids = await GetAll(keClass);
await Publish(store, getFavoriteKeyStore, ids, keClass, initCallback);
await Publish(store, getFavoriteKeyStore, keClass, null, initCallback);
}

public virtual async Task Publish(KeyStore store, Func<string, KeyStore?> getFavoriteKeyStore, IEnumerable<KeyEntryId> ids, KeyEntryClass keClass, Action<KeyStore, KeyEntryClass, int>? initCallback)
public virtual async Task Publish(KeyStore store, Func<string, KeyStore?> getFavoriteKeyStore, KeyEntryClass keClass, IEnumerable<KeyEntryId>? ids, Action<KeyStore, KeyEntryClass, int>? initCallback)
{
var changes = new List<IChangeKeyEntry>();
if (ids == null)
{
ids = await GetAll(keClass);
}
initCallback?.Invoke(this, keClass, ids.Count());
if (!string.IsNullOrEmpty(Options?.PublishVariable))
{
Expand Down Expand Up @@ -360,6 +363,11 @@ public virtual async Task Publish(KeyStore store, Func<string, KeyStore?> getFav
}
}

public virtual Task Diff(KeyStore store, Func<string, KeyStore?> getFavoriteKeyStore, KeyEntryClass keClass, IEnumerable<KeyEntryId>? ids, Action<KeyStore, KeyEntryClass, int>? initCallback)
{
throw new NotImplementedException();
}

private static string? ComputeDivInput(DivInputContext divContext, IList<DivInputFragment> divInput)
{
divContext.CurrentDivInput = null;
Expand Down
2 changes: 1 addition & 1 deletion KeyManager.Setup/config.wxi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Include xmlns="http:https://wixtoolset.org/schemas/v4/wxs">
<?define Manufacturer = "Leosac" ?>
<?define ProductName = "Leosac Key Manager" ?>
<?define Version = "1.14.0.0" ?>
<?define Version = "1.15.0.0" ?>
<?define AboutURL = "https://www.leosac.com" ?>
<?define SupportURL = "https://www.leosac.com" ?>
<?define UpdatesURL = "https://www.leosac.com" ?>
Expand Down
Loading

0 comments on commit 362f266

Please sign in to comment.