feat: improved search results

This commit is contained in:
SethBurkart123
2025-05-05 21:56:50 +10:00
parent 9aef4c7204
commit eeb63b5d1a
2 changed files with 4 additions and 6 deletions
+2 -3
View File
@@ -184,8 +184,8 @@
{/each}
{#each pluginSettings as plugin}
<div>
<!-- Always show enable toggle if disableToggle is true -->
<div class="p-1 my-1 bg-white rounded-xl border shadow-sm border-zinc-200 dark:border-zinc-700 dark:bg-zinc-900/50 {!(plugin as any).disableToggle && Object.keys(plugin.settings).length === 0 ? 'hidden' : ''}">
<!-- Always show enable toggle if disableToggle is true -->
{#if (plugin as any).disableToggle}
<div class="flex justify-between items-center px-4 py-3">
<div class="pr-4">
@@ -201,7 +201,6 @@
</div>
{/if}
<!-- Only show other settings if plugin is enabled or has no disableToggle -->
{#if !((plugin as any).disableToggle) || (pluginSettingsValues[plugin.pluginId]?.enabled ?? true)}
{#each Object.entries(plugin.settings) as [key, setting]}
<!-- Skip the 'enabled' setting if it's part of the settings object -->
@@ -14,9 +14,8 @@ export function createSearchIndexes() {
keys: ["text", "category", "keywords"],
includeScore: true,
includeMatches: true,
threshold: 0.6,
minMatchCharLength: 1,
ignoreLocation: true,
threshold: 0.4,
minMatchCharLength: 2,
useExtendedSearch: false,
};