diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index 856bb25d..8e04235d 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -31,7 +31,9 @@ export let node: CommentNodeI export let postId: number export let op: boolean = false + export let actions: boolean = true + export let meta: boolean = true export let open = true export let replying = false @@ -109,81 +111,83 @@ : ''} {highlight} {$$props.class}" id={node.comment_view.comment.id.toString()} > - + + + + {#if node.comment_view.creator_is_moderator} + + {/if} + {#if node.comment_view.creator_is_admin} + + {/if} + + + {#if op} + + {/if} + + + + {#if node.comment_view.comment.updated} + + {/if} + {#if node.comment_view.comment.deleted || node.comment_view.comment.removed} + + {/if} + {#if node.comment_view.saved} + + {/if} + + + {/if} {#if open}
{#if actions} diff --git a/src/lib/components/lemmy/comment/CommentItem.svelte b/src/lib/components/lemmy/comment/CommentItem.svelte index 22394e96..3130c9f4 100644 --- a/src/lib/components/lemmy/comment/CommentItem.svelte +++ b/src/lib/components/lemmy/comment/CommentItem.svelte @@ -12,51 +12,61 @@ export let comment: CommentView export let view = $userSettings.view export let community = false + + export let meta: boolean = true -
-
- + {#if meta} +
+
+ +
+
- -
+ {/if}
diff --git a/src/lib/components/lemmy/inbox/PrivateMessage.svelte b/src/lib/components/lemmy/inbox/PrivateMessage.svelte index 95779c97..0d0369c4 100644 --- a/src/lib/components/lemmy/inbox/PrivateMessage.svelte +++ b/src/lib/components/lemmy/inbox/PrivateMessage.svelte @@ -5,26 +5,29 @@ import type { PrivateMessageView } from 'lemmy-js-client' export let message: PrivateMessageView + export let meta: boolean = true -
-
- From - - {#if $profile?.user?.local_user_view.person.id != message.recipient.id} - to +
+ {#if meta} +
+ From - {/if} -
+ {#if $profile?.user?.local_user_view.person.id != message.recipient.id} + to + + {/if} +
+ {/if}
diff --git a/src/lib/components/lemmy/post/form/PostForm.svelte b/src/lib/components/lemmy/post/form/PostForm.svelte index 2f3ba3a3..817dfa43 100644 --- a/src/lib/components/lemmy/post/form/PostForm.svelte +++ b/src/lib/components/lemmy/post/form/PostForm.svelte @@ -381,7 +381,8 @@ data.url = url.toString() } catch (e) {} }} - size="lg" + size="sm" + rounding="pill" > {$t('form.post.addUrl')} @@ -391,14 +392,15 @@ data.url = '' uploadingImage = true }} - size="lg" + size="sm" + rounding="pill" > {$t('form.post.uploadImage')} {/if} {#if data.language_id === undefined} - diff --git a/src/lib/components/ui/Expandable.svelte b/src/lib/components/ui/Expandable.svelte index c0943118..508f5a53 100644 --- a/src/lib/components/ui/Expandable.svelte +++ b/src/lib/components/ui/Expandable.svelte @@ -2,6 +2,7 @@ import { Disclosure } from 'mono-svelte' import { Minus, Plus, Icon } from 'svelte-hero-icons' export let open: boolean = false + export let icon: boolean = true
- + {#if icon} + + {/if}
+
diff --git a/src/lib/components/ui/navbar/Navbar.svelte b/src/lib/components/ui/navbar/Navbar.svelte index 52c9846e..6c1b35c2 100644 --- a/src/lib/components/ui/navbar/Navbar.svelte +++ b/src/lib/components/ui/navbar/Navbar.svelte @@ -37,6 +37,7 @@ import CommandsWrapper from './commands/CommandsWrapper.svelte' import { optimizeImageURL } from '$lib/components/lemmy/post/helpers' import { userSettings } from '$lib/settings' + import { dockProps } from '../layout/Shell.svelte' let promptOpen: boolean = false @@ -153,7 +154,7 @@ {/if} - {#if $profile?.user?.local_user_view.person.avatar} + {#if $profile?.user?.local_user_view.person.avatar && !$dockProps.noGap}
- import { backOut, expoOut } from 'svelte/easing' - import { slide } from 'svelte/transition' + import { backOut, expoOut } from 'svelte/easing' + import { slide } from 'svelte/transition' - export let open: boolean = false + export let open: boolean = false
- - {#if open} -
- -
- {/if} + + + {#if open} +
+ +
+ {/if}
diff --git a/src/routes/communities/+page.svelte b/src/routes/communities/+page.svelte index e03d1260..8931469a 100644 --- a/src/routes/communities/+page.svelte +++ b/src/routes/communities/+page.svelte @@ -149,7 +149,7 @@ {#each sliced as community, index (community.community.id)}
+
+ + $page.url.search == route || + ($page.url.pathname == route && $page.url.search == '') || + $page.url.searchParams.toString().includes(route.slice(1)) || + ($page.url.search == '' && route == def)} + class="overflow-auto w-full" + buildUrl={(route, href) => + href.includes('?') + ? '?' + addSearchParam($page.url.searchParams, href).toString() + : `${href}${$page.url.search}`} + defaultRoute="?type=All" + /> + + $page.url.searchParams.toString().includes(route.slice(1)) || + ($page.url.search == '' && route == def)} + buildUrl={(route, href) => + '?' + addSearchParam($page.url.searchParams, href).toString()} + defaultRoute="?unreadOnly=true" + /> +
- - $page.url.search == route || - ($page.url.pathname == route && $page.url.search == '') || - $page.url.searchParams.toString().includes(route.slice(1)) || - ($page.url.search == '' && route == def)} - class="overflow-auto w-full" - buildUrl={(route, href) => - href.includes('?') - ? '?' + addSearchParam($page.url.searchParams, href).toString() - : `${href}${$page.url.search}`} - defaultRoute="?type=All" - /> - - $page.url.searchParams.toString().includes(route.slice(1)) || - ($page.url.search == '' && route == def)} - buildUrl={(route, href) => - '?' + addSearchParam($page.url.searchParams, href).toString()} - defaultRoute="?unreadOnly=true" - /> -
-
{#if !data.data || (data.data?.length ?? 0) == 0} {:else} - {#each data.data as item} -
- + {#each data.data as item, index (item.id)} +
+
{/each} {/if} diff --git a/src/routes/inbox/InboxItem.svelte b/src/routes/inbox/InboxItem.svelte index 824776e4..bde2e2b4 100644 --- a/src/routes/inbox/InboxItem.svelte +++ b/src/routes/inbox/InboxItem.svelte @@ -11,6 +11,8 @@ Check, Envelope, Icon, + Eye, + EyeSlash, } from 'svelte-hero-icons' import { Material } from 'mono-svelte' import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte' @@ -22,6 +24,9 @@ import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte' import PrivateMessageModal from '$lib/components/lemmy/modal/PrivateMessageModal.svelte' import { t } from '$lib/translations' + import Expandable from '$lib/components/ui/Expandable.svelte' + import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte' + import Avatar from '$lib/components/ui/Avatar.svelte' export let item: InboxItem @@ -68,91 +73,120 @@ {/if} - -
-
- -
- +
+ - {#if item.type != 'private_message'} - - {:else} - - {/if} -
- {#if !(item.type == 'private_message' && item.item.creator.id == $profile?.user?.local_user_view.person.id)} - - {/if} - - {#if item.type == 'private_message'} - {#if item.item.creator.id != $profile?.user?.local_user_view.person.id} - + +
+
+ {#if item.type == 'comment_reply'} + {@html $t('routes.inbox.item.reply', { + // @ts-ignore + user: `${item.creator.name}`, + post: `${item.item.post.name}`, + })} + {:else if item.type == 'person_mention'} + {@html $t('routes.inbox.item.mention', { + // @ts-ignore + user: `${item.creator.name}`, + post: `${item.item.post.name}`, + })} + {:else if item.type == 'private_message'} + {@html $t('routes.inbox.item.message', { + // @ts-ignore + user: `${item.item.creator.name}`, + recipient: `${item.item.recipient.name}`, + })} {/if} - {:else} +
+
+ +
+
+
+
+ + {#if item.type == 'comment_reply' || item.type == 'person_mention'} {/if}
-
- {#if item.type != 'private_message' && $profile?.user && item.item.post.creator_id != $profile.user.local_user_view.person.id} -
-
-
- -
-
- {/if} - {#if item.type != 'private_message'} - +
+ + {#if item.type == 'comment_reply' || item.type == 'person_mention'} + {/if}
- + + {#if item.type == 'comment_reply' || item.type == 'person_mention'} + + {:else} + + {/if} + +