[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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
918ce03622
Коммит
279c7b7fda
@@ -551,11 +551,11 @@ export default class AdminSidebar extends React.Component {
|
||||
>
|
||||
{customBranding}
|
||||
<AdminSidebarSection
|
||||
name='custom_emoji'
|
||||
name='emoji'
|
||||
title={
|
||||
<FormattedMessage
|
||||
id='admin.sidebar.customEmoji'
|
||||
defaultMessage='Custom Emoji'
|
||||
id='admin.sidebar.emoji'
|
||||
defaultMessage='Emoji'
|
||||
/>
|
||||
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
<FormattedMessage
|
||||
id='admin.customization.customEmoji'
|
||||
defaultMessage='Custom Emoji'
|
||||
id='admin.customization.emoji'
|
||||
defaultMessage='Emoji'
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -78,6 +80,23 @@ export default class CustomEmojiSettings extends AdminSettings {
|
||||
|
||||
return (
|
||||
<SettingsGroup>
|
||||
<BooleanSetting
|
||||
id='enableEmojiPicker'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='admin.customization.enableEmojiPickerTitle'
|
||||
defaultMessage='Enable Emoji Picker:'
|
||||
/>
|
||||
}
|
||||
helpText={
|
||||
<FormattedMessage
|
||||
id='admin.customization.enableEmojiPickerDesc'
|
||||
defaultMessage='The emoji picker allows users to select emoji to add as reactions or use in messages. Enabling the emoji picker with a large number of custom emoji may slow down performance.'
|
||||
/>
|
||||
}
|
||||
value={this.state.enableEmojiPicker}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<BooleanSetting
|
||||
id='enableCustomEmoji'
|
||||
label={
|
||||
|
||||
Ссылка в новой задаче
Block a user