fix: custom labels causing missing select
This commit is contained in:
6 files changed
+19
-15
No files matched your search
@@ -182,7 +182,7 @@ export function getGroups(
|
|||||||
{
|
{
|
||||||
name: t.get('filter.sort.top.time.6hours'),
|
name: t.get('filter.sort.top.time.6hours'),
|
||||||
icon: ChartBar,
|
icon: ChartBar,
|
||||||
href: '/?sort=TopSixHours',
|
href: '/?sort=TopSixHour',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: t.get('filter.sort.top.time.hour'),
|
name: t.get('filter.sort.top.time.hour'),
|
||||||
|
|||||||
@@ -603,12 +603,12 @@
|
|||||||
"title": "Removing Submission",
|
"title": "Removing Submission",
|
||||||
"titleRestore": "Restoring Submission",
|
"titleRestore": "Restoring Submission",
|
||||||
"titlePurge": "Purging Submission",
|
"titlePurge": "Purging Submission",
|
||||||
"withReason": "Reply with reason",
|
"withReason": "Notify user",
|
||||||
"comment": "Comment",
|
"comment": "Comment",
|
||||||
"message": "Message",
|
"message": "Message",
|
||||||
"failReply": "Failed to post reply. Removing anyway...",
|
"failReply": "Failed to post reply. Removing anyway...",
|
||||||
"failMessage": "Failed to message user. Removing anyway...",
|
"failMessage": "Failed to message user. Removing anyway...",
|
||||||
"failEmptyReply": "Your reply cannot be empty if 'Reply with reason' is enabled.",
|
"failEmptyReply": "Your reply cannot be empty if 'Notify user' is enabled.",
|
||||||
"successPurge": "Successfully purged that submission."
|
"successPurge": "Successfully purged that submission."
|
||||||
},
|
},
|
||||||
"reportModal": {
|
"reportModal": {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import type { Snippet } from 'svelte'
|
||||||
import type { ClassValue, HTMLAttributes } from 'svelte/elements'
|
import type { ClassValue, HTMLAttributes } from 'svelte/elements'
|
||||||
|
|
||||||
interface Props extends HTMLAttributes<HTMLSpanElement> {
|
interface Props extends HTMLAttributes<HTMLSpanElement> {
|
||||||
@@ -8,13 +9,14 @@
|
|||||||
*/
|
*/
|
||||||
text?: string | undefined
|
text?: string | undefined
|
||||||
class?: ClassValue
|
class?: ClassValue
|
||||||
children?: import('svelte').Snippet
|
customText?: Snippet
|
||||||
}
|
}
|
||||||
|
|
||||||
let {
|
let {
|
||||||
for: forID = undefined,
|
for: forID = undefined,
|
||||||
text = undefined,
|
text = undefined,
|
||||||
class: clazz = '',
|
class: clazz = '',
|
||||||
|
customText,
|
||||||
children,
|
children,
|
||||||
...rest
|
...rest
|
||||||
}: Props = $props()
|
}: Props = $props()
|
||||||
@@ -26,8 +28,9 @@
|
|||||||
class={['text-sm text-slate-800 dark:text-zinc-200 font-medium', clazz]}
|
class={['text-sm text-slate-800 dark:text-zinc-200 font-medium', clazz]}
|
||||||
>
|
>
|
||||||
{#if text}
|
{#if text}
|
||||||
{text}
|
<div class="inline-block">{text}</div>
|
||||||
{:else if children}
|
{:else if customText}
|
||||||
{@render children?.()}
|
{@render customText?.()}
|
||||||
{/if}
|
{/if}
|
||||||
|
{@render children?.()}
|
||||||
</label>
|
</label>
|
||||||
@@ -93,8 +93,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#snippet selectTarget(attachment: Attachment)}
|
{#snippet selectTarget(attachment: Attachment)}
|
||||||
<Label text={label} class={['space-y-1 relative', clazz, baseClass]}>
|
<Label text={label} customText={customLabel} class={['space-y-1 relative', clazz, baseClass]}>
|
||||||
{@render customLabel?.()}
|
|
||||||
<div class="relative" role="presentation">
|
<div class="relative" role="presentation">
|
||||||
<select
|
<select
|
||||||
{@attach attachment}
|
{@attach attachment}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ bg-white/50 dark:bg-black/50 box-border p-4"
|
|||||||
}}
|
}}
|
||||||
class="w-full border border-slate-200 border-b-slate-300
|
class="w-full border border-slate-200 border-b-slate-300
|
||||||
dark:border-zinc-900
|
dark:border-zinc-900
|
||||||
rounded-3xl max-w-lg box-border mx-auto overscroll-contain shadow-lg overflow-auto
|
rounded-2xl max-w-lg box-border mx-auto overscroll-contain shadow-lg overflow-auto
|
||||||
p-5 flex flex-col gap-2 dark:bg-zinc-950
|
p-5 flex flex-col gap-2 dark:bg-zinc-950
|
||||||
bg-slate-50 relative {clazz}"
|
bg-slate-50 relative {clazz}"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -159,9 +159,11 @@
|
|||||||
hasMore={data.items.value.length >= 20}
|
hasMore={data.items.value.length >= 20}
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<Placeholder
|
<div class="h-full grid place-items-center">
|
||||||
icon={ShieldCheck}
|
<Placeholder
|
||||||
title={$t('routes.moderation.empty.title')}
|
icon={ShieldCheck}
|
||||||
description={$t('routes.moderation.empty.description')}
|
title={$t('routes.moderation.empty.title')}
|
||||||
/>
|
description={$t('routes.moderation.empty.description')}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
Reference in new issue
Block a user