Этот коммит содержится в:
Christopher Speller
2016-03-14 07:17:31 -04:00
родитель 975159b52a 72ed22d742
Коммит bf7ae07117
20 изменённых файлов: 123 добавлений и 56 удалений

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

@@ -49,6 +49,8 @@ export default class Login extends React.Component {
const teamDisplayName = currentTeam.display_name;
const teamName = currentTeam.name;
const ldapEnabled = global.window.mm_config.EnableLdap === 'true';
const usernameSigninEnabled = global.window.mm_config.EnableSignInWithUsername === 'true';
let loginMessage = [];
if (global.window.mm_config.EnableSignUpWithGitLab === 'true') {
@@ -209,6 +211,22 @@ export default class Login extends React.Component {
);
}
if (ldapEnabled && (loginMessage.length > 0 || emailSignup || usernameSigninEnabled)) {
ldapLogin = (
<div>
<div className='or__container'>
<FormattedMessage
id='login.or'
defaultMessage='or'
/>
</div>
<LoginLdap
teamName={teamName}
/>
</div>
);
}
let usernameLogin = null;
if (global.window.mm_config.EnableSignInWithUsername === 'true') {
usernameLogin = (
@@ -218,6 +236,22 @@ export default class Login extends React.Component {
);
}
if (usernameSigninEnabled && (loginMessage.length > 0 || emailSignup || ldapEnabled)) {
usernameLogin = (
<div>
<div className='or__container'>
<FormattedMessage
id='login.or'
defaultMessage='or'
/>
</div>
<LoginUsername
teamName={teamName}
/>
</div>
);
}
return (
<div>
<div className='signup-header'>

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

@@ -112,24 +112,32 @@ export default class PostBodyAdditionalContent extends React.Component {
}
render() {
var generateEmbed = this.generateEmbed();
const generateEmbed = this.generateEmbed();
if (generateEmbed) {
return (
<div>
let toggle;
if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMBED_TOGGLE)) {
toggle = (
<a className='post__embed-visibility'
data-expanded={this.state.embedVisible}
aria-label='Toggle Embed Visibility'
onClick={this.toggleEmbedVisibility}
>
</a>
/>
);
}
return (
<div>
{toggle}
<div className='post__embed-container'
hidden={!this.state.embedVisible}
>
{generateEmbed}
</div>
</div>
);
);
}
return null;
}
}

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

@@ -61,7 +61,7 @@ export default class Textbox extends React.Component {
onRecievedError() {
const errorCount = ErrorStore.getConnectionErrorCount();
if (errorCount > 0) {
if (errorCount > 1) {
this.setState({connection: 'bad-connection'});
} else {
this.setState({connection: ''});

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

@@ -253,6 +253,8 @@ class CustomThemeChooser extends React.Component {
</div>
</div>
);
colors += theme[element.id] + ',';
} else if (element.group === 'sidebarElements') {
sidebarElements.push(
<div

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

@@ -31,6 +31,7 @@ class SocketStoreClass extends EventEmitter {
this.close = this.close.bind(this);
this.failCount = 0;
this.isInitialize = false;
this.translations = this.getDefaultTranslations();
@@ -54,24 +55,23 @@ class SocketStoreClass extends EventEmitter {
if (this.failCount === 0) {
console.log('websocket connecting to ' + connUrl); //eslint-disable-line no-console
if (ErrorStore.getConnectionErrorCount() > 0) {
ErrorStore.setConnectionErrorCount(0);
ErrorStore.emitChange();
}
}
conn = new WebSocket(connUrl);
conn.onopen = () => {
if (this.failCount > 0) {
console.log('websocket re-established connection'); //eslint-disable-line no-console
ErrorStore.clearLastError();
ErrorStore.emitChange();
AsyncClient.getChannels();
AsyncClient.getPosts(ChannelStore.getCurrentId());
}
if (this.isInitialize) {
ErrorStore.clearLastError();
ErrorStore.emitChange();
}
this.isInitialize = true;
this.failCount = 0;
};

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

@@ -270,7 +270,7 @@ export default {
buttonColor: '#FFFFFF',
mentionHighlightBg: '#984063',
mentionHighlightLink: '#A4FFEB',
codeTheme: 'solarized_dark'
codeTheme: 'solarized-dark'
},
windows10: {
type: 'Windows Dark',
@@ -373,21 +373,6 @@ export default {
id: 'newMessageSeparator',
uiName: 'New Message Separator'
},
{
group: 'linkAndButtonElements',
id: 'linkColor',
uiName: 'Link Color'
},
{
group: 'linkAndButtonElements',
id: 'buttonBg',
uiName: 'Button BG'
},
{
group: 'linkAndButtonElements',
id: 'buttonColor',
uiName: 'Button Text'
},
{
group: 'centerChannelElements',
id: 'mentionHighlightBg',
@@ -404,11 +389,11 @@ export default {
uiName: 'Code Theme',
themes: [
{
id: 'solarized_dark',
id: 'solarized-dark',
uiName: 'Solarized Dark'
},
{
id: 'solarized_light',
id: 'solarized-light',
uiName: 'Solarized Light'
},
{
@@ -420,6 +405,21 @@ export default {
uiName: 'Monokai'
}
]
},
{
group: 'linkAndButtonElements',
id: 'linkColor',
uiName: 'Link Color'
},
{
group: 'linkAndButtonElements',
id: 'buttonBg',
uiName: 'Button BG'
},
{
group: 'linkAndButtonElements',
id: 'buttonColor',
uiName: 'Button Text'
}
],
DEFAULT_CODE_THEME: 'github',