migrate: change settings from a store to a state
This commit is contained in:
1 parent
ffcd9faa96
commit
d597349887
128 files changed
+1010
-1144
No files matched your search
@@ -12,29 +12,29 @@
|
||||
Newspaper,
|
||||
} from 'svelte-hero-icons'
|
||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||
import { searchParam } from '$lib/util.js'
|
||||
import { searchParam } from '$lib/util.svelte.js'
|
||||
import { Button, Material, Select } from 'mono-svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
|
||||
let { data = $bindable() } = $props();
|
||||
let { data = $bindable() } = $props()
|
||||
</script>
|
||||
|
||||
<div class="mb-4 flex flex-col gap-4">
|
||||
<Header pageHeader>
|
||||
{$t('routes.moderation.title')}
|
||||
{#snippet extended()}
|
||||
<div class="flex flex-row gap-2 flex-wrap items-end" >
|
||||
<div class="flex flex-row gap-2 flex-wrap items-end">
|
||||
<Select
|
||||
bind:value={data.type}
|
||||
on:change={() => searchParam($page.url, 'type', data.type, 'page')}
|
||||
>
|
||||
{#snippet label()}
|
||||
<span class="flex items-center gap-1">
|
||||
<span class="flex items-center gap-1">
|
||||
<Icon src={Funnel} size="15" mini />
|
||||
{$t('filter.filter')}
|
||||
</span>
|
||||
{/snippet}
|
||||
{/snippet}
|
||||
<option value="all">{$t('filter.location.all')}</option>
|
||||
<option value="unread">{$t('filter.unread')}</option>
|
||||
</Select>
|
||||
@@ -43,7 +43,7 @@
|
||||
{$t('routes.modlog')}
|
||||
</Button>
|
||||
</div>
|
||||
{/snippet}
|
||||
{/snippet}
|
||||
</Header>
|
||||
</div>
|
||||
{#if data.items && data.items.length > 0}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { isAdmin } from '$lib/components/lemmy/moderation/moderation.js'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
PrivateMessageReportView,
|
||||
} from 'lemmy-js-client'
|
||||
import { Check, CheckCircle, Icon } from 'svelte-hero-icons'
|
||||
import { notifications, profile } from '$lib/auth.js'
|
||||
import { notifications, profile } from '$lib/auth.svelte.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import type { ReportView } from '$lib/lemmy/report.js'
|
||||
import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte'
|
||||
@@ -19,10 +19,10 @@
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
|
||||
interface Props {
|
||||
item: ReportView;
|
||||
item: ReportView
|
||||
}
|
||||
|
||||
let { item = $bindable() }: Props = $props();
|
||||
let { item = $bindable() }: Props = $props()
|
||||
|
||||
let resolving = $state(false)
|
||||
async function resolve() {
|
||||
@@ -140,8 +140,8 @@
|
||||
disabled={resolving}
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={CheckCircle} micro={item.resolved} size="18" />
|
||||
{/snippet}
|
||||
<Icon src={CheckCircle} micro={item.resolved} size="18" />
|
||||
{/snippet}
|
||||
{!item.resolved
|
||||
? $t('routes.moderation.resolve')
|
||||
: $t('routes.moderation.resolved')}
|
||||
|
||||
Reference in new issue
Block a user