design: redesign inbox (again)

This commit is contained in:
Xylight committed 2024-10-19 14:27:36 -07:00
1 parent 0d378ec248
commit 0d0681b687
13 files changed
+361 -281

No files matched your search

@@ -12,51 +12,61 @@
export let comment: CommentView
export let view = $userSettings.view
export let community = false
export let meta: boolean = true
</script>
<Material
class="flex flex-col flex-1 {view != 'card'
? '!bg-transparent !border-0 rounded-none'
: 'p-5'} {view == 'list' ? 'py-5' : view == 'compact' ? 'py-4' : 'py-5'}"
: 'p-5'} {view == 'list'
? 'py-5'
: view == 'compact'
? 'py-4'
: 'py-5'} {$$props.class}"
color="distinct"
padding="none"
>
<div class="flex flex-row justify-between items-center gap-2">
<div class="flex flex-col gap-2">
<PostMeta
badges={{
nsfw: comment.post.nsfw,
removed: comment.post.removed,
admin: false,
moderator: false,
saved: false,
deleted: comment.post.deleted,
featured:
comment.post.featured_community || comment.post.featured_local,
locked: comment.post.locked,
}}
published={publishedToDate(comment.comment.published)}
community={community ? comment.community : undefined}
title={comment.post.name}
id={comment.post.id}
titleClass="text-sm"
/>
{#if meta}
<div class="flex flex-row justify-between items-center gap-2">
<div class="flex flex-col gap-2">
<PostMeta
badges={{
nsfw: comment.post.nsfw,
removed: comment.post.removed,
admin: false,
moderator: false,
saved: false,
deleted: comment.post.deleted,
featured:
comment.post.featured_community || comment.post.featured_local,
locked: comment.post.locked,
}}
published={publishedToDate(comment.comment.published)}
community={community ? comment.community : undefined}
title={comment.post.name}
id={comment.post.id}
titleClass="text-sm"
/>
</div>
<Button
color="primary"
href="/post/{comment.post.id}?thread={comment.comment.path}#{comment
.comment.id}"
class="self-start"
>
{$t('common.jump')}
<Icon src={ArrowUturnUp} size="16" micro />
</Button>
</div>
<Button
color="primary"
href="/post/{comment.post.id}?thread={comment.comment.path}#{comment
.comment.id}"
class="self-start"
>
{$t('common.jump')}
<Icon src={ArrowUturnUp} size="16" micro />
</Button>
</div>
{/if}
<div class="list-none">
<Comment
postId={comment.post.id}
node={{ children: [], comment_view: comment, depth: 1 }}
node={{ children: [], comment_view: comment, depth: 1, ui: {} }}
replying={false}
{meta}
{...$$restProps}
/>
</div>
</Material>