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,25 +1,23 @@
|
||||
<script lang="ts">
|
||||
import { run } from 'svelte/legacy'
|
||||
|
||||
import { browser } from '$app/environment'
|
||||
import { navigating, page } from '$app/state'
|
||||
import { profile } from '$lib/auth.svelte.js'
|
||||
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import CommunityHeader from '$lib/components/lemmy/community/CommunityHeader.svelte'
|
||||
import Sort from '$lib/components/lemmy/dropdowns/Sort.svelte'
|
||||
import { onDestroy, onMount } from 'svelte'
|
||||
import { setSessionStorage } from '$lib/session.js'
|
||||
import PostFeed from '$lib/components/lemmy/post/feed/PostFeed.svelte'
|
||||
import VirtualFeed from '$lib/components/lemmy/post/feed/VirtualFeed.svelte'
|
||||
import { Badge, Button, Modal, Note, toast } from 'mono-svelte'
|
||||
import { browser } from '$app/environment'
|
||||
import { ArrowRight, ChartBar, Icon, Plus, XMark } from 'svelte-hero-icons'
|
||||
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 { t } from '$lib/i18n/translations.js'
|
||||
import { settings } from '$lib/settings.svelte.js'
|
||||
import { site } from '$lib/lemmy.svelte.js'
|
||||
import { resumables } from '$lib/lemmy/item'
|
||||
import CommunityHeader from '$lib/components/lemmy/community/CommunityHeader.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { profile } from '$lib/auth.svelte.js'
|
||||
import { setSessionStorage } from '$lib/session.js'
|
||||
import { settings } from '$lib/settings.svelte.js'
|
||||
import { Badge, Button, Modal, Note } from 'mono-svelte'
|
||||
import { onDestroy, onMount } from 'svelte'
|
||||
import { ArrowRight, ChartBar, Icon, Plus, XMark } from 'svelte-hero-icons'
|
||||
|
||||
let { data } = $props()
|
||||
|
||||
@@ -81,9 +79,9 @@
|
||||
</Header>
|
||||
|
||||
{#if profile.data.user}
|
||||
{#if !data.community.value.discussion_languages.every( (l) => profile.data.user?.discussion_languages.includes(l), ) && profile.data.user.discussion_languages.length > 0}
|
||||
{#if !data.community.value.discussion_languages.every( l => profile.data.user?.discussion_languages.includes(l), ) && profile.data.user.discussion_languages.length > 0}
|
||||
{@const missing = data.community.value.discussion_languages.filter(
|
||||
(i) => !profile.data.user?.discussion_languages.includes(i),
|
||||
i => !profile.data.user?.discussion_languages.includes(i),
|
||||
)}
|
||||
<Note class="p-1! pl-3! flex-col md:flex-row">
|
||||
<div>{$t('routes.community.languageWarning')}</div>
|
||||
@@ -103,11 +101,11 @@
|
||||
<div class="flex flex-row gap-4 flex-wrap -mt-2">
|
||||
{#if site.data?.all_languages}
|
||||
{@const allLanguages = site.data.all_languages}
|
||||
{#each missing as language}
|
||||
{#each missing as language (language)}
|
||||
<a href="/profile/settings#languages" class="inline-block w-max">
|
||||
<Badge color="blue-subtle">
|
||||
<Icon src={Plus} size="16" micro />
|
||||
{allLanguages.find((i) => language == i.id)?.name}
|
||||
{allLanguages.find(i => language == i.id)?.name}
|
||||
</Badge>
|
||||
</a>
|
||||
{/each}
|
||||
@@ -146,13 +144,12 @@
|
||||
<Pageination
|
||||
page={data.page}
|
||||
cursor={{ next: data.cursor.next }}
|
||||
href={(page) =>
|
||||
href={page =>
|
||||
typeof page == 'number' ? `?page=${page}` : `?cursor=${page}`}
|
||||
>
|
||||
<span class="flex flex-row items-center gap-1">
|
||||
<Icon src={ChartBar} size="16" mini />
|
||||
{$t('routes.frontpage.footer', {
|
||||
// @ts-ignore
|
||||
users: site.data?.site_view.counts.users_active_day ?? '??',
|
||||
})}
|
||||
</span>
|
||||
|
||||
Reference in new issue
Block a user