Merge branch 'master' of https://github.com/mattermost/platform into ui-improvements
Этот коммит содержится в:
@@ -81,6 +81,7 @@ export default class ActivityLogModal extends React.Component {
|
|||||||
const currentSession = this.state.sessions[i];
|
const currentSession = this.state.sessions[i];
|
||||||
const lastAccessTime = new Date(currentSession.last_activity_at);
|
const lastAccessTime = new Date(currentSession.last_activity_at);
|
||||||
const firstAccessTime = new Date(currentSession.create_at);
|
const firstAccessTime = new Date(currentSession.create_at);
|
||||||
|
let devicePlatform = currentSession.props.platform;
|
||||||
let devicePicture = '';
|
let devicePicture = '';
|
||||||
|
|
||||||
if (currentSession.props.platform === 'Windows') {
|
if (currentSession.props.platform === 'Windows') {
|
||||||
@@ -88,8 +89,13 @@ export default class ActivityLogModal extends React.Component {
|
|||||||
} else if (currentSession.props.platform === 'Macintosh' || currentSession.props.platform === 'iPhone') {
|
} else if (currentSession.props.platform === 'Macintosh' || currentSession.props.platform === 'iPhone') {
|
||||||
devicePicture = 'fa fa-apple';
|
devicePicture = 'fa fa-apple';
|
||||||
} else if (currentSession.props.platform === 'Linux') {
|
} else if (currentSession.props.platform === 'Linux') {
|
||||||
|
if (currentSession.props.os.indexOf('Android') >= 0) {
|
||||||
|
devicePlatform = 'Android';
|
||||||
|
devicePicture = 'fa fa-android';
|
||||||
|
} else {
|
||||||
devicePicture = 'fa fa-linux';
|
devicePicture = 'fa fa-linux';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let moreInfo;
|
let moreInfo;
|
||||||
if (this.state.moreInfo[i]) {
|
if (this.state.moreInfo[i]) {
|
||||||
@@ -119,7 +125,7 @@ export default class ActivityLogModal extends React.Component {
|
|||||||
className='activity-log__table'
|
className='activity-log__table'
|
||||||
>
|
>
|
||||||
<div className='activity-log__report'>
|
<div className='activity-log__report'>
|
||||||
<div className='report__platform'><i className={devicePicture} />{currentSession.props.platform}</div>
|
<div className='report__platform'><i className={devicePicture} />{devicePlatform}</div>
|
||||||
<div className='report__info'>
|
<div className='report__info'>
|
||||||
<div>{`Last activity: ${lastAccessTime.toDateString()}, ${lastAccessTime.toLocaleTimeString()}`}</div>
|
<div>{`Last activity: ${lastAccessTime.toDateString()}, ${lastAccessTime.toLocaleTimeString()}`}</div>
|
||||||
{moreInfo}
|
{moreInfo}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export default class PostBody extends React.Component {
|
|||||||
}
|
}
|
||||||
var metadata = data.items[0].snippet;
|
var metadata = data.items[0].snippet;
|
||||||
this.receivedYoutubeData = true;
|
this.receivedYoutubeData = true;
|
||||||
this.setState({youtubeUploader: metadata.channelTitle, youtubeTitle: metadata.title});
|
this.setState({youtubeTitle: metadata.title});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.window.config.GoogleDeveloperKey && !this.receivedYoutubeData) {
|
if (global.window.config.GoogleDeveloperKey && !this.receivedYoutubeData) {
|
||||||
@@ -134,18 +134,12 @@ export default class PostBody extends React.Component {
|
|||||||
header = header + ' - ';
|
header = header + ' - ';
|
||||||
}
|
}
|
||||||
|
|
||||||
let uploader = this.state.youtubeUploader;
|
|
||||||
if (!uploader) {
|
|
||||||
uploader = 'unknown';
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='post-comment'>
|
<div className='post-comment'>
|
||||||
<h4>
|
<h4>
|
||||||
<span className='video-type'>{header}</span>
|
<span className='video-type'>{header}</span>
|
||||||
<span className='video-title'><a href={link}>{this.state.youtubeTitle}</a></span>
|
<span className='video-title'><a href={link}>{this.state.youtubeTitle}</a></span>
|
||||||
</h4>
|
</h4>
|
||||||
<h4 className='video-uploader'>{uploader}</h4>
|
|
||||||
<div
|
<div
|
||||||
className='video-div embed-responsive-item'
|
className='video-div embed-responsive-item'
|
||||||
id={youtubeId}
|
id={youtubeId}
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ export default class TeamSignupUsernamePage extends React.Component {
|
|||||||
}
|
}
|
||||||
submitBack(e) {
|
submitBack(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (global.window.config.SendEmailNotifications === 'true') {
|
||||||
this.props.state.wizard = 'send_invites';
|
this.props.state.wizard = 'send_invites';
|
||||||
|
} else {
|
||||||
|
this.props.state.wizard = 'team_url';
|
||||||
|
}
|
||||||
|
|
||||||
this.props.updateParent(this.props.state);
|
this.props.updateParent(this.props.state);
|
||||||
}
|
}
|
||||||
submitNext(e) {
|
submitNext(e) {
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ var client = require('./client.jsx');
|
|||||||
var Autolinker = require('autolinker');
|
var Autolinker = require('autolinker');
|
||||||
|
|
||||||
export function isEmail(email) {
|
export function isEmail(email) {
|
||||||
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
//var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||||
|
var regex = /^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i;
|
||||||
return regex.test(email);
|
return regex.test(email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
border: $border-gray;
|
border: $border-gray;
|
||||||
bottom: 38px;
|
bottom: 38px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
z-index: 100;
|
||||||
@extend %popover-box-shadow;
|
@extend %popover-box-shadow;
|
||||||
.sidebar--right & {
|
.sidebar--right & {
|
||||||
bottom: 100px;
|
bottom: 100px;
|
||||||
|
|||||||
@@ -26,11 +26,6 @@
|
|||||||
padding:0px;
|
padding:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-uploader {
|
|
||||||
font-size: 13px;
|
|
||||||
margin: 0 0 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-title {
|
.video-title {
|
||||||
font-size:15px;
|
font-size:15px;
|
||||||
margin-top:3px;
|
margin-top:3px;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user