misc: add modlog buttons
This commit is contained in:
1 parent
3bc31b669b
commit
5cfc98188c
2 files changed
+16
-8
No files matched your search
@@ -54,6 +54,12 @@
|
|||||||
<FormattedNumber number={site.counts.communities} />
|
<FormattedNumber number={site.counts.communities} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-row gap-2 items-center">
|
||||||
|
<Button href="/modlog">
|
||||||
|
<Icon src={Newspaper} size="16" mini />
|
||||||
|
Modlog
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
{#if taglines && taglines.length > 0}
|
{#if taglines && taglines.length > 0}
|
||||||
<Markdown
|
<Markdown
|
||||||
source={taglines[Math.floor(Math.random() * taglines.length)].content}
|
source={taglines[Math.floor(Math.random() * taglines.length)].content}
|
||||||
|
|||||||
@@ -6,26 +6,28 @@
|
|||||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { EnvelopeOpen, Icon, Inbox } from 'svelte-hero-icons'
|
import { EnvelopeOpen, Icon, Inbox, Newspaper } from 'svelte-hero-icons'
|
||||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||||
|
import Button from '$lib/components/input/Button.svelte'
|
||||||
|
import { searchParam } from '$lib/util.js'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="mb-4 flex flex-col gap-4">
|
<div class="mb-4 flex flex-col gap-4">
|
||||||
<h1 class="font-bold text-2xl">Reports</h1>
|
<h1 class="font-bold text-2xl">Reports</h1>
|
||||||
|
<div class="flex flex-row gap-2 flex-wrap items-center">
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
selected={data.type}
|
selected={data.type}
|
||||||
options={['all', 'unread']}
|
options={['all', 'unread']}
|
||||||
optionNames={['All', 'Unread']}
|
optionNames={['All', 'Unread']}
|
||||||
on:select={(e) => {
|
on:select={(e) => searchParam($page.url, 'type', e.detail, 'page')}
|
||||||
$page.url.searchParams.delete('page')
|
|
||||||
$page.url.searchParams.set('type', e.detail)
|
|
||||||
goto($page.url.toString(), {
|
|
||||||
invalidateAll: true,
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
<Button href="/modlog" class="h-max ml-auto">
|
||||||
|
<Icon src={Newspaper} size="16" mini />
|
||||||
|
Modlog
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{#if data.items && data.items.length > 0}
|
{#if data.items && data.items.length > 0}
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
|
|||||||
Reference in new issue
Block a user