refactor: prefer barrel exports
This commit is contained in:
64 files changed
+181
-249
No files matched your search
@@ -4,16 +4,14 @@
|
||||
import { client } from '$lib/client/lemmy.svelte'
|
||||
import ObjectAutocomplete from '$lib/components/lemmy/ObjectAutocomplete.svelte'
|
||||
import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte'
|
||||
import CommunityItem from '$lib/components/lemmy/community/CommunityItem.svelte'
|
||||
import { CommunityItem } from '$lib/components/lemmy/community'
|
||||
import Sort from '$lib/components/lemmy/dropdowns/Sort.svelte'
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import PostItem from '$lib/components/lemmy/post/PostItem.svelte'
|
||||
import UserItem from '$lib/components/lemmy/user/UserItem.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||
import Skeleton from '$lib/components/ui/generic/Skeleton.svelte'
|
||||
import CommonList from '$lib/components/ui/layout/CommonList.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { CommonList, Header, SearchBar } from '$lib/components/ui/layout'
|
||||
import Pageination from '$lib/components/ui/layout/Pageination.svelte'
|
||||
import { t } from '$lib/i18n/translations.js'
|
||||
import {
|
||||
isCommentView,
|
||||
@@ -22,8 +20,7 @@
|
||||
isUser,
|
||||
} from '$lib/lemmy/item.js'
|
||||
import { searchParam } from '$lib/util.svelte.js'
|
||||
import { Button, Select, TextLoader } from 'mono-svelte'
|
||||
import Option from 'mono-svelte/forms/select/Option.svelte'
|
||||
import { Button, Option, Select, TextLoader } from 'mono-svelte'
|
||||
import {
|
||||
AdjustmentsHorizontal,
|
||||
ChevronDoubleDown,
|
||||
@@ -33,7 +30,6 @@
|
||||
} from 'svelte-hero-icons'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
import { fly, slide } from 'svelte/transition'
|
||||
import SearchBar from './SearchBar.svelte'
|
||||
|
||||
let { data } = $props()
|
||||
|
||||
@@ -163,7 +159,7 @@
|
||||
<CommunityItem community={object.community} showCounts={false} />
|
||||
{/if}
|
||||
{#if object.post}
|
||||
<Post post={object.post} />
|
||||
<PostItem post={object.post} />
|
||||
{/if}
|
||||
{#if object.comment}
|
||||
<CommentItem comment={object.comment} />
|
||||
|
||||
@@ -2,7 +2,7 @@ import { profile } from '$lib/auth.svelte'
|
||||
import { client, getClient } from '$lib/client/lemmy.svelte'
|
||||
import { PiefedClient } from '$lib/client/piefed/piefed.js'
|
||||
import { getItemPublished } from '$lib/lemmy/item.js'
|
||||
import { ReactiveState } from '$lib/promise.svelte.js'
|
||||
import { ReactiveState } from '$lib/util.svelte.js'
|
||||
import type { ListingType, SearchType, SortType } from '$lib/client/types'
|
||||
|
||||
export async function load({ url, fetch }) {
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { navigating } from '$app/state'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { Button, TextInput } from 'mono-svelte'
|
||||
import { Icon, MagnifyingGlass } from 'svelte-hero-icons'
|
||||
|
||||
interface Props {
|
||||
query?: string | null
|
||||
}
|
||||
|
||||
let { query = $bindable() }: Props = $props()
|
||||
|
||||
let searchElement = $state<HTMLInputElement>()
|
||||
</script>
|
||||
|
||||
<div class="flex gap-2 flex-row items-center w-full text-base h-10">
|
||||
<TextInput
|
||||
bind:value={query}
|
||||
bind:element={searchElement}
|
||||
name="q"
|
||||
placeholder={$t('routes.search.query')}
|
||||
size="lg"
|
||||
class="flex-1 rounded-full! h-full text-base!"
|
||||
/>
|
||||
<Button
|
||||
submit
|
||||
color="primary"
|
||||
size="custom"
|
||||
class="shrink-0 h-full aspect-square shadow-md"
|
||||
title="Search"
|
||||
rounding="pill"
|
||||
loading={navigating.to?.route.id == '/search'}
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={MagnifyingGlass} size="16" micro />
|
||||
{/snippet}
|
||||
</Button>
|
||||
</div>
|
||||
Reference in new issue
Block a user