feat: respect current server's char limit

This commit is contained in:
Daniel Roe 2022-11-25 14:01:28 +00:00
parent b8ce2fc62b
commit f7dff673ad
No known key found for this signature in database
GPG key ID: 22D5008E4F5D9B55
4 changed files with 11 additions and 8 deletions

View file

@ -3,7 +3,6 @@ import type { CreateStatusParams, StatusVisibility } from 'masto'
import { fileOpen } from 'browser-fs-access'
import { useDropZone } from '@vueuse/core'
import { EditorContent } from '@tiptap/vue-3'
import { POST_CHARS_LIMIT } from '~~/constants'
const {
draftKey,
@ -174,7 +173,7 @@ onUnmounted(() => {
:class="isExpanded ? 'min-h-120px' : ''"
/>
<div v-if="isExpanded" absolute right-0 bottom-0 pointer-events-none text-sm op25>
{{ POST_CHARS_LIMIT - editor?.storage.characterCount.characters() }}
{{ characterLimit - editor?.storage.characterCount.characters() }}
</div>
</div>