fix: custom labels causing missing select

This commit is contained in:
James Xylight committed 2025-08-30 14:45:06 -07:00
1 parent e1cfff376e
commit d93d29a8b1
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'),
icon: ChartBar,
href: '/?sort=TopSixHours',
href: '/?sort=TopSixHour',
},
{
name: t.get('filter.sort.top.time.hour'),
+2 -2
View File
@@ -603,12 +603,12 @@
"title": "Removing Submission",
"titleRestore": "Restoring Submission",
"titlePurge": "Purging Submission",
"withReason": "Reply with reason",
"withReason": "Notify user",
"comment": "Comment",
"message": "Message",
"failReply": "Failed to post reply. 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."
},
"reportModal": {
+7 -4
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import type { Snippet } from 'svelte'
import type { ClassValue, HTMLAttributes } from 'svelte/elements'
interface Props extends HTMLAttributes<HTMLSpanElement> {
@@ -8,13 +9,14 @@
*/
text?: string | undefined
class?: ClassValue
children?: import('svelte').Snippet
customText?: Snippet
}
let {
for: forID = undefined,
text = undefined,
class: clazz = '',
customText,
children,
...rest
}: Props = $props()
@@ -26,8 +28,9 @@
class={['text-sm text-slate-800 dark:text-zinc-200 font-medium', clazz]}
>
{#if text}
{text}
{:else if children}
{@render children?.()}
<div class="inline-block">{text}</div>
{:else if customText}
{@render customText?.()}
{/if}
{@render children?.()}
</label>
+1 -2
View File
@@ -93,8 +93,7 @@
</script>
{#snippet selectTarget(attachment: Attachment)}
<Label text={label} class={['space-y-1 relative', clazz, baseClass]}>
{@render customLabel?.()}
<Label text={label} customText={customLabel} class={['space-y-1 relative', clazz, baseClass]}>
<div class="relative" role="presentation">
<select
{@attach attachment}
+1 -1
View File
@@ -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
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
bg-slate-50 relative {clazz}"
>