diff --git a/src/lib/components/lemmy/user/UserAutocomplete.svelte b/src/lib/components/lemmy/user/UserAutocomplete.svelte
new file mode 100644
index 00000000..6eb49354
--- /dev/null
+++ b/src/lib/components/lemmy/user/UserAutocomplete.svelte
@@ -0,0 +1,61 @@
+
+
+ {
+ const results = await getClient().search({
+ q: q || ' ',
+ type_: 'Users',
+ limit: 20,
+ listing_type: listing_type,
+ sort: 'TopAll',
+ })
+
+ return results.users.map((c) => c.person)
+ }}
+ extractName={(c) => `${c.name}@${new URL(c.actor_id).hostname}`}
+ on:select
+ bind:query={q}
+ {showWhenEmpty}
+ {...$$restProps}
+ let:item
+ let:select
+>
+
+ {#if showWhenEmpty}
+
dispatcher('select', undefined)}>
+
+
+ None
+
+
+ {:else}
+
No results.
+ {/if}
+
+
+
select(item)}>
+
+
+ {item.name}
+
+ {new URL(item.actor_id).hostname}
+
+
+
+
+
diff --git a/src/routes/modlog/+page.svelte b/src/routes/modlog/+page.svelte
index fb38c00a..26836596 100644
--- a/src/routes/modlog/+page.svelte
+++ b/src/routes/modlog/+page.svelte
@@ -8,7 +8,15 @@
import ModlogItemCard from './item/ModlogItemCard.svelte'
import ModlogItemTable from './item/ModlogItemTable.svelte'
import { Select } from 'mono-svelte'
- import { Bars3BottomRight, Icon, ViewColumns } from 'svelte-hero-icons'
+ import {
+ Bars3BottomRight,
+ Icon,
+ MagnifyingGlass,
+ ViewColumns,
+ } from 'svelte-hero-icons'
+ import UserAutocomplete from '$lib/components/lemmy/user/UserAutocomplete.svelte'
+ import Placeholder from '$lib/components/ui/Placeholder.svelte'
+ import { isAdmin } from '$lib/components/lemmy/moderation/moderation.js'
export let data
@@ -65,13 +73,15 @@
-
-
Community
+
searchParam(
$page.url,
@@ -80,8 +90,37 @@
'page'
)}
/>
+
+ searchParam($page.url, 'user', e.detail?.id.toString() ?? '', 'page')}
+ />
+ {#if $profile?.user && isAdmin($profile?.user)}
+
+ searchParam(
+ $page.url,
+ 'mod_id',
+ e.detail?.id.toString() ?? '',
+ 'page'
+ )}
+ />
+ {/if}
- {#if data.modlog}
+ {#if data.modlog && data.modlog.length > 0}
{#if $userSettings.modlogCardView ?? !window.matchMedia('(min-width: 1600px)').matches}
{#each data.modlog as modlog}
@@ -124,11 +163,17 @@
{/if}
+
searchParam($page.url, 'page', e.detail.toString())}
+ />
+ {:else}
+
{/if}
- searchParam($page.url, 'page', e.detail.toString())}
- />