Further JS code style changes

pull/53/head
Claire 2023-02-04 11:09:05 +01:00
parent 3c451cf88f
commit fa433ac5a6
3 changed files with 22 additions and 14 deletions

View File

@ -21,10 +21,14 @@ import { length } from 'stringz';
const messages = defineMessages({ const messages = defineMessages({
placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' }, placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' },
missingDescriptionMessage: { id: 'confirmations.missing_media_description.message', missingDescriptionMessage: {
defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.' }, id: 'confirmations.missing_media_description.message',
missingDescriptionConfirm: { id: 'confirmations.missing_media_description.confirm', defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.',
defaultMessage: 'Send anyway' }, },
missingDescriptionConfirm: {
id: 'confirmations.missing_media_description.confirm',
defaultMessage: 'Send anyway',
},
spoiler_placeholder: { id: 'compose_form.spoiler_placeholder', defaultMessage: 'Write your warning here' }, spoiler_placeholder: { id: 'compose_form.spoiler_placeholder', defaultMessage: 'Write your warning here' },
}); });

View File

@ -21,12 +21,18 @@ import { changeLocalSetting } from 'flavours/glitch/actions/local_settings';
import { privacyPreference } from 'flavours/glitch/utils/privacy_preference'; import { privacyPreference } from 'flavours/glitch/utils/privacy_preference';
const messages = defineMessages({ const messages = defineMessages({
missingDescriptionMessage: { id: 'confirmations.missing_media_description.message', missingDescriptionMessage: {
defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.' }, id: 'confirmations.missing_media_description.message',
missingDescriptionConfirm: { id: 'confirmations.missing_media_description.confirm', defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.',
defaultMessage: 'Send anyway' }, },
missingDescriptionEdit: { id: 'confirmations.missing_media_description.edit', missingDescriptionConfirm: {
defaultMessage: 'Edit media' }, id: 'confirmations.missing_media_description.confirm',
defaultMessage: 'Send anyway',
},
missingDescriptionEdit: {
id: 'confirmations.missing_media_description.edit',
defaultMessage: 'Edit media',
},
}); });
// State mapping. // State mapping.

View File

@ -13,11 +13,9 @@ const initialState = ImmutableMap({
export default function meta(state = initialState, action) { export default function meta(state = initialState, action) {
switch(action.type) { switch(action.type) {
case STORE_HYDRATE: case STORE_HYDRATE:
return state.merge( return state.merge(action.state.get('meta'))
action.state.get('meta'))
.set('permissions', action.state.getIn(['role', 'permissions'])) .set('permissions', action.state.getIn(['role', 'permissions']))
.set('layout', layoutFromWindow(action.state.getIn(['local_settings', 'layout'])), .set('layout', layoutFromWindow(action.state.getIn(['local_settings', 'layout'])));
);
case APP_LAYOUT_CHANGE: case APP_LAYOUT_CHANGE:
return state.set('layout', action.layout); return state.set('layout', action.layout);
default: default: