impr: precompute regexes for filters rather than uhhh re-creating them in a loop every single time filter() is called this is CS 101 brethren

This commit is contained in:
Xylight committed 2026-01-29 20:46:04 -08:00
1 parent 9b55e0da58
commit 9e67489df2
6 files changed
+51 -38

No files matched your search

+4 -3
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { t } from '$lib/app/i18n'
import type { Filter } from '$lib/feature/post/filters'
import type { Filter } from '$lib/feature/post/filters.svelte'
import Switch from '$lib/ui/form/Switch.svelte'
import { Button, TextInput } from 'mono-svelte'
import { Trash } from 'svelte-hero-icons/dist'
@@ -14,9 +14,10 @@
</script>
<li
class="adaptive px-3 py-1 flex flex-col md:flex-row md:items-center xs gap-4"
class="adaptive px-3 py-1.5 flex flex-row flex-wrap items-center xs gap-x-2 gap-y-0.5"
>
<TextInput bind:value={filter.match} label="" class="flex-1"></TextInput>
<TextInput bind:value={filter.match} label="" class="flex-1 min-w-96"
></TextInput>
<Switch
options={['hide', 'minimize', 'none']}
optionNames={[