feat: add sorts to user pages
This commit is contained in:
1 parent
d427d4b2fc
commit
c0aaf08a9f
12 files changed
+129
-69
No files matched your search
@@ -79,7 +79,7 @@
|
||||
</Button>
|
||||
<span class="text-xs opacity-80 py-1 my-1 px-4">Comment actions</span>
|
||||
{#if $authData?.token}
|
||||
{#if comment.creator.id == $user?.person.id}
|
||||
{#if comment.creator.id == $user?.local_user_view.person.id}
|
||||
<MenuButton on:click={() => dispatcher('edit', comment)}>
|
||||
<Icon src={PencilSquare} mini size="16" />
|
||||
<span>Edit</span>
|
||||
@@ -89,7 +89,7 @@
|
||||
<Icon src={comment.saved ? BookmarkSlash : Bookmark} mini size="16" />
|
||||
<span>{comment.saved ? 'Unsave' : 'Save'}</span>
|
||||
</MenuButton>
|
||||
{#if $user && $authData && isCommentMutable(comment, $user)}
|
||||
{#if $user && $authData && isCommentMutable(comment, $user.local_user_view)}
|
||||
<MenuButton
|
||||
color={Color.dangerSecondary}
|
||||
on:click={async () => {
|
||||
@@ -116,7 +116,7 @@
|
||||
<span>Delete</span>
|
||||
</MenuButton>
|
||||
{/if}
|
||||
{#if $authData && $user?.person.id != comment.creator.id}
|
||||
{#if $authData && $user?.local_user_view.person.id != comment.creator.id}
|
||||
<MenuButton
|
||||
on:click={() => report(comment)}
|
||||
color={Color.dangerSecondary}
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
</MenuButton>
|
||||
<hr class="w-[90%] mx-auto opacity-100 dark:opacity-10 my-2" />
|
||||
<li class="mx-4 text-xs opacity-80 text-left my-1 py-1">Actions</li>
|
||||
{#if $user && $user.person.id == post.creator.id}
|
||||
{#if $user && $user.local_user_view.person.id == post.creator.id}
|
||||
<MenuButton on:click={() => (editing = true)}>
|
||||
<Icon src={PencilSquare} width={16} mini />
|
||||
Edit
|
||||
@@ -147,13 +147,13 @@
|
||||
<Icon src={post.saved ? BookmarkSlash : Bookmark} width={16} mini />
|
||||
{post.saved ? 'Unsave' : 'Save'}
|
||||
</MenuButton>
|
||||
{#if $user && isMutable(post, $user)}
|
||||
{#if $user && isMutable(post, $user.local_user_view)}
|
||||
<MenuButton on:click={deletePost} color={Color.dangerSecondary}>
|
||||
<Icon src={Trash} width={16} mini />
|
||||
Delete
|
||||
</MenuButton>
|
||||
{/if}
|
||||
{#if $user?.person.id != post.creator.id}
|
||||
{#if $user?.local_user_view.person.id != post.creator.id}
|
||||
<MenuButton on:click={() => report(post)} color={Color.dangerSecondary}>
|
||||
<Icon src={Flag} width={16} mini />
|
||||
Report
|
||||
|
||||
Reference in new issue
Block a user