diff --git a/src/app.d.ts b/src/app.d.ts index a3c055e3..960de5d7 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -14,7 +14,6 @@ declare global { slots?: { sidebar?: { component?: ComponentType - // eslint-disable-next-line props?: any } } diff --git a/src/lib/components/lemmy/ObjectAutocomplete.svelte b/src/lib/components/lemmy/ObjectAutocomplete.svelte index fe91e774..133ce007 100644 --- a/src/lib/components/lemmy/ObjectAutocomplete.svelte +++ b/src/lib/components/lemmy/ObjectAutocomplete.svelte @@ -14,7 +14,6 @@ listing_type?: ListingType showWhenEmpty?: boolean placeholder?: string - // eslint-disable-next-line onselect?: (item: any) => void } diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index d17372d6..606ad117 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -5,7 +5,9 @@ import UserLink from '$lib/components/lemmy/user/UserLink.svelte' import Markdown from '$lib/components/markdown/Markdown.svelte' import { publishedToDate } from '$lib/components/util/date.js' - import RelativeDate from '$lib/components/util/RelativeDate.svelte' + import RelativeDate, { + formatRelativeDate, + } from '$lib/components/util/RelativeDate.svelte' import { t } from '$lib/i18n/translations' import { getClient } from '$lib/lemmy.svelte.js' import { errorMessage } from '$lib/lemmy/error' @@ -168,8 +170,20 @@ date={publishedToDate(node.comment_view.comment.published)} /> - {#if node.comment_view.comment.updated} - + {#if node.comment_view.comment.updated}{@const edited = $t( + 'post.meta.lastEdited', + { + default: formatRelativeDate( + publishedToDate(node.comment_view.comment.updated), + { + style: 'long', + }, + ), + }, + )} +
+ +
{/if} {#if node.comment_view.comment.deleted || node.comment_view.comment.removed} { selected: string diff --git a/src/lib/components/lemmy/post/PostMeta.svelte b/src/lib/components/lemmy/post/PostMeta.svelte index d2ae4fe7..fc62f946 100644 --- a/src/lib/components/lemmy/post/PostMeta.svelte +++ b/src/lib/components/lemmy/post/PostMeta.svelte @@ -55,7 +55,7 @@ import { instance } from '$lib/instance.svelte' import { settings, type View } from '$lib/settings.svelte' import type { Community, Person, SubscribedType } from 'lemmy-js-client' - import { Badge, Popover } from 'mono-svelte' + import { Badge, modal, Popover } from 'mono-svelte' import { Bookmark, ExclamationTriangle, @@ -147,6 +147,7 @@ {#snippet target(attachment)} {/if}
{#snippet item(row)}
  • - - diff --git a/src/lib/components/markdown/Markdown.svelte b/src/lib/components/markdown/Markdown.svelte index c2342c92..d377fb3f 100644 --- a/src/lib/components/markdown/Markdown.svelte +++ b/src/lib/components/markdown/Markdown.svelte @@ -36,7 +36,6 @@ marked.use(linkify, { extensions: [ // @ts-expect-error hell with marked - // eslint-disable-next-line containerExtension((params: any) => { if (params.type == 'spoiler') { return { @@ -49,7 +48,6 @@ return null }), // @ts-expect-error hell with marked - // eslint-disable-next-line subSupscriptExtension((params: any) => { if (params.type == 'subscript') { return { diff --git a/src/lib/components/ui/Placeholder.svelte b/src/lib/components/ui/Placeholder.svelte index 36755214..59cea410 100644 --- a/src/lib/components/ui/Placeholder.svelte +++ b/src/lib/components/ui/Placeholder.svelte @@ -28,7 +28,6 @@ {#if icon}
    + import type { Snippet } from 'svelte' + + const placements = { + top: 'top-6 lg:top-22', + bottom: 'bottom-22 lg:bottom-6', + } + + interface Props { + placement: keyof typeof placements + children?: Snippet + } + + let { placement, children }: Props = $props() + + +
    + {@render children?.()} +
    diff --git a/src/lib/components/ui/layout/Shell.svelte b/src/lib/components/ui/layout/Shell.svelte index 31c03afa..f3269dcb 100644 --- a/src/lib/components/ui/layout/Shell.svelte +++ b/src/lib/components/ui/layout/Shell.svelte @@ -40,7 +40,7 @@ class={[ 'fixed lg:sticky bottom-0 lg:top-0', !dockVisible && 'max-lg:-bottom-24', - 'max-w-3xl p-4 left-1/2 -translate-x-1/2 lg:max-w-full lg:p-0 lg:left-0 lg:translate-x-0', + 'max-w-3xl p-3 left-1/2 -translate-x-1/2 lg:max-w-full lg:p-0 lg:left-0 lg:translate-x-0', 'w-full z-50 pointer-events-none', ]} style="transition: bottom .4s cubic-bezier(0.075, 0.82, 0.165, 1);" diff --git a/src/lib/components/ui/layout/pages/Header.svelte b/src/lib/components/ui/layout/pages/Header.svelte index 462fab0c..cfb51a80 100644 --- a/src/lib/components/ui/layout/pages/Header.svelte +++ b/src/lib/components/ui/layout/pages/Header.svelte @@ -43,7 +43,7 @@ {@render children?.()} {#if extended} -
    +
    {@render extended?.()}
    {/if} diff --git a/src/lib/components/ui/navbar/NavButton.svelte b/src/lib/components/ui/navbar/NavButton.svelte index 98b7b5bb..0e059130 100644 --- a/src/lib/components/ui/navbar/NavButton.svelte +++ b/src/lib/components/ui/navbar/NavButton.svelte @@ -56,7 +56,7 @@ {#snippet prefix()}
    {#if icon} - + {:else} {@render customIcon?.({ size: 16, isSelected })} {/if} diff --git a/src/lib/components/ui/navbar/Profile.svelte b/src/lib/components/ui/navbar/Profile.svelte index 5dfe484a..a1d4eedb 100644 --- a/src/lib/components/ui/navbar/Profile.svelte +++ b/src/lib/components/ui/navbar/Profile.svelte @@ -133,7 +133,7 @@ {/snippet} {$t('nav.menu.settings')} - {#snippet target(attachment)} { let timeoutId: ReturnType - // eslint-disable-next-line return function (this: any, ...args: any[]) { clearTimeout(timeoutId) timeoutId = setTimeout(() => fn.apply(this, args), ms) diff --git a/src/lib/components/ui/navbar/commands/actions.svelte.ts b/src/lib/components/ui/navbar/commands/actions.svelte.ts index 31b3243a..39667e06 100644 --- a/src/lib/components/ui/navbar/commands/actions.svelte.ts +++ b/src/lib/components/ui/navbar/commands/actions.svelte.ts @@ -182,7 +182,7 @@ export function getGroups( { name: t.get('filter.sort.top.time.6hours'), icon: ChartBar, - href: '/?sort=TopSixHours', + href: '/?sort=TopSixHour', }, { name: t.get('filter.sort.top.time.hour'), diff --git a/src/lib/components/util/debug/DebugObject.svelte b/src/lib/components/util/debug/DebugObject.svelte index b926c0d9..f7c3db34 100644 --- a/src/lib/components/util/debug/DebugObject.svelte +++ b/src/lib/components/util/debug/DebugObject.svelte @@ -3,7 +3,6 @@ import { Modal } from 'mono-svelte' interface Props { - // eslint-disable-next-line object: any open?: boolean title?: import('svelte').Snippet diff --git a/src/lib/components/util/debug/DebugTree.svelte b/src/lib/components/util/debug/DebugTree.svelte index 18daa595..09c241e7 100644 --- a/src/lib/components/util/debug/DebugTree.svelte +++ b/src/lib/components/util/debug/DebugTree.svelte @@ -1,7 +1,6 @@ {#snippet selectTarget(attachment: Attachment)} -
    {/snippet} -
    + p.id == profile.meta.profile} items={profile.meta.profiles} diff --git a/src/routes/admin/+layout.svelte b/src/routes/admin/+layout.svelte index 90509fad..0b03d1a1 100644 --- a/src/routes/admin/+layout.svelte +++ b/src/routes/admin/+layout.svelte @@ -1,15 +1,9 @@ @@ -49,7 +43,6 @@ name: $t('routes.admin.media.title'), }, ]} - class="overflow-auto" /> {@render children?.()}
    diff --git a/src/routes/admin/+layout.ts b/src/routes/admin/+layout.ts index bd6beb1c..b000f9f4 100644 --- a/src/routes/admin/+layout.ts +++ b/src/routes/admin/+layout.ts @@ -1,6 +1,9 @@ +import { profile } from '$lib/auth.svelte.js' import { getClient, site as siteStore } from '$lib/lemmy.svelte.js' +import { error } from '@sveltejs/kit' export async function load({ fetch }) { + if (!profile.current.jwt) error(403) const site = siteStore if (!site.data) { diff --git a/src/routes/admin/team/+page.svelte b/src/routes/admin/team/+page.svelte index b039e8c2..b013c88b 100644 --- a/src/routes/admin/team/+page.svelte +++ b/src/routes/admin/team/+page.svelte @@ -74,7 +74,7 @@ {/if} { trycatch(async () => { if (!profile.current?.jwt || newAdmin == '') return @@ -106,7 +106,7 @@ disabled={adding} rounding="xl" color="primary" - class="h-full" + size="sm" submit > {#snippet prefix()} diff --git a/src/routes/communities/+page.svelte b/src/routes/communities/+page.svelte index 0292721c..c06ee075 100644 --- a/src/routes/communities/+page.svelte +++ b/src/routes/communities/+page.svelte @@ -41,14 +41,13 @@ {$t('routes.communities.title')} -
    - {$t('routes.communities.title')} - +
    + {$t('routes.communities.title')} {#snippet extended()} -
    +
    diff --git a/src/routes/inbox/+page.svelte b/src/routes/inbox/+page.svelte index 5aff9d22..d35dceda 100644 --- a/src/routes/inbox/+page.svelte +++ b/src/routes/inbox/+page.svelte @@ -12,6 +12,7 @@ import { Button, Option, Select } from 'mono-svelte' import { ArrowPath, Check, Funnel, Icon, Inbox } from 'svelte-hero-icons' import InboxItem from './InboxItem.svelte' + import Fixate from '$lib/components/ui/generic/Fixate.svelte' let { data } = $props() @@ -114,9 +115,7 @@ {/if} {#if !(data.page == 1 && (data?.inbox?.value.length ?? 0) == 0)} -
    + `?page=${page}`} /> -
    + {/if} diff --git a/src/routes/inbox/messages/+page.svelte b/src/routes/inbox/messages/+page.svelte index ffbac137..d9522b21 100644 --- a/src/routes/inbox/messages/+page.svelte +++ b/src/routes/inbox/messages/+page.svelte @@ -92,6 +92,7 @@ -
    - {#if data.filters.community} -
      -
    • - - {$t('form.post.community')} - - {#await client().getCommunity({ id: data.filters.community })} - - {:then community} - - - - - {/await} -
    • -
    - {/if} - {/snippet} -
    -
    - +
    + {$t('routes.moderation.title')} + {#snippet extended()} +
    + + +
    + {#if data.filters.community} +
      +
    • + + {$t('form.post.community')} + + {#await client().getCommunity({ id: data.filters.community })} + + {:then community} + + + + + {/await} +
    • +
    + {/if} + {/snippet} +
    +{#if batch.progress > 0} + +{/if} {#if data.items?.value && data.items?.value.length > 0} {#snippet item(item)} @@ -153,16 +154,19 @@ {/if} {/snippet} - `?page=${current}`} - hasMore={data.items.value.length >= 20} - /> + + `?page=${current}`} + hasMore={data.items.value.length >= 20} + /> + {:else} - +
    + +
    {/if} -
    diff --git a/src/routes/profile/(local_user)/blocks/+page.svelte b/src/routes/profile/(local_user)/blocks/+page.svelte index 2bd2ec35..6b6caed7 100644 --- a/src/routes/profile/(local_user)/blocks/+page.svelte +++ b/src/routes/profile/(local_user)/blocks/+page.svelte @@ -2,10 +2,11 @@ import { profile } from '$lib/auth.svelte.js' import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte' import UserLink from '$lib/components/lemmy/user/UserLink.svelte' + import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte' import Entity from '$lib/components/ui/Entity.svelte' + import CommonList from '$lib/components/ui/layout/CommonList.svelte' import Header from '$lib/components/ui/layout/pages/Header.svelte' import Placeholder from '$lib/components/ui/Placeholder.svelte' - import SectionTitle from '$lib/components/ui/SectionTitle.svelte' import { t } from '$lib/i18n/translations.js' import { getClient } from '$lib/lemmy.svelte.js' import type { @@ -14,11 +15,8 @@ PersonBlockView, } from 'lemmy-js-client' import { Button } from 'mono-svelte' - import Material from 'mono-svelte/materials/Material.svelte' import { Check, Icon, XMark } from 'svelte-hero-icons' import type { PageData } from './$types.js' - import CommonList from '$lib/components/ui/layout/CommonList.svelte' - import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte' interface Props { // sveltekit doesn't feel like making types work right now diff --git a/src/routes/saved/+page.svelte b/src/routes/saved/+page.svelte index 8dcb7c78..19a7fcd8 100644 --- a/src/routes/saved/+page.svelte +++ b/src/routes/saved/+page.svelte @@ -2,6 +2,7 @@ import { page } from '$app/state' import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte' import PostItem from '$lib/components/lemmy/post/PostItem.svelte' + import Fixate from '$lib/components/ui/generic/Fixate.svelte' import CommonList from '$lib/components/ui/layout/CommonList.svelte' import Header from '$lib/components/ui/layout/pages/Header.svelte' import Pageination from '$lib/components/ui/Pageination.svelte' @@ -78,10 +79,10 @@ {/snippet} {/if} -
    + `?page=${page}`} page={data.page} /> -
    + diff --git a/src/routes/saved/+page.ts b/src/routes/saved/+page.ts index f885d314..d3027990 100644 --- a/src/routes/saved/+page.ts +++ b/src/routes/saved/+page.ts @@ -26,7 +26,7 @@ export async function load({ url, fetch }) { const { posts, comments } = await client({ func: fetch }).getPersonDetails({ saved_only: true, limit: 20, - page: 1, + page: page, person_id: user?.local_user_view.person.id, }) diff --git a/src/routes/search/+page.svelte b/src/routes/search/+page.svelte index 1e7fa30d..fc56f683 100644 --- a/src/routes/search/+page.svelte +++ b/src/routes/search/+page.svelte @@ -55,12 +55,7 @@
    {$t('routes.search.title')} {#snippet extended()} - +
    - {#snippet customLabel()} - - - {$t('filter.location.label')} - - {/snippet} - - - - - -
    -
    - -
    -
    - + {#snippet customLabel()} +
    + + {$t('filter.location.label')} +
    + {/snippet} + + + + + + + -
    + + + + + +
  • - diff --git a/src/routes/theme/+page.svelte b/src/routes/theme/+page.svelte index b5eca331..6526d686 100644 --- a/src/routes/theme/+page.svelte +++ b/src/routes/theme/+page.svelte @@ -51,10 +51,10 @@ {/if} +
    {$t('routes.theme.title')}
    -
    {$t('routes.theme.title')}

    {$t('routes.theme.preset.presets')}

    diff --git a/src/style/app.css b/src/style/app.css index a07183f7..5b210d37 100644 --- a/src/style/app.css +++ b/src/style/app.css @@ -11,7 +11,7 @@ --font-display: Inter, system-ui, sans-serif; --font-mono: monospace; - --animate-pop-in: pop-in 0.8s cubic-bezier(0.075, 0.82, 0.165, 1) forwards; + --animate-pop-in: pop-in 0.8s cubic-bezier(0.075, 0.82, 0.165, 1); --ease-cubic: cubic-bezier(0.075, 0.82, 0.165, 1); --spacing-22: 88px; @@ -50,7 +50,7 @@ @keyframes pop-in { 0% { - transform: translateY(16px); + transform: translateY(12px); opacity: 0; } 100% {