diff --git a/src/routes/_components/status/Status.html b/src/routes/_components/status/Status.html index dcb4363a..f3f12006 100644 --- a/src/routes/_components/status/Status.html +++ b/src/routes/_components/status/Status.html @@ -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') diff --git a/src/routes/_components/status/StatusSpoiler.html b/src/routes/_components/status/StatusSpoiler.html index 79c02fe2..9e9fb2dd 100644 --- a/src/routes/_components/status/StatusSpoiler.html +++ b/src/routes/_components/status/StatusSpoiler.html @@ -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) diff --git a/src/routes/_static/statuses.js b/src/routes/_static/statuses.js index 6202279a..d31d4131 100644 --- a/src/routes/_static/statuses.js +++ b/src/routes/_static/statuses.js @@ -20,3 +20,6 @@ export const POST_PRIVACY_OPTIONS = [ icon: '#fa-envelope' } ] + +export const LONG_POST_LENGTH = 1024 +export const LONG_POST_TEXT = 'Long'