diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-28 19:03:42 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-28 19:03:42 -0500 |
commit | 28b2a700f075328c8c559f35aaa862660e14266d (patch) | |
tree | 514ae324341ea563b123d01856edd2a03d3a6f71 /app/javascript/flavours/glitch/features/compose/components | |
parent | 0f18a0ad00a034f9e0e7a15d1738e0b9ab8fab11 (diff) |
show which identity roars are being signed with in the composer placeholder
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/compose_form.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/compose_form.js b/app/javascript/flavours/glitch/features/compose/components/compose_form.js index e8f000b1e..56bf616cc 100644 --- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js @@ -17,7 +17,12 @@ import Publisher from './publisher'; import TextareaIcons from './textarea_icons'; const messages = defineMessages({ - placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' }, + placeholder: { id: 'compose_form.placeholder', defaultMessage: 'Roar shamelessly!' }, + placeholder_as: { + id: 'compose_form.placeholder_as', + defaultMessage: "Signing as {signature}.\nRoar shamelessly!", + values: {signature: 'yourself'} + }, missingDescriptionMessage: { id: 'confirmations.missing_media_description.message', defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.' }, missingDescriptionConfirm: { id: 'confirmations.missing_media_description.confirm', @@ -70,6 +75,7 @@ class ComposeForm extends ImmutablePureComponent { onUnmount: PropTypes.func, onPaste: PropTypes.func, onMediaDescriptionConfirm: PropTypes.func, + account: ImmutablePropTypes.map.isRequired, }; static defaultProps = { @@ -297,9 +303,11 @@ class ComposeForm extends ImmutablePureComponent { suggestions, text, spoilersAlwaysOn, + account, } = this.props; let disabledButton = isSubmitting || isUploading || isChangingUpload || (!text.trim().length && !anyMedia); + let signature = this.props.account.get('signature'); return ( <div className='composer'> @@ -331,7 +339,7 @@ class ComposeForm extends ImmutablePureComponent { <AutosuggestTextarea ref={this.setAutosuggestTextarea} - placeholder={intl.formatMessage(messages.placeholder)} + placeholder={signature ? intl.formatMessage(messages.placeholder_as, {signature: signature}) : intl.formatMessage(messages.placeholder)} disabled={isSubmitting} value={this.props.text} onChange={this.handleChange} |