fix: disallow media description exceeding limits (#1854)

This commit is contained in:
Zaidhaan 2023-03-06 21:12:31 +08:00 committed by GitHub
parent 8fd697126b
commit cb0b7b58bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 6 deletions

View file

@ -0,0 +1,12 @@
<script setup lang="ts">
const props = defineProps<{
max: number
length: number
}>()
</script>
<template>
<div dir="ltr" pointer-events-none pe-1 pt-2 text-sm tabular-nums text-secondary flex gap="0.5" :class="{ 'text-rose-500': length > max }">
{{ length ?? 0 }}<span text-secondary-light>/</span><span text-secondary-light>{{ max }}</span>
</div>
</template>