From 279c7b7fda9a8c1ce6685d61b110a7bdbf518a1c Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Thu, 6 Jul 2017 08:48:34 +0800 Subject: [PLT-6969] System console setting for the emoji picker (#6809) * system console setting for the emoji picker * remove state.emojiPickerEnable * update url to /admin_console/customization/emoji --- webapp/components/admin_console/admin_sidebar.jsx | 6 +++--- .../admin_console/custom_emoji_settings.jsx | 23 ++++++++++++++++++++-- webapp/components/create_comment.jsx | 8 +++----- webapp/components/create_post.jsx | 6 ++---- .../components/post_view/post_info/post_info.jsx | 2 +- webapp/components/rhs_comment.jsx | 2 +- webapp/components/rhs_root_post.jsx | 2 +- .../user_settings/user_settings_advanced.jsx | 7 ------- 8 files changed, 32 insertions(+), 24 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx index d64d5edee..1dbbff2f2 100644 --- a/webapp/components/admin_console/admin_sidebar.jsx +++ b/webapp/components/admin_console/admin_sidebar.jsx @@ -551,11 +551,11 @@ export default class AdminSidebar extends React.Component { > {customBranding} } diff --git a/webapp/components/admin_console/custom_emoji_settings.jsx b/webapp/components/admin_console/custom_emoji_settings.jsx index 8ab8cde4e..329900888 100644 --- a/webapp/components/admin_console/custom_emoji_settings.jsx +++ b/webapp/components/admin_console/custom_emoji_settings.jsx @@ -22,6 +22,7 @@ export default class CustomEmojiSettings extends AdminSettings { getConfigFromState(config) { config.ServiceSettings.EnableCustomEmoji = this.state.enableCustomEmoji; + config.ServiceSettings.EnableEmojiPicker = this.state.enableEmojiPicker; if (global.window.mm_license.IsLicensed === 'true') { config.ServiceSettings.RestrictCustomEmojiCreation = this.state.restrictCustomEmojiCreation; @@ -33,6 +34,7 @@ export default class CustomEmojiSettings extends AdminSettings { getStateFromConfig(config) { return { enableCustomEmoji: config.ServiceSettings.EnableCustomEmoji, + enableEmojiPicker: config.ServiceSettings.EnableEmojiPicker, restrictCustomEmojiCreation: config.ServiceSettings.RestrictCustomEmojiCreation }; } @@ -40,8 +42,8 @@ export default class CustomEmojiSettings extends AdminSettings { renderTitle() { return ( ); } @@ -78,6 +80,23 @@ export default class CustomEmojiSettings extends AdminSettings { return ( + + } + helpText={ + + } + value={this.state.enableEmojiPicker} + onChange={this.handleChange} + /> ); - if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMOJI_PICKER_PREVIEW)) { + if (window.mm_config.EnableEmojiPicker === 'true') { react = ( ); - case 'EMOJI_PICKER_PREVIEW': - return ( - - ); default: return null; } -- cgit v1.2.3-1-g7c22