fix: Fix lint errors (#559)
* cleanup: postactions styling * misc: fix first round of errors * pkg: remove vitest * fix: fix lint errors stage 2 * fix: fix lint errors stage 3 * fix: fix lint errors, stage 3 * misc: update eslint rules to warn for writable derived
This commit is contained in:
1 parent
1824245f13
commit
76c581123a
225 files changed
+1553
-2352
No files matched your search
@@ -1,14 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||
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/i18n/translations'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { Option, Select } from 'mono-svelte'
|
||||
import { ClipboardDocumentCheck } from 'svelte-hero-icons'
|
||||
import Application from './Application.svelte'
|
||||
|
||||
let { data } = $props()
|
||||
|
||||
@@ -16,12 +13,6 @@
|
||||
</script>
|
||||
|
||||
<Header pageHeader>{$t('routes.admin.applications.title')}</Header>
|
||||
<!-- <MultiSelect
|
||||
options={[false, true]}
|
||||
selected={data.unreadOnly ?? true}
|
||||
optionNames={[$t('filter.location.all'), $t('filter.unread')]}
|
||||
onselect={(e) => searchParam(page.url, 'unreadOnly', e.toString(), 'page')}
|
||||
/> -->
|
||||
<form bind:this={selectForm} action="/admin/applications" class="w-max">
|
||||
<Select
|
||||
name="unreadOnly"
|
||||
@@ -40,7 +31,7 @@
|
||||
</div>
|
||||
{#if data.applications?.value.length >= 40}
|
||||
<div class="mt-auto">
|
||||
<Pageination page={data.page} href={(page) => `?page=${page}`} />
|
||||
<Pageination page={data.page} href={page => `?page=${page}`} />
|
||||
</div>
|
||||
{/if}
|
||||
{:else}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { getClient } from '$lib/lemmy.svelte.js'
|
||||
import { ReactiveState } from '$lib/promise.svelte.js'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export async function load({ data, fetch, url }) {
|
||||
export async function load({ fetch, url }) {
|
||||
if (!profile) return
|
||||
|
||||
const { jwt } = profile.data!
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { notifications, profile } from '$lib/auth.svelte.js'
|
||||
import ApplicationDenyModal from '$lib/components/lemmy/modal/ApplicationDenyModal.svelte'
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
|
||||
import { Material, toast } from 'mono-svelte'
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { getClient } from '$lib/lemmy.svelte.js'
|
||||
import { errorMessage } from '$lib/lemmy/error'
|
||||
import type {
|
||||
ApproveRegistrationApplication,
|
||||
RegistrationApplicationView,
|
||||
} from 'lemmy-js-client'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Material, toast } from 'mono-svelte'
|
||||
import {
|
||||
Check,
|
||||
Icon,
|
||||
@@ -16,12 +20,6 @@
|
||||
ShieldExclamation,
|
||||
XMark,
|
||||
} from 'svelte-hero-icons'
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date'
|
||||
import ApplicationDenyModal from '$lib/components/lemmy/modal/ApplicationDenyModal.svelte'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation'
|
||||
import { fullCommunityName } from '$lib/util.svelte'
|
||||
|
||||
interface Props {
|
||||
application: RegistrationApplicationView
|
||||
@@ -47,7 +45,7 @@
|
||||
} else {
|
||||
reviewing = true
|
||||
while (reviewing) {
|
||||
await new Promise((res) => setTimeout(res, 1000))
|
||||
await new Promise(res => setTimeout(res, 1000))
|
||||
}
|
||||
if (!denying) {
|
||||
denyReason = ''
|
||||
@@ -75,7 +73,7 @@
|
||||
$notifications.applications -= 1
|
||||
} catch (err) {
|
||||
toast({
|
||||
content: err as any,
|
||||
content: errorMessage(err as string),
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user