summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMaxim <mail@potapovmax.com>2015-10-13 10:15:44 +0300
committerMaxim <mail@potapovmax.com>2015-10-13 10:15:44 +0300
commit9d3248ccec89e533527bb86e082ef445c3cdfe7d (patch)
treefea41f942c66a2ae397ed12f1013585bcbf7775c /web
parent53d58fc3374268484a6eb5d8aae2c82719ec782d (diff)
parent0144b6fd8a95c6b65695b07483a528707dce1cfe (diff)
downloadchat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.gz
chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.bz2
chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.zip
Merge branch 'master' into PLT-590
Diffstat (limited to 'web')
-rw-r--r--web/react/components/admin_console/privacy_settings.jsx34
-rw-r--r--web/react/components/admin_console/service_settings.jsx37
-rw-r--r--web/react/components/channel_loader.jsx6
-rw-r--r--web/react/components/create_comment.jsx40
-rw-r--r--web/react/components/get_link_modal.jsx1
-rw-r--r--web/react/components/setting_item_max.jsx11
-rw-r--r--web/react/components/settings_sidebar.jsx2
-rw-r--r--web/react/components/signup_user_complete.jsx2
-rw-r--r--web/react/components/textbox.jsx2
-rw-r--r--web/react/components/user_settings/user_settings_general.jsx3
-rw-r--r--web/react/components/user_settings/user_settings_integrations.jsx2
-rw-r--r--web/react/components/view_image.jsx3
-rw-r--r--web/react/utils/constants.jsx2
-rw-r--r--web/react/utils/utils.jsx7
-rw-r--r--web/sass-files/sass/partials/_base.scss5
-rw-r--r--web/sass-files/sass/partials/_headers.scss5
-rw-r--r--web/sass-files/sass/partials/_markdown.scss9
-rw-r--r--web/sass-files/sass/partials/_modal.scss3
-rw-r--r--web/sass-files/sass/partials/_post.scss8
-rw-r--r--web/sass-files/sass/partials/_responsive.scss5
-rw-r--r--web/sass-files/sass/partials/_settings.scss1
-rw-r--r--web/sass-files/sass/partials/_sidebar--right.scss1
-rw-r--r--web/templates/channel.html2
23 files changed, 108 insertions, 83 deletions
diff --git a/web/react/components/admin_console/privacy_settings.jsx b/web/react/components/admin_console/privacy_settings.jsx
index a32ca3136..70ec04f4a 100644
--- a/web/react/components/admin_console/privacy_settings.jsx
+++ b/web/react/components/admin_console/privacy_settings.jsx
@@ -30,7 +30,6 @@ export default class PrivacySettings extends React.Component {
var config = this.props.config;
config.PrivacySettings.ShowEmailAddress = React.findDOMNode(this.refs.ShowEmailAddress).checked;
config.PrivacySettings.ShowFullName = React.findDOMNode(this.refs.ShowFullName).checked;
- config.PrivacySettings.EnableSecurityFixAlert = React.findDOMNode(this.refs.EnableSecurityFixAlert).checked;
Client.saveConfig(
config,
@@ -138,39 +137,6 @@ export default class PrivacySettings extends React.Component {
</div>
<div className='form-group'>
- <label
- className='control-label col-sm-4'
- htmlFor='EnableSecurityFixAlert'
- >
- {'Send Error and Diagnostic: '}
- </label>
- <div className='col-sm-8'>
- <label className='radio-inline'>
- <input
- type='radio'
- name='EnableSecurityFixAlert'
- value='true'
- ref='EnableSecurityFixAlert'
- defaultChecked={this.props.config.PrivacySettings.EnableSecurityFixAlert}
- onChange={this.handleChange}
- />
- {'true'}
- </label>
- <label className='radio-inline'>
- <input
- type='radio'
- name='EnableSecurityFixAlert'
- value='false'
- defaultChecked={!this.props.config.PrivacySettings.EnableSecurityFixAlert}
- onChange={this.handleChange}
- />
- {'false'}
- </label>
- <p className='help-text'>{'When true, System Administrators are notified by email if a relevant security fix alert has been announced in the last 12 hours. Requires email to be enabled.'}</p>
- </div>
- </div>
-
- <div className='form-group'>
<div className='col-sm-12'>
{serverError}
<button
diff --git a/web/react/components/admin_console/service_settings.jsx b/web/react/components/admin_console/service_settings.jsx
index 3968d9820..f29d62646 100644
--- a/web/react/components/admin_console/service_settings.jsx
+++ b/web/react/components/admin_console/service_settings.jsx
@@ -35,11 +35,13 @@ export default class ServiceSettings extends React.Component {
config.ServiceSettings.SegmentDeveloperKey = React.findDOMNode(this.refs.SegmentDeveloperKey).value.trim();
config.ServiceSettings.GoogleDeveloperKey = React.findDOMNode(this.refs.GoogleDeveloperKey).value.trim();
- //config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked;
config.ServiceSettings.EnableIncomingWebhooks = React.findDOMNode(this.refs.EnableIncomingWebhooks).checked;
config.ServiceSettings.EnablePostUsernameOverride = React.findDOMNode(this.refs.EnablePostUsernameOverride).checked;
config.ServiceSettings.EnablePostIconOverride = React.findDOMNode(this.refs.EnablePostIconOverride).checked;
config.ServiceSettings.EnableTesting = React.findDOMNode(this.refs.EnableTesting).checked;
+ config.ServiceSettings.EnableSecurityFixAlert = React.findDOMNode(this.refs.EnableSecurityFixAlert).checked;
+
+ //config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked;
var MaximumLoginAttempts = 10;
if (!isNaN(parseInt(React.findDOMNode(this.refs.MaximumLoginAttempts).value, 10))) {
@@ -305,6 +307,39 @@ export default class ServiceSettings extends React.Component {
</div>
<div className='form-group'>
+ <label
+ className='control-label col-sm-4'
+ htmlFor='EnableSecurityFixAlert'
+ >
+ {'Enable Security Alerts: '}
+ </label>
+ <div className='col-sm-8'>
+ <label className='radio-inline'>
+ <input
+ type='radio'
+ name='EnableSecurityFixAlert'
+ value='true'
+ ref='EnableSecurityFixAlert'
+ defaultChecked={this.props.config.ServiceSettings.EnableSecurityFixAlert}
+ onChange={this.handleChange}
+ />
+ {'true'}
+ </label>
+ <label className='radio-inline'>
+ <input
+ type='radio'
+ name='EnableSecurityFixAlert'
+ value='false'
+ defaultChecked={!this.props.config.ServiceSettings.EnableSecurityFixAlert}
+ onChange={this.handleChange}
+ />
+ {'false'}
+ </label>
+ <p className='help-text'>{'When true, System Administrators are notified by email if a relevant security fix alert has been announced in the last 12 hours. Requires email to be enabled.'}</p>
+ </div>
+ </div>
+
+ <div className='form-group'>
<div className='col-sm-12'>
{serverError}
<button
diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx
index d16069725..d0d6ab5e2 100644
--- a/web/react/components/channel_loader.jsx
+++ b/web/react/components/channel_loader.jsx
@@ -104,12 +104,6 @@ export default class ChannelLoader extends React.Component {
}
});
- /* Setup modal events */
- $('.modal').on('show.bs.modal', function onShow() {
- $('.modal-body').css('overflow-y', 'auto');
- $('.modal-body').css('max-height', $(window).height() * 0.7);
- });
-
/* Prevent backspace from navigating back a page */
$(window).on('keydown.preventBackspace', (e) => {
if (e.which === 8 && !$(e.target).is('input, textarea')) {
diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index add4125d7..680d693f1 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -262,25 +262,27 @@ export default class CreateComment extends React.Component {
id={this.props.rootId}
className='post-create-body comment-create-body'
>
- <Textbox
- onUserInput={this.handleUserInput}
- onKeyPress={this.commentMsgKeyPress}
- messageText={this.state.messageText}
- createMessage='Add a comment...'
- initialText=''
- id='reply_textbox'
- ref='textbox'
- />
- <FileUpload
- ref='fileUpload'
- getFileCount={this.getFileCount}
- onUploadStart={this.handleUploadStart}
- onFileUpload={this.handleFileUploadComplete}
- onUploadError={this.handleUploadError}
- onTextDrop={this.handleTextDrop}
- postType='comment'
- channelId={this.props.channelId}
- />
+ <div className='post-body__cell'>
+ <Textbox
+ onUserInput={this.handleUserInput}
+ onKeyPress={this.commentMsgKeyPress}
+ messageText={this.state.messageText}
+ createMessage='Add a comment...'
+ initialText=''
+ id='reply_textbox'
+ ref='textbox'
+ />
+ <FileUpload
+ ref='fileUpload'
+ getFileCount={this.getFileCount}
+ onUploadStart={this.handleUploadStart}
+ onFileUpload={this.handleFileUploadComplete}
+ onUploadError={this.handleUploadError}
+ onTextDrop={this.handleTextDrop}
+ postType='comment'
+ channelId={this.props.channelId}
+ />
+ </div>
</div>
<MsgTyping
channelId={this.props.channelId}
diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx
index 234013b93..eb6bfa9b6 100644
--- a/web/react/components/get_link_modal.jsx
+++ b/web/react/components/get_link_modal.jsx
@@ -96,7 +96,6 @@ export default class GetLinkModal extends React.Component {
<p>
Send teammates the link below for them to sign-up to this team site.
<br /><br />
- Be careful not to share this link publicly, since anyone with the link can join your team.
</p>
<textarea
className='form-control no-resize'
diff --git a/web/react/components/setting_item_max.jsx b/web/react/components/setting_item_max.jsx
index d2cbc798e..4f0fe3ed0 100644
--- a/web/react/components/setting_item_max.jsx
+++ b/web/react/components/setting_item_max.jsx
@@ -32,11 +32,17 @@ export default class SettingItemMax extends React.Component {
}
var inputs = this.props.inputs;
+ var widthClass;
+ if (this.props.width === 'full') {
+ widthClass = 'col-sm-12';
+ } else {
+ widthClass = 'col-sm-9 col-sm-offset-3';
+ }
return (
<ul className='section-max form-horizontal'>
<li className='col-sm-12 section-title'>{this.props.title}</li>
- <li className='col-sm-9 col-sm-offset-3'>
+ <li className={widthClass}>
<ul className='setting-list'>
<li className='setting-list-item'>
{inputs}
@@ -69,5 +75,6 @@ SettingItemMax.propTypes = {
extraInfo: React.PropTypes.element,
updateSection: React.PropTypes.func,
submit: React.PropTypes.func,
- title: React.PropTypes.string
+ title: React.PropTypes.string,
+ width: React.PropTypes.string
};
diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx
index b5d2132d7..66568e1c8 100644
--- a/web/react/components/settings_sidebar.jsx
+++ b/web/react/components/settings_sidebar.jsx
@@ -10,7 +10,7 @@ export default class SettingsSidebar extends React.Component {
handleClick(tab, e) {
e.preventDefault();
this.props.updateTab(tab.name);
- $('.settings-modal').addClass('display--content');
+ $(e.target).closest('.settings-modal').addClass('display--content');
}
render() {
let tabList = this.props.tabs.map(function makeTab(tab) {
diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx
index 75661f812..8a3af707f 100644
--- a/web/react/components/signup_user_complete.jsx
+++ b/web/react/components/signup_user_complete.jsx
@@ -149,7 +149,7 @@ export default class SignupUserComplete extends React.Component {
// set up the email entry and hide it if an email was provided
var yourEmailIs = '';
if (this.state.user.email) {
- yourEmailIs = <span>Your email address is {this.state.user.email}. You'll use this address to sign in to {global.window.config.SiteName}.</span>;
+ yourEmailIs = <span>Your email address is <strong>{this.state.user.email}</strong>. You'll use this address to sign in to {global.window.config.SiteName}.</span>;
}
var emailContainerStyle = 'margin--extra';
diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx
index 0563c294a..741dbcd5d 100644
--- a/web/react/components/textbox.jsx
+++ b/web/react/components/textbox.jsx
@@ -246,9 +246,11 @@ export default class Textbox extends React.Component {
if (e.scrollHeight - mod < 167) {
$(e).css({height: 'auto', 'overflow-y': 'hidden'}).height(e.scrollHeight - mod);
$(w).css({height: 'auto'}).height(e.scrollHeight + 2);
+ $(w).closest('.post-body__cell').removeClass('scroll');
} else {
$(e).css({height: 'auto', 'overflow-y': 'scroll'}).height(167);
$(w).css({height: 'auto'}).height(167);
+ $(w).closest('.post-body__cell').addClass('scroll');
}
if (prevHeight !== $(e).height() && this.props.onHeightChange) {
diff --git a/web/react/components/user_settings/user_settings_general.jsx b/web/react/components/user_settings/user_settings_general.jsx
index c23c61948..66d83725c 100644
--- a/web/react/components/user_settings/user_settings_general.jsx
+++ b/web/react/components/user_settings/user_settings_general.jsx
@@ -368,8 +368,7 @@ export default class UserSettingsGeneralTab extends React.Component {
const extraInfo = (
<span>
- {'Use Nickname for a name you might be called that is different from your first name and user name.'}
- {'This is most often used when two or more people have similar sounding names and usernames.'}
+ {'Use Nickname for a name you might be called that is different from your first name and username. This is most often used when two or more people have similar sounding names and usernames.'}
</span>
);
diff --git a/web/react/components/user_settings/user_settings_integrations.jsx b/web/react/components/user_settings/user_settings_integrations.jsx
index 5e20d41f1..3be062ad3 100644
--- a/web/react/components/user_settings/user_settings_integrations.jsx
+++ b/web/react/components/user_settings/user_settings_integrations.jsx
@@ -38,6 +38,7 @@ export default class UserSettingsIntegrationsTab extends React.Component {
incomingHooksSection = (
<SettingItemMax
title='Incoming Webhooks'
+ width = 'full'
inputs={inputs}
updateSection={function clearSection(e) {
this.updateSection('');
@@ -49,6 +50,7 @@ export default class UserSettingsIntegrationsTab extends React.Component {
incomingHooksSection = (
<SettingItemMin
title='Incoming Webhooks'
+ width = 'full'
describe='Manage your incoming webhooks (Developer feature)'
updateSection={function updateNameSection() {
this.updateSection('incoming-hooks');
diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx
index 8ef68dd0a..c5f0abc12 100644
--- a/web/react/components/view_image.jsx
+++ b/web/react/components/view_image.jsx
@@ -195,6 +195,7 @@ export default class ViewImageModal extends React.Component {
target='_blank'
>
<img
+ style={{maxHeight: this.state.imgHeight}}
ref='image'
src={this.getPreviewImagePath(filename)}
/>
@@ -210,6 +211,7 @@ export default class ViewImageModal extends React.Component {
content = (
<video
+ style={{maxHeight: this.state.imgHeight}}
ref='video'
data-setup='{}'
controls='controls'
@@ -334,7 +336,6 @@ export default class ViewImageModal extends React.Component {
>
<div
className={'image-wrapper ' + bgClass}
- style={{maxHeight: this.state.imgHeight}}
onMouseEnter={this.onMouseEnterImage}
onMouseLeave={this.onMouseLeaveImage}
onClick={(e) => e.stopPropagation()}
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index affc49196..e3cbfccde 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -201,7 +201,7 @@ module.exports = {
centerChannelBg: '#1F1F1F',
centerChannelColor: '#DDDDDD',
newMessageSeparator: '#CC992D',
- linkColor: '#0177e7',
+ linkColor: '#0D93FF',
buttonBg: '#0177e7',
buttonColor: '#FFFFFF',
mentionHighlightBg: '#784098',
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index f9166063e..6a5188974 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -423,7 +423,10 @@ export function applyTheme(theme) {
if (theme.sidebarTextActiveColor) {
changeCss('.sidebar--left .nav-pills__container li.active a, .sidebar--left .nav-pills__container li.active a:hover, .sidebar--left .nav-pills__container li.active a:focus, .settings-modal .nav-pills>li.active a, .settings-modal .nav-pills>li.active a:hover, .settings-modal .nav-pills>li.active a:active', 'color:' + theme.sidebarTextActiveColor, 2);
- changeCss('.sidebar--left .nav-pills__container li.active a .status .online--icon', 'fill:' + theme.sidebarTextActiveColor, 2);
+ }
+
+ if (theme.sidebarTextActiveBg === theme.onlineIndicator) {
+ changeCss('.sidebar--left .nav-pills__container li.active a .status .online--icon', 'fill:' + theme.sidebarTextActiveColor, 1);
}
if (theme.sidebarHeaderBg) {
@@ -497,7 +500,7 @@ export function applyTheme(theme) {
changeCss('.date-separator .separator__hr, .modal-footer, .modal .custom-textarea, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
changeCss('.modal .custom-textarea:focus', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.3), 1);
changeCss('.channel-intro, .settings-modal .settings-table .settings-content .divider-dark, hr, .settings-modal .settings-table .settings-links', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
- changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1);
+ changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, pre', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1);
changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, .post.post--comment.other--root .post-comment, .post.same--root .post-body, .modal .more-channel-table tbody>tr td, .member-div:first-child, .member-div, .access-history__table .access__report, .activity-log__table', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1), 2);
changeCss('@media(max-width: 1440px){.post.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2);
changeCss('@media(max-width: 1440px){.post.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2);
diff --git a/web/sass-files/sass/partials/_base.scss b/web/sass-files/sass/partials/_base.scss
index 18462d92a..470db16dc 100644
--- a/web/sass-files/sass/partials/_base.scss
+++ b/web/sass-files/sass/partials/_base.scss
@@ -34,6 +34,11 @@ body {
}
}
+img {
+ max-width: 100%;
+ height: auto;
+}
+
.input-group-addon {
background: transparent;
}
diff --git a/web/sass-files/sass/partials/_headers.scss b/web/sass-files/sass/partials/_headers.scss
index 8e353aff9..feaa5acfb 100644
--- a/web/sass-files/sass/partials/_headers.scss
+++ b/web/sass-files/sass/partials/_headers.scss
@@ -147,7 +147,8 @@
}
.header__info {
color: #fff;
- padding-left: 4px;
+ @include clearfix;
+ padding-left: 2px;
z-index: 1;
position: relative;
}
@@ -155,7 +156,7 @@
display: block;
font-weight: 600;
font-size: 16px;
- max-width: 80%;
+ max-width: 85%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
diff --git a/web/sass-files/sass/partials/_markdown.scss b/web/sass-files/sass/partials/_markdown.scss
index 122586354..1aa942ad0 100644
--- a/web/sass-files/sass/partials/_markdown.scss
+++ b/web/sass-files/sass/partials/_markdown.scss
@@ -53,15 +53,10 @@ blockquote {
}
pre {
border: none;
- background-color: #f7f7f7;
margin: 5px 0;
- .current--user & {
- background: #fff;
- }
- code {
- color: #c7254e;
- }
+ color: inherit;
}
code {
background: #fff;
+ color: inherit;
}
diff --git a/web/sass-files/sass/partials/_modal.scss b/web/sass-files/sass/partials/_modal.scss
index 2722333a4..90ea8ce2c 100644
--- a/web/sass-files/sass/partials/_modal.scss
+++ b/web/sass-files/sass/partials/_modal.scss
@@ -1,3 +1,6 @@
+#channel_members_modal .modal-body {
+ min-height: 110px;
+}
.modal-body {
padding: 20px 15px;
}
diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss
index ccd7fd425..85bb2eb28 100644
--- a/web/sass-files/sass/partials/_post.scss
+++ b/web/sass-files/sass/partials/_post.scss
@@ -195,6 +195,14 @@ body.ios {
.post-body__cell {
vertical-align: top;
position: relative;
+ &.scroll {
+ .btn-file {
+ right: 15px;
+ }
+ .custom-textarea {
+ padding-right: 43px;
+ }
+ }
}
.send-button {
display: none;
diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss
index 82ec1811a..4e532c16e 100644
--- a/web/sass-files/sass/partials/_responsive.scss
+++ b/web/sass-files/sass/partials/_responsive.scss
@@ -421,6 +421,9 @@
.post-body__cell {
display: table-cell;
padding-left: 45px;
+ .sidebar--right & {
+ padding-left: 0;
+ }
}
.app__content & {
.btn-file {
@@ -667,7 +670,7 @@
.modal-image {
.image-wrapper {
font-size: 12px;
- max-width: 280px;
+ min-width: 280px;
.modal-close {
@include opacity(1);
}
diff --git a/web/sass-files/sass/partials/_settings.scss b/web/sass-files/sass/partials/_settings.scss
index 8debb0b4e..0c2f25eab 100644
--- a/web/sass-files/sass/partials/_settings.scss
+++ b/web/sass-files/sass/partials/_settings.scss
@@ -268,7 +268,6 @@
position:absolute;
right:15px;
top:13px;
- color:#414142;
}
}
diff --git a/web/sass-files/sass/partials/_sidebar--right.scss b/web/sass-files/sass/partials/_sidebar--right.scss
index b37dbf421..c954b03d8 100644
--- a/web/sass-files/sass/partials/_sidebar--right.scss
+++ b/web/sass-files/sass/partials/_sidebar--right.scss
@@ -26,6 +26,7 @@
.post-header {
.post-header-col {
&.post-header__reply {
+ min-width: 30px;
text-align: right;
float: right;
}
diff --git a/web/templates/channel.html b/web/templates/channel.html
index 2af94e415..13fd80d75 100644
--- a/web/templates/channel.html
+++ b/web/templates/channel.html
@@ -54,7 +54,7 @@
<script>
window.setup_channel_page({{ .Props }});
$('body').tooltip( {selector: '[data-toggle=tooltip]'} );
- $('.modal-body').css('max-height', $(window).height() * 0.7);
+ $('.modal-body').css('max-height', $(window).height() - 150);
$('.modal-body').perfectScrollbar();
</script>
</body>