refactor(room-item): name truncation thresholds

This commit is contained in:
2026-04-10 20:35:36 +05:30
parent 8fb13ad58d
commit c0706f9027
+6 -2
View File
@@ -8,10 +8,14 @@
import {getRoomItemPath} from "@app/util/routes"
const props: ComponentProps<typeof NoteContent> = $props()
const MESSAGE_MIN_LENGTH = 5000
const MESSAGE_MAX_LENGTH = 5500
const path = getRoomItemPath(props.url!, props.event)
const minLength = props.minLength ?? (props.event.kind === MESSAGE ? 5000 : undefined)
const maxLength = props.maxLength ?? (props.event.kind === MESSAGE ? 5500 : undefined)
const minLength =
props.minLength ?? (props.event.kind === MESSAGE ? MESSAGE_MIN_LENGTH : undefined)
const maxLength =
props.maxLength ?? (props.event.kind === MESSAGE ? MESSAGE_MAX_LENGTH : undefined)
</script>
<div class={cx("text-sm", {"card2 card2-sm bg-alt": props.event.kind !== MESSAGE})}>