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");
|
return SettingsStore.isFeatureEnabled("feature_reactions");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isEditingEnabled() {
|
||||||
|
return SettingsStore.isFeatureEnabled("feature_message_editing");
|
||||||
|
}
|
||||||
|
|
||||||
renderAgreeDimension() {
|
renderAgreeDimension() {
|
||||||
if (!this.isReactionsEnabled()) {
|
if (!this.isReactionsEnabled()) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -144,11 +148,13 @@ export default class MessageActionBar extends React.PureComponent {
|
||||||
title={_t("Reply")}
|
title={_t("Reply")}
|
||||||
onClick={this.onReplyClick}
|
onClick={this.onReplyClick}
|
||||||
/>;
|
/>;
|
||||||
|
if (this.isEditingEnabled()) {
|
||||||
editButton = <span className="mx_MessageActionBar_maskButton mx_MessageActionBar_editButton"
|
editButton = <span className="mx_MessageActionBar_maskButton mx_MessageActionBar_editButton"
|
||||||
title={_t("Edit")}
|
title={_t("Edit")}
|
||||||
onClick={this.onEditClick}
|
onClick={this.onEditClick}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return <div className="mx_MessageActionBar">
|
return <div className="mx_MessageActionBar">
|
||||||
{agreeDimensionReactionButtons}
|
{agreeDimensionReactionButtons}
|
||||||
|
|
|
@ -300,6 +300,7 @@
|
||||||
"Show recent room avatars above the room list": "Show recent room avatars above the room list",
|
"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)",
|
"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",
|
"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)",
|
"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",
|
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
|
||||||
"Use compact timeline layout": "Use compact timeline layout",
|
"Use compact timeline layout": "Use compact timeline layout",
|
||||||
|
@ -897,6 +898,7 @@
|
||||||
"Agree or Disagree": "Agree or Disagree",
|
"Agree or Disagree": "Agree or Disagree",
|
||||||
"Like or Dislike": "Like or Dislike",
|
"Like or Dislike": "Like or Dislike",
|
||||||
"Reply": "Reply",
|
"Reply": "Reply",
|
||||||
|
"Edit": "Edit",
|
||||||
"Options": "Options",
|
"Options": "Options",
|
||||||
"Attachment": "Attachment",
|
"Attachment": "Attachment",
|
||||||
"Error decrypting attachment": "Error decrypting attachment",
|
"Error decrypting attachment": "Error decrypting attachment",
|
||||||
|
@ -973,7 +975,6 @@
|
||||||
"Reload widget": "Reload widget",
|
"Reload widget": "Reload widget",
|
||||||
"Popout widget": "Popout widget",
|
"Popout widget": "Popout widget",
|
||||||
"Picture": "Picture",
|
"Picture": "Picture",
|
||||||
"Edit": "Edit",
|
|
||||||
"Revoke widget access": "Revoke widget access",
|
"Revoke widget access": "Revoke widget access",
|
||||||
"Create new room": "Create new room",
|
"Create new room": "Create new room",
|
||||||
"Unblacklist": "Unblacklist",
|
"Unblacklist": "Unblacklist",
|
||||||
|
|
|
@ -118,6 +118,12 @@ export const SETTINGS = {
|
||||||
supportedLevels: LEVELS_FEATURE,
|
supportedLevels: LEVELS_FEATURE,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
"feature_message_editing": {
|
||||||
|
isFeature: true,
|
||||||
|
displayName: _td("Edit messages after they have been sent"),
|
||||||
|
supportedLevels: LEVELS_FEATURE,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
"feature_reactions": {
|
"feature_reactions": {
|
||||||
isFeature: true,
|
isFeature: true,
|
||||||
displayName: _td("React to messages with emoji (refresh to apply changes)"),
|
displayName: _td("React to messages with emoji (refresh to apply changes)"),
|
||||||
|
|
Loading…
Reference in a new issue