migrate: change settings from a store to a state

This commit is contained in:
Xylight committed 2024-10-25 21:09:32 -07:00
1 parent ffcd9faa96
commit d597349887
128 files changed
+1010 -1144

No files matched your search

+2 -2
View File
@@ -2,14 +2,14 @@
import { page } from '$app/stores'
import Pageination from '$lib/components/ui/Pageination.svelte'
import Placeholder from '$lib/components/ui/Placeholder.svelte'
import { searchParam } from '$lib/util.js'
import { searchParam } from '$lib/util.svelte.js'
import { ClipboardDocumentCheck, Icon } from 'svelte-hero-icons'
import Application from './Application.svelte'
import MultiSelect from '$lib/components/input/Switch.svelte'
import { t } from '$lib/translations'
import Header from '$lib/components/ui/layout/pages/Header.svelte'
let { data } = $props();
let { data } = $props()
</script>
<Header pageHeader>{$t('routes.admin.applications.title')}</Header>
+1 -1
View File
@@ -1,4 +1,4 @@
import { profile } from '$lib/auth.js'
import { profile } from '$lib/auth.svelte'
import { getClient } from '$lib/lemmy.js'
import { get } from 'svelte/store'
@@ -1,5 +1,5 @@
<script lang="ts">
import { notifications, profile } from '$lib/auth.js'
import { notifications, profile } from '$lib/auth.svelte.js'
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
import { Material, toast } from 'mono-svelte'
@@ -16,10 +16,10 @@
import { t } from '$lib/translations'
interface Props {
application: RegistrationApplicationView;
application: RegistrationApplicationView
}
let { application = $bindable() }: Props = $props();
let { application = $bindable() }: Props = $props()
let approving = $state(false)
let denying = $state(false)
@@ -52,7 +52,7 @@
try {
await getClient().approveRegistrationApplication(
registrationApplicationAnswer
registrationApplicationAnswer,
)
toast({
content: approve
@@ -144,8 +144,8 @@
disabled={approving || denying || reviewing}
>
{#snippet prefix()}
<Icon src={XMark} mini size="16" />
{/snippet}
<Icon src={XMark} mini size="16" />
{/snippet}
</Button>
<Button
size="square-md"
@@ -159,8 +159,8 @@
disabled={approving || denying || reviewing}
>
{#snippet prefix()}
<Icon src={Check} mini size="16" />
{/snippet}
<Icon src={Check} mini size="16" />
{/snippet}
</Button>
</div>
</div>