mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-21 06:51:58 +00:00
fix: remove extension/repository search/filtering, people are stupid and think its the add button
This commit is contained in:
parent
8218833448
commit
df64f26fa5
2 changed files with 3 additions and 16 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ui",
|
"name": "ui",
|
||||||
"version": "6.4.135",
|
"version": "6.4.136",
|
||||||
"license": "BUSL-1.1",
|
"license": "BUSL-1.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@9.15.5",
|
"packageManager": "pnpm@9.15.5",
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,6 @@
|
||||||
url: 'URL'
|
url: 'URL'
|
||||||
}
|
}
|
||||||
let value = 'extensions'
|
let value = 'extensions'
|
||||||
let inputText = ''
|
|
||||||
|
|
||||||
function filterSearch <T extends Array<[string, unknown]>> (repositories: T, input: string): T {
|
|
||||||
if (!input) return repositories
|
|
||||||
return repositories.filter(([id]) => id.toLowerCase().includes(input.toLowerCase())) as T
|
|
||||||
}
|
|
||||||
|
|
||||||
let extensionInput = ''
|
let extensionInput = ''
|
||||||
|
|
||||||
|
|
@ -51,17 +45,10 @@
|
||||||
<Tabs.Trigger tabindex={0} value='extensions'>Extensions</Tabs.Trigger>
|
<Tabs.Trigger tabindex={0} value='extensions'>Extensions</Tabs.Trigger>
|
||||||
<Tabs.Trigger tabindex={0} value='repositories'>Repositories</Tabs.Trigger>
|
<Tabs.Trigger tabindex={0} value='repositories'>Repositories</Tabs.Trigger>
|
||||||
</Tabs.List>
|
</Tabs.List>
|
||||||
<div class='flex items-center relative scale-parent md:max-w-56 w-full'>
|
|
||||||
<Input
|
|
||||||
class='pl-9 bg-neutral-950 select:bg-accent select:text-accent-foreground shadow-sm no-scale placeholder:opacity-50'
|
|
||||||
placeholder='Search {value}...'
|
|
||||||
bind:value={inputText} />
|
|
||||||
<MagnifyingGlass class='h-4 w-4 shrink-0 opacity-50 absolute left-3 text-muted-foreground z-10 pointer-events-none' />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<Tabs.Content value='extensions' tabindex={-1}>
|
<Tabs.Content value='extensions' tabindex={-1}>
|
||||||
<div class='flex flex-col gap-y-2 justify-center py-3'>
|
<div class='flex flex-col gap-y-2 justify-center py-3'>
|
||||||
{#each filterSearch(Object.entries($saved), inputText) as [id, config] (id)}
|
{#each Object.entries($saved) as [id, config] (id)}
|
||||||
<div class='bg-neutral-950 px-4 py-3 rounded-md flex flex-row space-x-3 justify-between w-full border border-border'>
|
<div class='bg-neutral-950 px-4 py-3 rounded-md flex flex-row space-x-3 justify-between w-full border border-border'>
|
||||||
<div class='flex flex-col space-y-3'>
|
<div class='flex flex-col space-y-3'>
|
||||||
<div class='flex flex-row space-x-3'>
|
<div class='flex flex-row space-x-3'>
|
||||||
|
|
@ -139,7 +126,7 @@
|
||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
<div class='flex flex-col gap-y-2 justify-center py-3'>
|
<div class='flex flex-col gap-y-2 justify-center py-3'>
|
||||||
{#each filterSearch(Object.entries(Object.groupBy(Object.values($saved), saved => saved.update ?? '')), inputText) as [id, extensions] (id) }
|
{#each Object.entries(Object.groupBy(Object.values($saved), saved => saved.update ?? '')) as [id, extensions] (id) }
|
||||||
{@const url = new URL(id)}
|
{@const url = new URL(id)}
|
||||||
<div class='bg-neutral-950 px-4 py-3 rounded-md flex flex-row space-x-3 justify-between items-center w-full border border-border'>
|
<div class='bg-neutral-950 px-4 py-3 rounded-md flex flex-row space-x-3 justify-between items-center w-full border border-border'>
|
||||||
<div class='flex space-x-2 items-center'>
|
<div class='flex space-x-2 items-center'>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue