Add a glitch-soc local setting to make the post publish toast optional (#2666)
parent
d002458c7b
commit
e95f2c2b68
|
@ -266,12 +266,14 @@ export function submitCompose(routerHistory, overridePrivacy = null) {
|
|||
insertIfOnline('direct');
|
||||
}
|
||||
|
||||
if (getState().getIn(['local_settings', 'show_published_toast'])) {
|
||||
dispatch(showAlert({
|
||||
message: statusId === null ? messages.published : messages.saved,
|
||||
action: messages.open,
|
||||
dismissAfter: 10000,
|
||||
onClick: () => routerHistory.push(`/@${response.data.account.username}/${response.data.id}`),
|
||||
}));
|
||||
}
|
||||
}).catch(function (error) {
|
||||
dispatch(submitComposeFail(error));
|
||||
});
|
||||
|
|
|
@ -224,6 +224,14 @@ class LocalSettingsPage extends PureComponent {
|
|||
>
|
||||
<FormattedMessage id='settings.show_content_type_choice' defaultMessage='Show content-type choice when authoring toots' />
|
||||
</LocalSettingsPageItem>
|
||||
<LocalSettingsPageItem
|
||||
settings={settings}
|
||||
item={['show_published_toast']}
|
||||
id='mastodon-settings--show_published_toast'
|
||||
onChange={onChange}
|
||||
>
|
||||
<FormattedMessage id='settings.show_published_toast' defaultMessage='Display toast when publishing/saving a post' />
|
||||
</LocalSettingsPageItem>
|
||||
<LocalSettingsPageItem
|
||||
settings={settings}
|
||||
item={['side_arm']}
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
"settings.shared_settings_link": "user preferences",
|
||||
"settings.show_action_bar": "Show action buttons in collapsed toots",
|
||||
"settings.show_content_type_choice": "Show content-type choice when authoring toots",
|
||||
"settings.show_published_toast": "Display toast when publishing/saving a post",
|
||||
"settings.show_reply_counter": "Display an estimate of the reply count",
|
||||
"settings.side_arm": "Secondary toot button:",
|
||||
"settings.side_arm.none": "None",
|
||||
|
|
|
@ -61,6 +61,7 @@ const initialState = ImmutableMap({
|
|||
media: true,
|
||||
visibility: true,
|
||||
}),
|
||||
show_published_toast: true,
|
||||
});
|
||||
|
||||
const hydrate = (state, localSettings) => state.mergeDeep(localSettings);
|
||||
|
|
Loading…
Reference in New Issue