mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-01-12 02:11:28 +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
2ca71a31c6
2 changed files with 3 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "6.4.135",
|
||||
"version": "6.4.136",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.15.5",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
import Github from 'lucide-svelte/icons/github'
|
||||
import Globe from 'lucide-svelte/icons/globe'
|
||||
import Plus from 'lucide-svelte/icons/plus'
|
||||
import MagnifyingGlass from 'svelte-radix/MagnifyingGlass.svelte'
|
||||
import { toast } from 'svelte-sonner'
|
||||
|
||||
import { Button, iconSizes } from '../button'
|
||||
|
|
@ -21,12 +20,6 @@
|
|||
url: 'URL'
|
||||
}
|
||||
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 = ''
|
||||
|
||||
|
|
@ -51,17 +44,10 @@
|
|||
<Tabs.Trigger tabindex={0} value='extensions'>Extensions</Tabs.Trigger>
|
||||
<Tabs.Trigger tabindex={0} value='repositories'>Repositories</Tabs.Trigger>
|
||||
</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>
|
||||
<Tabs.Content value='extensions' tabindex={-1}>
|
||||
<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='flex flex-col space-y-3'>
|
||||
<div class='flex flex-row space-x-3'>
|
||||
|
|
@ -139,7 +125,7 @@
|
|||
{/await}
|
||||
</div>
|
||||
<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)}
|
||||
<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'>
|
||||
|
|
|
|||
Loading…
Reference in a new issue