From 6e350cb9b9f5641fc553c55d43c07e1bcd9f2756 Mon Sep 17 00:00:00 2001 From: Joel Vasallo Date: Fri, 16 Oct 2015 11:26:28 -0500 Subject: Updated Email Check Regex to RFC5322 Standard --- web/react/utils/utils.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/react') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 561c2c4c4..38ac68d58 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -13,7 +13,8 @@ var client = require('./client.jsx'); var Autolinker = require('autolinker'); 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); } -- cgit v1.2.3-1-g7c22 From 09514fb9f5dd2bfcdfaad6c9ff324298e983d1ee Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Fri, 16 Oct 2015 14:21:46 -0700 Subject: Added proper recognition of android devices in the Active Sessions UI --- web/react/components/activity_log_modal.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'web/react') diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index 74d6c64e3..2c944913f 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -81,6 +81,7 @@ export default class ActivityLogModal extends React.Component { const currentSession = this.state.sessions[i]; const lastAccessTime = new Date(currentSession.last_activity_at); const firstAccessTime = new Date(currentSession.create_at); + let devicePlatform = currentSession.props.platform; let devicePicture = ''; if (currentSession.props.platform === 'Windows') { @@ -88,7 +89,12 @@ export default class ActivityLogModal extends React.Component { } else if (currentSession.props.platform === 'Macintosh' || currentSession.props.platform === 'iPhone') { devicePicture = 'fa fa-apple'; } else if (currentSession.props.platform === 'Linux') { - devicePicture = 'fa fa-linux'; + if (currentSession.props.os.indexOf('Android') >= 0) { + devicePlatform = 'Android'; + devicePicture = 'fa fa-android'; + } else { + devicePicture = 'fa fa-linux'; + } } let moreInfo; @@ -119,7 +125,7 @@ export default class ActivityLogModal extends React.Component { className='activity-log__table' >
-
{currentSession.props.platform}
+
{devicePlatform}
{`Last activity: ${lastAccessTime.toDateString()}, ${lastAccessTime.toLocaleTimeString()}`}
{moreInfo} -- cgit v1.2.3-1-g7c22 From 5f45556b433b5787b79fd02dd4b16181a6b25805 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Fri, 16 Oct 2015 14:50:45 -0700 Subject: Fixes back button on username page during team signup when email is turned off --- web/react/components/team_signup_username_page.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'web/react') diff --git a/web/react/components/team_signup_username_page.jsx b/web/react/components/team_signup_username_page.jsx index fa8a031a0..21e76e2b8 100644 --- a/web/react/components/team_signup_username_page.jsx +++ b/web/react/components/team_signup_username_page.jsx @@ -15,7 +15,12 @@ export default class TeamSignupUsernamePage extends React.Component { } submitBack(e) { e.preventDefault(); - this.props.state.wizard = 'send_invites'; + if (global.window.config.SendEmailNotifications === 'true') { + this.props.state.wizard = 'send_invites'; + } else { + this.props.state.wizard = 'team_url'; + } + this.props.updateParent(this.props.state); } submitNext(e) { -- cgit v1.2.3-1-g7c22 From aa40f88bbbca68089e8fad144f590f27e3afa3da Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Sat, 17 Oct 2015 02:52:46 +0200 Subject: PLT-463: Remove AUTHOR from YouTube preview not helpful and takes up too much room --- web/react/components/post_body.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'web/react') diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 1db0b12e7..fb838b736 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -116,7 +116,7 @@ export default class PostBody extends React.Component { } var metadata = data.items[0].snippet; this.receivedYoutubeData = true; - this.setState({youtubeUploader: metadata.channelTitle, youtubeTitle: metadata.title}); + this.setState({youtubeTitle: metadata.title}); } if (global.window.config.GoogleDeveloperKey && !this.receivedYoutubeData) { @@ -134,18 +134,12 @@ export default class PostBody extends React.Component { header = header + ' - '; } - let uploader = this.state.youtubeUploader; - if (!uploader) { - uploader = 'unknown'; - } - return (

{header} {this.state.youtubeTitle}

-

{uploader}