Skip to content

Commit 9bbab86

Browse files
committed
Add key entries sorting
Update CHANGELOG.md
1 parent 832fc3d commit 9bbab86

File tree

9 files changed

+131
-5
lines changed

9 files changed

+131
-5
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v1.19.0 - 26/10/2024
2+
- Add KCV variants
3+
- Add KCV selection auto saving
4+
- Add key entries Sort feature
5+
- Add secret key change on File key store
6+
- Add support for secrets encryption per machine
7+
- Add optional Elevated/Restricted user feature
8+
- Add Identifier to Favorite and use it instead of Name for the favorite links
9+
- Fix DESFire reading test on SAM AV2/AV3 key store
10+
111
# v1.18.1 - 09/06/2024
212

313
- Fix possible race condition on initialization cleanup when opening a key store

KeyManager.Library.KeyStore.File.UI/Properties/Resources.fr.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,10 @@
156156
<data name="ResetEncryptionKey" xml:space="preserve">
157157
<value>Réinitialiser la clé de chiffrement</value>
158158
</data>
159+
<data name="OrderById" xml:space="preserve">
160+
<value>Trier par Id</value>
161+
</data>
162+
<data name="OrderByName" xml:space="preserve">
163+
<value>Trier par nom</value>
164+
</data>
159165
</root>

KeyManager.Library.KeyStore.File.UI/Properties/Resources.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,10 @@
156156
<data name="ResetEncryptionKey" xml:space="preserve">
157157
<value>Reset Encryption Key</value>
158158
</data>
159+
<data name="OrderById" xml:space="preserve">
160+
<value>Order by Id</value>
161+
</data>
162+
<data name="OrderByName" xml:space="preserve">
163+
<value>Order by Name</value>
164+
</data>
159165
</root>

KeyManager.Library.UI/Domain/KeyEntriesControlViewModel.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ public KeyEntriesControlViewModel(ISnackbarMessageQueue snackbarMessageQueue, Ke
192192
}
193193
});
194194

195+
OrderingCommand = new RelayCommand<string>(Ordering);
196+
195197
_identifiersView = CollectionViewSource.GetDefaultView(Identifiers);
196198
_identifiersView.Filter = KeyEntryIdentifiersFilter;
197199
}
@@ -511,6 +513,27 @@ private void ToggleAllSelection(bool selected)
511513
}
512514
}
513515

516+
public RelayCommand<string> OrderingCommand { get; }
517+
private void Ordering(string? order)
518+
{
519+
_identifiersView.SortDescriptions.Clear();
520+
switch (order)
521+
{
522+
case "ByIdAsc":
523+
_identifiersView.SortDescriptions.Add(new SortDescription("KeyEntryId.Id", ListSortDirection.Ascending));
524+
break;
525+
case "ByIdDesc":
526+
_identifiersView.SortDescriptions.Add(new SortDescription("KeyEntryId.Id", ListSortDirection.Descending));
527+
break;
528+
case "ByLabelAsc":
529+
_identifiersView.SortDescriptions.Add(new SortDescription("KeyEntryId.Label", ListSortDirection.Ascending));
530+
break;
531+
case "ByLabelDesc":
532+
_identifiersView.SortDescriptions.Add(new SortDescription("KeyEntryId.Label", ListSortDirection.Descending));
533+
break;
534+
}
535+
}
536+
514537
public async Task RefreshKeyEntries()
515538
{
516539
lock (_identifierLock)

KeyManager.Library.UI/KeyEntriesControl.xaml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,45 @@
128128
</WrapPanel>
129129
</WrapPanel>
130130
<DockPanel LastChildFill="True" Grid.Column="1">
131-
<Button DockPanel.Dock="Right" x:Name="btnSearch" Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}" Width="24" Height="24" Margin="3" ToolTip="{x:Static properties:Resources.Search}" Click="btnSearch_Click">
132-
<materialDesign:PackIcon Kind="Search" Height="16" Width="16"/>
133-
</Button>
131+
<WrapPanel DockPanel.Dock="Right" Orientation="Vertical" VerticalAlignment="Center">
132+
<Button x:Name="btnSearch" Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}" Width="24" Height="24" Margin="3" ToolTip="{x:Static properties:Resources.Search}" Click="btnSearch_Click">
133+
<materialDesign:PackIcon Kind="Search" Height="16" Width="16"/>
134+
</Button>
135+
<materialDesign:PopupBox PlacementMode="BottomAndAlignCentres"
136+
HorizontalAlignment="Center"
137+
ToolTip="{x:Static properties:Resources.Ordering}" Margin="3" Width="16" Height="16"
138+
Style="{StaticResource MaterialDesignMultiFloatingActionLightPopupBox}">
139+
<materialDesign:PopupBox.ToggleContent>
140+
<materialDesign:PackIcon Kind="OrderBoolAscending" Height="8" Width="8" />
141+
</materialDesign:PopupBox.ToggleContent>
142+
<StackPanel Orientation="Vertical">
143+
<Button Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
144+
Command="{Binding OrderingCommand}"
145+
CommandParameter="ByIdAsc"
146+
ToolTip="{x:Static properties:Resources.OrderById}" Margin="3">
147+
<materialDesign:PackIcon Kind="OrderNumericAscending" Height="16" Width="16" Cursor="Hand" />
148+
</Button>
149+
<Button Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
150+
Command="{Binding OrderingCommand}"
151+
CommandParameter="ByIdDesc"
152+
ToolTip="{x:Static properties:Resources.OrderById}" Margin="3">
153+
<materialDesign:PackIcon Kind="OrderNumericDescending" Height="16" Width="16" Cursor="Hand" />
154+
</Button>
155+
<Button Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
156+
Command="{Binding OrderingCommand}"
157+
CommandParameter="ByLabelAsc"
158+
ToolTip="{x:Static properties:Resources.OrderByLabel}" Margin="3">
159+
<materialDesign:PackIcon Kind="OrderAlphabeticalAscending" Height="16" Width="16" Cursor="Hand" />
160+
</Button>
161+
<Button Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
162+
Command="{Binding OrderingCommand}"
163+
CommandParameter="ByLabelDesc"
164+
ToolTip="{x:Static properties:Resources.OrderByLabel}" Margin="3">
165+
<materialDesign:PackIcon Kind="OrderAlphabeticalDescending" Height="16" Width="16" Cursor="Hand" />
166+
</Button>
167+
</StackPanel>
168+
</materialDesign:PopupBox>
169+
</WrapPanel>
134170
<TextBox TextWrapping="Wrap" x:Name="SearchTerms" KeyDown="SearchTerms_KeyDown" Margin="3"
135171
materialDesign:HintAssist.Hint="{x:Static properties:Resources.SearchTerms}"
136172
Style="{StaticResource MaterialDesignFloatingHintTextBox}"/>

KeyManager.Library.UI/Properties/Resources.Designer.cs

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

KeyManager.Library.UI/Properties/Resources.fr.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,4 +579,13 @@
579579
<data name="WrappingKey" xml:space="preserve">
580580
<value>Clé de Wrapping</value>
581581
</data>
582+
<data name="Ordering" xml:space="preserve">
583+
<value>Tri</value>
584+
</data>
585+
<data name="OrderById" xml:space="preserve">
586+
<value>Trier par Id</value>
587+
</data>
588+
<data name="OrderByLabel" xml:space="preserve">
589+
<value>Trier par libellé</value>
590+
</data>
582591
</root>

KeyManager.Library.UI/Properties/Resources.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,4 +579,13 @@
579579
<data name="WrappingKey" xml:space="preserve">
580580
<value>Wrapping Key</value>
581581
</data>
582+
<data name="Ordering" xml:space="preserve">
583+
<value>Ordering</value>
584+
</data>
585+
<data name="OrderById" xml:space="preserve">
586+
<value>Order by Id</value>
587+
</data>
588+
<data name="OrderByLabel" xml:space="preserve">
589+
<value>Order by Label</value>
590+
</data>
582591
</root>

latestversion

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"VersionString": "1.18.1",
3-
"Uri": "https://download.leosac.com/lkm/KeyManager.Setup-1.18.1.msi"
2+
"VersionString": "1.19.0",
3+
"Uri": "https://download.leosac.com/lkm/KeyManager.Setup-1.19.0.msi"
44
}

0 commit comments

Comments
 (0)