From a6458168b8805517a401c59946e51bc47429ca0b Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 27 Feb 2022 20:28:32 +0000 Subject: [PATCH] update max results, again --- public/src/js/songselect.js | 6 ++++-- public/src/js/strings.js | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index b03a6d3..d2aa6e9 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -3056,16 +3056,18 @@ class SongSelect{ } } + var maxResults = totalFilters > 0 && !query ? 100 : 50 + if(query){ results = fuzzysort.go(query, results, { keys: ["titlePrepared", "subtitlePrepared"], allowTypo: true, - limit: 100 + limit: maxResults }) }else{ results = results.map(result => { return {obj: result} - }).slice(0, 100) + }).slice(0, maxResults) } return results diff --git a/public/src/js/strings.js b/public/src/js/strings.js index 1947609..f641f66 100644 --- a/public/src/js/strings.js +++ b/public/src/js/strings.js @@ -1354,7 +1354,6 @@ var translations = { ja: [ "CTRL+Fで検索窓を開く!", "検索フィルタの組み合わせは自由自在です!", - "最も関連性の高い100件のみを表示します。", "キーワードでジャンルを絞り込めます!(例: \"genre:variety\", \"genre:namco\")", "「oni:10」などのフィルターを使用して、特定の難易度の曲を検索して!", "Difficulty filters support ranges, too! Try \"ura:1-5\"!", @@ -1367,7 +1366,6 @@ var translations = { en: [ "Open the search window by pressing CTRL+F!", "Mix and match as many search filters as you want!", - "Only the 100 most relevant search results are shown.", "Filter by genre by using the \"genre:\" keyword! (e.g. \"genre:variety\", \"genre:namco\")", "Use filters like \"oni:10\" to search for songs with a particular difficulty!", "Difficulty filters support ranges, too! Try \"ura:1-5\"!",