PLT-7 adding loc feature to preview

Этот коммит содержится в:
=Corey Hulen
2016-01-22 09:27:27 -06:00
родитель da1d52d546
Коммит 058d6b2467
2 изменённых файлов: 43 добавлений и 37 удалений

Просмотреть файл

@@ -5,6 +5,7 @@ import {savePreferences} from '../../utils/client.jsx';
import SettingItemMin from '../setting_item_min.jsx'; import SettingItemMin from '../setting_item_min.jsx';
import SettingItemMax from '../setting_item_max.jsx'; import SettingItemMax from '../setting_item_max.jsx';
import Constants from '../../utils/constants.jsx'; import Constants from '../../utils/constants.jsx';
const PreReleaseFeatures = Constants.PRE_RELEASE_FEATURES;
import PreferenceStore from '../../stores/preference_store.jsx'; import PreferenceStore from '../../stores/preference_store.jsx';
import ManageLanguages from './manage_languages.jsx'; import ManageLanguages from './manage_languages.jsx';
import * as Utils from '../../utils/utils.jsx'; import * as Utils from '../../utils/utils.jsx';
@@ -294,6 +295,7 @@ export default class UserSettingsDisplay extends React.Component {
); );
} }
if (Utils.isFeatureEnabled(PreReleaseFeatures.LOC_PREVIEW)) {
if (this.props.activeSection === 'languages') { if (this.props.activeSection === 'languages') {
var inputs = []; var inputs = [];
inputs.push( inputs.push(
@@ -333,6 +335,7 @@ export default class UserSettingsDisplay extends React.Component {
/> />
); );
} }
}
return ( return (
<div> <div>
@@ -367,7 +370,6 @@ export default class UserSettingsDisplay extends React.Component {
{nameFormatSection} {nameFormatSection}
<div className='divider-dark'/> <div className='divider-dark'/>
{languagesSection} {languagesSection}
<div className='divider-dark'/>
</div> </div>
</div> </div>
); );

Просмотреть файл

@@ -451,6 +451,10 @@ export default {
EMBED_PREVIEW: { EMBED_PREVIEW: {
label: 'embed_preview', label: 'embed_preview',
description: 'Show preview snippet of links below message' description: 'Show preview snippet of links below message'
},
LOC_PREVIEW: {
label: 'loc_preview',
description: 'Show user language in display settings'
} }
}, },
OVERLAY_TIME_DELAY: 400, OVERLAY_TIME_DELAY: 400,