mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Rename globalSwitchoff to disableCommenting.
This commit is contained in:
@@ -82,17 +82,17 @@ class StreamSettings extends React.Component {
|
||||
this.props.updatePending({ updater });
|
||||
};
|
||||
|
||||
updateGlobalSwitchoffEnable = () => {
|
||||
updateDisableCommenting = () => {
|
||||
const updater = {
|
||||
globalSwitchoffEnable: {
|
||||
$set: !this.props.settings.globalSwitchoffEnable,
|
||||
disableCommenting: {
|
||||
$set: !this.props.settings.disableCommenting,
|
||||
},
|
||||
};
|
||||
this.props.updatePending({ updater });
|
||||
};
|
||||
|
||||
updateGlobalSwitchoffMessage = value => {
|
||||
const updater = { globalSwitchoffMessage: { $set: value } };
|
||||
updateDisableCommentingMessage = value => {
|
||||
const updater = { disableCommentingMessage: { $set: value } };
|
||||
this.props.updatePending({ updater });
|
||||
};
|
||||
|
||||
@@ -207,21 +207,21 @@ class StreamSettings extends React.Component {
|
||||
{t('configure.edit_comment_timeframe_text_post')}
|
||||
</ConfigureCard>
|
||||
<ConfigureCard
|
||||
checked={settings.globalSwitchoffEnable}
|
||||
onCheckbox={this.updateGlobalSwitchoffEnable}
|
||||
title={t('configure.global_switchoff_title')}
|
||||
checked={settings.disableCommenting}
|
||||
onCheckbox={this.updateDisableCommenting}
|
||||
title={t('configure.disable_commenting_title')}
|
||||
>
|
||||
<p>{t('configure.global_switchoff_desc')}</p>
|
||||
<p>{t('configure.disable_commenting_desc')}</p>
|
||||
<div
|
||||
className={cn(
|
||||
styles.configSettingGlobalSwitchoff,
|
||||
settings.globalSwitchoffEnable ? null : styles.hidden
|
||||
styles.configSettingDisableCommenting,
|
||||
settings.disableCommenting ? null : styles.hidden
|
||||
)}
|
||||
>
|
||||
<MarkdownEditor
|
||||
className={styles.descriptionBox}
|
||||
onChange={this.updateGlobalSwitchoffMessage}
|
||||
value={settings.globalSwitchoffMessage}
|
||||
onChange={this.updateDisableCommentingMessage}
|
||||
value={settings.disableCommentingMessage}
|
||||
/>
|
||||
</div>
|
||||
</ConfigureCard>
|
||||
|
||||
@@ -39,8 +39,8 @@ export default compose(
|
||||
autoCloseStream
|
||||
closedTimeout
|
||||
closedMessage
|
||||
globalSwitchoffEnable
|
||||
globalSwitchoffMessage
|
||||
disableCommenting
|
||||
disableCommentingMessage
|
||||
${getSlotFragmentSpreads(slots, 'settings')}
|
||||
}
|
||||
`,
|
||||
|
||||
@@ -216,7 +216,7 @@ class Stream extends React.Component {
|
||||
currentUser,
|
||||
} = this.props;
|
||||
const { keepCommentBox } = this.state;
|
||||
const open = !(asset.isClosed || asset.settings.globalSwitchoffEnable);
|
||||
const open = !(asset.isClosed || asset.settings.disableCommenting);
|
||||
|
||||
const banned = get(currentUser, 'status.banned.status');
|
||||
const suspensionUntil = get(currentUser, 'status.suspension.until');
|
||||
@@ -298,7 +298,7 @@ class Stream extends React.Component {
|
||||
{asset.isClosed ? (
|
||||
<p>{asset.settings.closedMessage}</p>
|
||||
) : (
|
||||
<Markdown content={asset.settings.globalSwitchoffMessage} />
|
||||
<Markdown content={asset.settings.disableCommentingMessage} />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -434,8 +434,8 @@ const fragments = {
|
||||
questionBoxIcon
|
||||
closedTimeout
|
||||
closedMessage
|
||||
globalSwitchoffEnable
|
||||
globalSwitchoffMessage
|
||||
disableCommenting
|
||||
disableCommentingMessage
|
||||
charCountEnable
|
||||
charCount
|
||||
requireEmailConfirmation
|
||||
|
||||
Reference in New Issue
Block a user