fix: nits hub search and telemetry (#7063)

This commit is contained in:
hugocasa
2025-11-05 15:47:32 +01:00
committed by GitHub
parent 21398516e3
commit 20a9b1e596
3 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
274a094acce8dd42847c322a9fa8739010d01f2f
8ab9b8d3cb7486fcb472d34f3a0b49f52548fe8f
@@ -150,14 +150,14 @@
{size}
/>
{#if loading}
<Loader2 class="animate-spin text-gray-400 absolute right-2 top-2.5" />
<Loader2 class="animate-spin text-gray-400 absolute right-2 top-1" />
{/if}
</div>
</div>
{#if hubNotAvailable}
<Alert type="error" title="Hub not available" />
{:else if items.length > 0 && apps.length > 0}
{:else if (items.length > 0 && apps.length > 0) || !loading}
<ListFilters {syncQuery} filters={apps} bind:selectedFilter={appFilter} resourceType />
{#if items.length == 0}
<NoItemFound />
@@ -19,8 +19,8 @@
try {
return get(userStore)
? filter.length > 0
? await ScriptService.queryHubScripts({ text: filter, limit: 40, kind })
: ((await ScriptService.getTopHubScripts({ limit: 40, kind, app: appFilter })).asks ??
? await ScriptService.queryHubScripts({ text: filter, limit: 20, kind })
: ((await ScriptService.getTopHubScripts({ limit: 20, kind, app: appFilter })).asks ??
[])
: undefined
} catch (err) {
@@ -248,4 +248,8 @@
</a>
</div>
{/if}
{:else}
<div class="text-2xs text-primary font-light text-center py-2 px-3 items-center">
No scripts found.
</div>
{/if}