add feature flag
This commit is contained in:
parent
759a4a54ef
commit
036cb02c0e
3 changed files with 18 additions and 5 deletions
|
@ -103,6 +103,10 @@ export default class MessageActionBar extends React.PureComponent {
|
|||
return SettingsStore.isFeatureEnabled("feature_reactions");
|
||||
}
|
||||
|
||||
isEditingEnabled() {
|
||||
return SettingsStore.isFeatureEnabled("feature_message_editing");
|
||||
}
|
||||
|
||||
renderAgreeDimension() {
|
||||
if (!this.isReactionsEnabled()) {
|
||||
return null;
|
||||
|
@ -144,10 +148,12 @@ export default class MessageActionBar extends React.PureComponent {
|
|||
title={_t("Reply")}
|
||||
onClick={this.onReplyClick}
|
||||
/>;
|
||||
editButton = <span className="mx_MessageActionBar_maskButton mx_MessageActionBar_editButton"
|
||||
title={_t("Edit")}
|
||||
onClick={this.onEditClick}
|
||||
/>;
|
||||
if (this.isEditingEnabled()) {
|
||||
editButton = <span className="mx_MessageActionBar_maskButton mx_MessageActionBar_editButton"
|
||||
title={_t("Edit")}
|
||||
onClick={this.onEditClick}
|
||||
/>;
|
||||
}
|
||||
}
|
||||
|
||||
return <div className="mx_MessageActionBar">
|
||||
|
|
|
@ -300,6 +300,7 @@
|
|||
"Show recent room avatars above the room list": "Show recent room avatars above the room list",
|
||||
"Group & filter rooms by custom tags (refresh to apply changes)": "Group & filter rooms by custom tags (refresh to apply changes)",
|
||||
"Render simple counters in room header": "Render simple counters in room header",
|
||||
"Edit messages after they have been sent": "Edit messages after they have been sent",
|
||||
"React to messages with emoji (refresh to apply changes)": "React to messages with emoji (refresh to apply changes)",
|
||||
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
|
||||
"Use compact timeline layout": "Use compact timeline layout",
|
||||
|
@ -897,6 +898,7 @@
|
|||
"Agree or Disagree": "Agree or Disagree",
|
||||
"Like or Dislike": "Like or Dislike",
|
||||
"Reply": "Reply",
|
||||
"Edit": "Edit",
|
||||
"Options": "Options",
|
||||
"Attachment": "Attachment",
|
||||
"Error decrypting attachment": "Error decrypting attachment",
|
||||
|
@ -973,7 +975,6 @@
|
|||
"Reload widget": "Reload widget",
|
||||
"Popout widget": "Popout widget",
|
||||
"Picture": "Picture",
|
||||
"Edit": "Edit",
|
||||
"Revoke widget access": "Revoke widget access",
|
||||
"Create new room": "Create new room",
|
||||
"Unblacklist": "Unblacklist",
|
||||
|
|
|
@ -118,6 +118,12 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"feature_message_editing": {
|
||||
isFeature: true,
|
||||
displayName: _td("Edit messages after they have been sent"),
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"feature_reactions": {
|
||||
isFeature: true,
|
||||
displayName: _td("React to messages with emoji (refresh to apply changes)"),
|
||||
|
|
Loading…
Reference in a new issue