Redesign local-only toots in glitch flavour
This commit is contained in:
parent
71b1d4c694
commit
92109c2cbe
3 changed files with 4 additions and 6 deletions
|
@ -146,9 +146,6 @@ export function submitCompose(routerHistory) {
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(submitComposeRequest());
|
dispatch(submitComposeRequest());
|
||||||
if (getState().getIn(['compose', 'advanced_options', 'do_not_federate'])) {
|
|
||||||
status = status + ' 👁️';
|
|
||||||
}
|
|
||||||
api(getState).post('/api/v1/statuses', {
|
api(getState).post('/api/v1/statuses', {
|
||||||
status,
|
status,
|
||||||
content_type: getState().getIn(['compose', 'content_type']),
|
content_type: getState().getIn(['compose', 'content_type']),
|
||||||
|
@ -158,6 +155,7 @@ export function submitCompose(routerHistory) {
|
||||||
spoiler_text: spoilerText,
|
spoiler_text: spoilerText,
|
||||||
visibility: getState().getIn(['compose', 'privacy']),
|
visibility: getState().getIn(['compose', 'privacy']),
|
||||||
poll: getState().getIn(['compose', 'poll'], null),
|
poll: getState().getIn(['compose', 'poll'], null),
|
||||||
|
local_only: getState().getIn(['compose', 'advanced_options', 'do_not_federate']),
|
||||||
}, {
|
}, {
|
||||||
headers: {
|
headers: {
|
||||||
'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
|
'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
|
||||||
|
|
|
@ -294,7 +294,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
|
|
||||||
let disabledButton = isSubmitting || isUploading || isChangingUpload || (!text.trim().length && !anyMedia);
|
let disabledButton = isSubmitting || isUploading || isChangingUpload || (!text.trim().length && !anyMedia);
|
||||||
|
|
||||||
const countText = `${spoilerText}${countableText(text)}${advancedOptions && advancedOptions.get('do_not_federate') ? ' 👁️' : ''}`;
|
const countText = `${spoilerText}${countableText(text)}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='composer'>
|
<div className='composer'>
|
||||||
|
|
|
@ -177,7 +177,7 @@ function continueThread (state, status) {
|
||||||
map.set('in_reply_to', status.id);
|
map.set('in_reply_to', status.id);
|
||||||
map.update(
|
map.update(
|
||||||
'advanced_options',
|
'advanced_options',
|
||||||
map => map.merge(new ImmutableMap({ do_not_federate: /👁\ufe0f?\u200b?(?:<\/p>)?$/.test(status.content) }))
|
map => map.merge(new ImmutableMap({ do_not_federate: !!status.local_only }))
|
||||||
);
|
);
|
||||||
map.set('privacy', status.visibility);
|
map.set('privacy', status.visibility);
|
||||||
map.set('sensitive', false);
|
map.set('sensitive', false);
|
||||||
|
@ -338,7 +338,7 @@ export default function compose(state = initialState, action) {
|
||||||
map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy')));
|
map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy')));
|
||||||
map.update(
|
map.update(
|
||||||
'advanced_options',
|
'advanced_options',
|
||||||
map => map.merge(new ImmutableMap({ do_not_federate: /👁\ufe0f?\u200b?(?:<\/p>)?$/.test(action.status.get('content')) }))
|
map => map.merge(new ImmutableMap({ do_not_federate: !!action.status.get('local_only') }))
|
||||||
);
|
);
|
||||||
map.set('focusDate', new Date());
|
map.set('focusDate', new Date());
|
||||||
map.set('caretPosition', null);
|
map.set('caretPosition', null);
|
||||||
|
|
Loading…
Reference in a new issue