refactor: manually write like 3,000 import statements because i must test my willpower

This commit is contained in:
Xylight committed 2025-09-24 21:19:19 -07:00
1 parent 75f907743e
commit 0479aba095
274 files changed
+1222 -1702

No files matched your search

+12 -12
View File
@@ -1,17 +1,16 @@
<script lang="ts">
import { page } from '$app/state'
import { profile } from '$lib/app/auth.svelte.js'
import UserLink from '$comp/lemmy/user/UserLink.svelte'
import { getClient } from '$lib/api/client.svelte'
import { profile } from '$lib/app/auth.svelte'
import { errorMessage } from '$lib/app/error'
import { t } from '$lib/app/i18n'
import Markdown from '$lib/app/markdown/Markdown.svelte'
import { publishedToDate } from '$comp/util/date.js'
import { settings } from '$lib/app/settings.svelte'
import { publishedToDate } from '$lib/ui/util/date'
import { Button, Modal, toast } from 'mono-svelte'
import RelativeDate, {
formatRelativeDate,
} from '$comp/util/RelativeDate.svelte'
import { t } from '$lib/app/i18n'
import { getClient } from '$lib/api/client.svelte'
import { errorMessage } from '$lib/lemmy/error'
import { settings } from '$lib/settings.svelte'
import { Button, Modal, toast } from 'mono-svelte'
} from 'mono-svelte/util/RelativeDate.svelte'
import {
Bookmark,
Icon,
@@ -21,13 +20,14 @@
Plus,
ShieldCheck,
Trash,
} from 'svelte-hero-icons'
} from 'svelte-hero-icons/dist'
import { expoOut } from 'svelte/easing'
import type { ClassValue } from 'svelte/elements'
import { slide } from 'svelte/transition'
import type { CommentNodeI } from './comments.svelte'
import CommentForm from './CommentForm.svelte'
import UserLink from '../user/UserLink.svelte'
import CommentActions from './CommentActions.svelte'
import CommentForm from './CommentForm.svelte'
import type { CommentNodeI } from './comments.svelte'
interface Props {
node: CommentNodeI
@@ -1,11 +1,8 @@
<script lang="ts">
import { profile } from '$lib/app/auth.svelte.js'
import type { CommentView } from '$lib/api/types'
import CommentModerationMenu from '$comp/lemmy/moderation/CommentModerationMenu.svelte'
import { amMod, isAdmin, report } from '$comp/lemmy/moderation/moderation.js'
import { profile } from '$lib/app/auth.svelte'
import { t } from '$lib/app/i18n'
import { deleteItem, save } from '$lib/lemmy/contentview.js'
import { settings } from '$lib/settings.svelte'
import { settings } from '$lib/app/settings.svelte'
import { Button, Menu, MenuButton } from 'mono-svelte'
import {
Bookmark,
@@ -16,7 +13,10 @@
PencilSquare,
Share,
Trash,
} from 'svelte-hero-icons'
} from 'svelte-hero-icons/dist'
import { deleteItem, save } from '../legacy/contentview'
import CommentModerationMenu from '../moderation/CommentModerationMenu.svelte'
import { amMod, isAdmin, report } from '../moderation/moderation'
import CommentVote from './CommentVote.svelte'
interface Props {
+7 -7
View File
@@ -1,14 +1,14 @@
<script lang="ts">
import { profile } from '$lib/app/auth.svelte.js'
import { client, site } from '$lib/api/client.svelte'
import type { CommentResponse } from '$lib/api/types'
import { profile } from '$lib/app/auth.svelte'
import { errorMessage } from '$lib/app/error'
import { t } from '$lib/app/i18n'
import Markdown from '$lib/app/markdown/Markdown.svelte'
import MarkdownEditor from '$lib/app/markdown/MarkdownEditor.svelte'
import { t } from '$lib/app/i18n'
import { client, site } from '$lib/api/client.svelte'
import { errorMessage } from '$lib/lemmy/error'
import { placeholders } from '$lib/util.svelte.js'
import type { CommentResponse } from '$lib/api/types'
import { placeholders } from '$lib/app/util.svelte'
import { Button, Menu, MenuButton, toast } from 'mono-svelte'
import { Icon, Language, XMark } from 'svelte-hero-icons'
import { Icon, Language, XMark } from 'svelte-hero-icons/dist'
import type { ClassValue, HTMLTextareaAttributes } from 'svelte/elements'
interface Props extends Omit<HTMLTextareaAttributes, 'oncancel'> {
+3 -3
View File
@@ -1,9 +1,9 @@
<script lang="ts">
import { publishedToDate } from '$comp/util/date.js'
import { t } from '$lib/app/i18n'
import type { CommentView } from '$lib/api/types'
import { t } from '$lib/app/i18n'
import { publishedToDate } from '$lib/ui/util/date'
import { Button, Material } from 'mono-svelte'
import { ArrowUturnUp, Icon } from 'svelte-hero-icons'
import { ArrowUturnUp, Icon } from 'svelte-hero-icons/dist'
import type { ClassValue } from 'svelte/elements'
import { PostMeta } from '../post'
import Comment from './Comment.svelte'
@@ -1,10 +1,4 @@
<script lang="ts">
import VirtualList from '$lib/app/render/VirtualList.svelte'
import type { Post } from '$lib/api/types'
import type { CommentNodeI } from './comments.svelte'
import Comments from './CommentTree.svelte'
import { onMount } from 'svelte'
interface Props {
nodes: CommentNodeI[]
post: Post
+5 -5
View File
@@ -3,13 +3,13 @@
import { goto } from '$app/navigation'
import { client } from '$lib/api/client.svelte'
import type { Post } from '$lib/api/types'
import { errorMessage } from '$lib/app/error'
import { t } from '$lib/app/i18n'
import { errorMessage } from '$lib/lemmy/error'
import { Button, toast } from 'mono-svelte'
import { ArrowDownCircle } from 'svelte-hero-icons'
import { ArrowDownCircle } from 'svelte-hero-icons/dist'
import Comment from './Comment.svelte'
import Comments from './CommentTree.svelte'
import { buildCommentsTree, type CommentNodeI } from './comments.svelte'
import { type CommentNodeI, buildCommentsTree } from './comments.svelte'
import CommentTree from './CommentTree.svelte'
interface Props {
nodes: CommentNodeI[]
@@ -102,7 +102,7 @@
bind:open={nodes[index].expanded}
>
{#if node.children?.length > 0}
<Comments {post} bind:nodes={nodes[index].children} />
<CommentTree {post} bind:nodes={nodes[index].children} />
{/if}
</Comment>
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
+6 -7
View File
@@ -1,17 +1,16 @@
<script lang="ts">
import { profile } from '$lib/app/auth.svelte.js'
import { site } from '$lib/api/client.svelte'
import FormattedNumber from '$comp/util/FormattedNumber.svelte'
import { profile } from '$lib/app/auth.svelte'
import { errorMessage } from '$lib/app/error'
import { t } from '$lib/app/i18n'
import { errorMessage } from '$lib/lemmy/error'
import { settings } from '$lib/settings.svelte'
import { settings } from '$lib/app/settings.svelte'
import FormattedNumber from '$lib/ui/util/FormattedNumber.svelte'
import { buttonColor, toast } from 'mono-svelte'
import { ChevronDown, ChevronUp, Icon } from 'svelte-hero-icons'
import { ChevronDown, ChevronUp, Icon } from 'svelte-hero-icons/dist'
import { backOut } from 'svelte/easing'
import { fly } from 'svelte/transition'
import { vote as voteItem } from '../legacy/contentview'
import { shouldShowVoteColor } from '../post/PostVote.svelte'
import { vote as voteItem } from '$lib/lemmy/contentview'
import type { Comment } from '$lib/api/types'
interface Props {
vote?: number
@@ -1,7 +1,3 @@
import { t } from '$lib/app/i18n/translations'
import type { Comment, CommentView } from '$lib/client/types'
import { SvelteMap } from 'svelte/reactivity'
export interface CommentNodeI {
comment_view: CommentView
children: Array<CommentNodeI>