extract consts to separate file
This commit is contained in:
parent
acf30ed551
commit
384e3adb4d
|
@ -115,9 +115,8 @@
|
|||
import { getAccountAccessibleName } from '../../_a11y/getAccountAccessibleName'
|
||||
import { getAccessibleLabelForStatus } from '../../_a11y/getAccessibleLabelForStatus'
|
||||
import { formatTimeagoDate } from '../../_intl/formatTimeagoDate'
|
||||
import { LONG_POST_LENGTH, LONG_POST_TEXT } from '../../_static/statuses'
|
||||
|
||||
const LONG_POST_LENGTH = 1024
|
||||
const LONG_POST_TEXT = 'Long'
|
||||
const INPUT_TAGS = new Set(['a', 'button', 'input', 'textarea'])
|
||||
const isUserInputElement = node => INPUT_TAGS.has(node.localName)
|
||||
const isToolbar = node => node.classList.contains('status-toolbar')
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
import { mark, stop } from '../../_utils/marks'
|
||||
import { emojifyText } from '../../_utils/emojifyText'
|
||||
import escapeHtml from 'escape-html'
|
||||
import { LONG_POST_TEXT } from '../../_static/statuses'
|
||||
|
||||
export default {
|
||||
oncreate () {
|
||||
|
@ -52,7 +53,7 @@
|
|||
},
|
||||
store: () => store,
|
||||
computed: {
|
||||
spoilerText: ({ originalStatus }) => originalStatus.spoiler_text || 'LONG',
|
||||
spoilerText: ({ originalStatus }) => originalStatus.spoiler_text || LONG_POST_TEXT,
|
||||
emojis: ({ originalStatus }) => originalStatus.emojis,
|
||||
massagedSpoilerText: ({ spoilerText, emojis, $autoplayGifs }) => {
|
||||
spoilerText = escapeHtml(spoilerText)
|
||||
|
|
|
@ -20,3 +20,6 @@ export const POST_PRIVACY_OPTIONS = [
|
|||
icon: '#fa-envelope'
|
||||
}
|
||||
]
|
||||
|
||||
export const LONG_POST_LENGTH = 1024
|
||||
export const LONG_POST_TEXT = 'Long'
|
||||
|
|
Loading…
Reference in New Issue