misc: increase visual separation for reports
This commit is contained in:
5 files changed
+61
-53
No files matched your search
@@ -99,7 +99,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<div class="flex flex-row items-center gap-2">
|
<div class="flex flex-row items-center gap-2">
|
||||||
<Button size="square-md" onclick={() => (showInfo = !showInfo)}>
|
<Button size="square-md" onclick={() => (showInfo = !showInfo)}>
|
||||||
<Icon src={InformationCircle} size="16" micro />
|
<Icon src={InformationCircle} size="16" mini />
|
||||||
</Button>
|
</Button>
|
||||||
<Subscribe {community}>
|
<Subscribe {community}>
|
||||||
{#snippet children({ subscribe, subscribing })}
|
{#snippet children({ subscribe, subscribing })}
|
||||||
|
|||||||
@@ -52,8 +52,8 @@
|
|||||||
use:focusTrap
|
use:focusTrap
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
width={400}
|
width={600}
|
||||||
height={400}
|
height={600}
|
||||||
src={page.state.openImage}
|
src={page.state.openImage}
|
||||||
class={[
|
class={[
|
||||||
'max-w-max mx-auto my-auto overscroll-contain bg-white dark:bg-zinc-900',
|
'max-w-max mx-auto my-auto overscroll-contain bg-white dark:bg-zinc-900',
|
||||||
|
|||||||
@@ -111,13 +111,13 @@
|
|||||||
{#if profile.data?.jwt}
|
{#if profile.data?.jwt}
|
||||||
<MenuButton link href="/profile">
|
<MenuButton link href="/profile">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={UserCircle} micro width={16} />
|
<Icon src={UserCircle} micro size="16" />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{$t('profile.profile')}
|
{$t('profile.profile')}
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
<MenuButton link href="/inbox">
|
<MenuButton link href="/inbox">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={Inbox} micro width={16} />
|
<Icon src={Inbox} micro size="16" />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{$t('profile.inbox')}
|
{$t('profile.inbox')}
|
||||||
{#if $notifications.inbox > 0}
|
{#if $notifications.inbox > 0}
|
||||||
@@ -128,21 +128,27 @@
|
|||||||
</MenuButton>
|
</MenuButton>
|
||||||
<MenuButton link href="/saved">
|
<MenuButton link href="/saved">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={Bookmark} micro width={16} />
|
<Icon src={Bookmark} micro size="16" />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{$t('profile.saved')}
|
{$t('profile.saved')}
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
{/if}
|
{/if}
|
||||||
<MenuButton link href="/accounts">
|
<MenuButton link href="/accounts">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={UserGroup} micro width={16} />
|
<Icon src={UserGroup} micro size="16" />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{$t('account.accounts')}
|
{$t('account.accounts')}
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
|
<MenuButton onclick={() => (showInstance = !showInstance)}>
|
||||||
|
{#snippet prefix()}
|
||||||
|
<Icon src={ServerStack} micro size="16" />
|
||||||
|
{/snippet}
|
||||||
|
{$t('nav.menu.instance')}
|
||||||
|
</MenuButton>
|
||||||
<MenuDivider>{$t('nav.menu.app')}</MenuDivider>
|
<MenuDivider>{$t('nav.menu.app')}</MenuDivider>
|
||||||
<MenuButton link href="/settings">
|
<MenuButton link href="/settings">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={Cog6Tooth} micro width={16} />
|
<Icon src={Cog6Tooth} micro size="16" />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{$t('nav.menu.settings')}
|
{$t('nav.menu.settings')}
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
@@ -186,7 +192,7 @@
|
|||||||
{#if settings.debugInfo}
|
{#if settings.debugInfo}
|
||||||
<MenuButton link href="/util">
|
<MenuButton link href="/util">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={BugAnt} mini width={16} />
|
<Icon src={BugAnt} mini size="16" />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
Debug
|
Debug
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
@@ -205,14 +211,6 @@
|
|||||||
<Badge color="blue-subtle">{__VERSION__}</Badge>
|
<Badge color="blue-subtle">{__VERSION__}</Badge>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
|
||||||
onclick={() => (showInstance = !showInstance)}
|
|
||||||
color="tertiary"
|
|
||||||
title={$t('nav.menu.instance')}
|
|
||||||
size="square-md"
|
|
||||||
>
|
|
||||||
<Icon src={ServerStack} size="16" micro />
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
href="https://buymeacoffee.com/xylight"
|
href="https://buymeacoffee.com/xylight"
|
||||||
|
|||||||
@@ -17,9 +17,11 @@
|
|||||||
import { t } from '$lib/translations'
|
import { t } from '$lib/translations'
|
||||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
import Option from 'mono-svelte/forms/select/Option.svelte'
|
import Option from 'mono-svelte/forms/select/Option.svelte'
|
||||||
|
import { tick } from 'svelte'
|
||||||
|
|
||||||
let { data = $bindable() } = $props()
|
let { data = $bindable() } = $props()
|
||||||
|
|
||||||
|
let type = $state(data.type)
|
||||||
let reports = $state(data.items)
|
let reports = $state(data.items)
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
reports = data.items
|
reports = data.items
|
||||||
@@ -32,8 +34,11 @@
|
|||||||
{#snippet extended()}
|
{#snippet extended()}
|
||||||
<div class="flex flex-row gap-2 flex-wrap items-end">
|
<div class="flex flex-row gap-2 flex-wrap items-end">
|
||||||
<Select
|
<Select
|
||||||
bind:value={data.type}
|
bind:value={type}
|
||||||
onchange={() => searchParam(page.url, 'type', data.type, 'page')}
|
onchange={async () => {
|
||||||
|
await tick()
|
||||||
|
searchParam(page.url, 'type', type, 'page')
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{#snippet customLabel()}
|
{#snippet customLabel()}
|
||||||
<span class="flex items-center gap-1">
|
<span class="flex items-center gap-1">
|
||||||
@@ -59,19 +64,12 @@
|
|||||||
{#each reports as item}
|
{#each reports as item}
|
||||||
<div
|
<div
|
||||||
in:fly={{ y: -6, opacity: 0, duration: 500 }}
|
in:fly={{ y: -6, opacity: 0, duration: 500 }}
|
||||||
class="flex flex-col gap-1 text-sm"
|
class="flex flex-col gap-3 text-sm -mx-4 sm:-mx-6 px-4 sm:px-6"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col gap-1.5">
|
<div class="space-y-2">
|
||||||
<span class="text-xs font-bold dark:text-zinc-400 text-slate-600">
|
|
||||||
Report from
|
|
||||||
</span>
|
|
||||||
<span class="font-bold">
|
|
||||||
<UserLink avatar user={item.creator} />
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Report {item} />
|
<Report {item} />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte'
|
import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte'
|
||||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||||
import { toast } from 'mono-svelte'
|
import { Material, toast } from 'mono-svelte'
|
||||||
import { getClient } from '$lib/lemmy.js'
|
import { getClient } from '$lib/lemmy.js'
|
||||||
import { isCommentReport, isPostReport } from '$lib/lemmy/item.js'
|
import { isCommentReport, isPostReport } from '$lib/lemmy/item.js'
|
||||||
import type {
|
import type {
|
||||||
@@ -100,11 +100,39 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if item.type == 'comment'}
|
<div class="flex flex-row">
|
||||||
<CommentItem community={true} comment={item.item} />
|
<div class="flex flex-col gap-1.5 flex-1">
|
||||||
{:else if item.type == 'post'}
|
<span class="text-xs font-medium">Report from</span>
|
||||||
<Post post={item.item} />
|
<span class="font-bold">
|
||||||
{:else if item.type == 'message'}
|
<UserLink avatar user={item.creator} />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
onclick={resolve}
|
||||||
|
class="h-max self-end {item.resolved
|
||||||
|
? '!text-green-600 dark:!text-green-400'
|
||||||
|
: ''}"
|
||||||
|
loading={resolving}
|
||||||
|
disabled={resolving}
|
||||||
|
rounding="pill"
|
||||||
|
color="ghost"
|
||||||
|
>
|
||||||
|
{#snippet prefix()}
|
||||||
|
<Icon src={CheckCircle} micro={item.resolved} size="18" />
|
||||||
|
{/snippet}
|
||||||
|
{!item.resolved
|
||||||
|
? $t('routes.moderation.resolve')
|
||||||
|
: $t('routes.moderation.resolved')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Material rounding="xl" color="uniform" class="dark:bg-zinc-950">
|
||||||
|
{#if item.type == 'comment'}
|
||||||
|
<CommentItem community={true} comment={item.item} class="!p-0" />
|
||||||
|
{:else if item.type == 'post'}
|
||||||
|
<Post post={item.item} class="!p-0" />
|
||||||
|
{:else if item.type == 'message'}
|
||||||
<PrivateMessage
|
<PrivateMessage
|
||||||
message={{
|
message={{
|
||||||
creator: item.reportee,
|
creator: item.reportee,
|
||||||
@@ -112,7 +140,8 @@
|
|||||||
recipient: item.creator,
|
recipient: item.creator,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
</Material>
|
||||||
|
|
||||||
<div class="flex flex-row gap-4 items-center flex-wrap">
|
<div class="flex flex-row gap-4 items-center flex-wrap">
|
||||||
<div>
|
<div>
|
||||||
@@ -131,21 +160,4 @@
|
|||||||
<UserLink avatar user={item.resolver} />
|
<UserLink avatar user={item.resolver} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<Button
|
|
||||||
onclick={resolve}
|
|
||||||
class="ml-auto {item.resolved
|
|
||||||
? '!text-green-600 dark:!text-green-400'
|
|
||||||
: ''}"
|
|
||||||
loading={resolving}
|
|
||||||
disabled={resolving}
|
|
||||||
rounding="pill"
|
|
||||||
color="ghost"
|
|
||||||
>
|
|
||||||
{#snippet prefix()}
|
|
||||||
<Icon src={CheckCircle} micro={item.resolved} size="18" />
|
|
||||||
{/snippet}
|
|
||||||
{!item.resolved
|
|
||||||
? $t('routes.moderation.resolve')
|
|
||||||
: $t('routes.moderation.resolved')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user