Add Category and Keywords properties
MODIFY
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
@@ -37,12 +37,42 @@ namespace WalletWasabi.Fluent.ViewModels.NavBar
var searchItems = new SourceList<SearchItemViewModel>();
- searchItems.Add(new SearchItemViewModel(navigationState, NavigationTarget.Home, "home_regular", "Home", () => new HomePageViewModel(navigationState, walletManager, addWalletPage)));
- searchItems.Add(new SearchItemViewModel(navigationState, NavigationTarget.Home, "settings_regular", "Settings", () => new SettingsPageViewModel(navigationState)));
- searchItems.Add(new SearchItemViewModel(navigationState, NavigationTarget.Dialog, "add_circle_regular", "Add Wallet", () => addWalletPage));
+ searchItems.Add(new SearchItemViewModel(
+ navigationState,
+ NavigationTarget.Home,
+ iconName: "home_regular",
+ title: "Home",
+ category: "General",
+ keywords: "Home",
+ () => new HomePageViewModel(navigationState, walletManager, addWalletPage)));
+
+ searchItems.Add(new SearchItemViewModel(
+ navigationState,
+ NavigationTarget.Home,
+ iconName: "settings_regular",
+ title: "Settings",
+ category: "General",
+ keywords: "Settings, General, User Interface, Privacy, Advanced",
+ () => new SettingsPageViewModel(navigationState)));
+
+ searchItems.Add(new SearchItemViewModel(
+ navigationState,
+ NavigationTarget.Dialog,
+ iconName: "add_circle_regular",
+ title: "Add Wallet",
+ category: "Wallet",
+ keywords: "Wallet, Add Wallet, Create Wallet, Recover Wallet, Import Wallet, Connect Hardware Wallet",
+ () => addWalletPage));
walletManager.Items.ToObservableChangeSet()
- .Cast(x => new SearchItemViewModel(navigationState, NavigationTarget.Home, "web_asset_regular", x.WalletName, () => x))
+ .Cast(x => new SearchItemViewModel(
+ navigationState,
+ NavigationTarget.Home,
+ iconName: "web_asset_regular",
+ title: x.WalletName,
+ category: "Wallet",
+ keywords: $"Wallet, {x.WalletName}",
+ () => x))
.Sort(SortExpressionComparer<SearchItemViewModel>.Ascending(i => i.Title))
.Merge(searchItems.Connect())
.ObserveOn(RxApp.MainThreadScheduler)

MODIFY
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
@@ -6,22 +6,35 @@ namespace WalletWasabi.Fluent.ViewModels.Search
{
public class SearchItemViewModel : RoutableViewModel
{
- public SearchItemViewModel(NavigationStateViewModel navigationState, NavigationTarget navigationTarget, string iconName, string title, Func<RoutableViewModel> createTargetView) : base(navigationState, navigationTarget)
+ public SearchItemViewModel(
+ NavigationStateViewModel navigationState,
+ NavigationTarget navigationTarget,
+ string iconName,
+ string title,
+ string category,
+ string keywords,
+ Func<RoutableViewModel> createTargetView) : base(navigationState, navigationTarget)
{
IconName = iconName;
+ Category = category;
+
+ Keywords = keywords;
+
Title = title;
- OpenCommand = ReactiveCommand.Create(() =>
- {
- NavigateToTargetView(navigationState, navigationTarget, createTargetView);
- });
+ OpenCommand = ReactiveCommand.Create(
+ () => NavigateToTargetView(navigationState, navigationTarget, createTargetView));
}
public string IconName { get; }
public string Title { get; }
+ public string Category { get; }
+
+ public string Keywords { get; }
+
public ICommand OpenCommand { get; }
private void NavigateToTargetView(NavigationStateViewModel navigationState, NavigationTarget navigationTarget, Func<RoutableViewModel> createTargetView)
@@ -41,7 +54,7 @@ namespace WalletWasabi.Fluent.ViewModels.Search
public override string ToString()
{
- return Title;
+ return Keywords;
}
}
}
\ No newline at end of file

Add Category and Keywords properties