From b17ae550381232fd8c0cce5024e8ec0852918a33 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 11 Aug 2025 19:16:05 +0800 Subject: feat(shell): implement standalone function for dynamic component loading feat(Searchable): add Include algorithm and update filtering logic fix(Launcher): refactor state handling and improve selection logic fix(Clip): update clipHist property initialization and selection state sync refactor(IComponent): enhance state management and streamline properties refactor(Clip): change algorithm to Include for improved search functionality --- components/Searchable.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'components') diff --git a/components/Searchable.qml b/components/Searchable.qml index 9501827..50e73fe 100644 --- a/components/Searchable.qml +++ b/components/Searchable.qml @@ -12,7 +12,8 @@ Singleton { enum SearchAlgorithm { Levendist, Fzf, - Fuzzysort + Fuzzysort, + Include } property int algorithm: Searchable.SearchAlgorithm.Levendist property int scoreThreshold: 50 @@ -224,6 +225,9 @@ Singleton { return out; } + if (algorithm === Searchable.SearchAlgorithm.Include) + return list.filter(item => keys.some(k => transformSearch(fieldString(item, k)).includes(search))); + return []; } } -- cgit v1.2.3