From 038e50b5b5a2d813a3ac82850ce866c1a13089e4 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 26 Jan 2016 21:04:29 -0500 Subject: PLT-1586 Changing session reporting --- web/react/components/activity_log_modal.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'web/react/components/activity_log_modal.jsx') diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index 6a880f0ee..91ca87647 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -100,12 +100,15 @@ export default class ActivityLogModal extends React.Component { if (currentSession.props.platform === 'Windows') { devicePicture = 'fa fa-windows'; + } else if (currentSession.device_id.indexOf('apple:') === 0) { + devicePicture = 'fa fa-apple'; + devicePlatform = 'iPhone Native App'; + } else if (currentSession.device_id.indexOf('Android:') === 0) { + devicePlatform = 'Android Native App'; + devicePicture = 'fa fa-android'; } else if (currentSession.props.platform === 'Macintosh' || currentSession.props.platform === 'iPhone') { devicePicture = 'fa fa-apple'; - } else if (currentSession.props.platform.browser.indexOf('Mattermost/') === 0) { - devicePicture = 'fa fa-apple'; - devicePlatform = 'iPhone'; } else if (currentSession.props.platform === 'Linux') { if (currentSession.props.os.indexOf('Android') >= 0) { devicePlatform = 'Android'; -- cgit v1.2.3-1-g7c22 From 6fd0f651b94e594dddb00800bf295af7ff42934e Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 26 Jan 2016 21:13:44 -0500 Subject: Fixing naming --- web/react/components/activity_log_modal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/react/components/activity_log_modal.jsx') diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index 91ca87647..eec4d8f8d 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -103,7 +103,7 @@ export default class ActivityLogModal extends React.Component { } else if (currentSession.device_id.indexOf('apple:') === 0) { devicePicture = 'fa fa-apple'; devicePlatform = 'iPhone Native App'; - } else if (currentSession.device_id.indexOf('Android:') === 0) { + } else if (currentSession.device_id.indexOf('android:') === 0) { devicePlatform = 'Android Native App'; devicePicture = 'fa fa-android'; } else if (currentSession.props.platform === 'Macintosh' || -- cgit v1.2.3-1-g7c22 From 41013daa0b86a450ade9cdac911ccdb7722eb473 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 27 Jan 2016 10:07:26 -0500 Subject: Fixing small issue with displaying activity log --- web/react/components/activity_log_modal.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/react/components/activity_log_modal.jsx') diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index eec4d8f8d..2c42f5971 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -100,10 +100,10 @@ export default class ActivityLogModal extends React.Component { if (currentSession.props.platform === 'Windows') { devicePicture = 'fa fa-windows'; - } else if (currentSession.device_id.indexOf('apple:') === 0) { + } else if (currentSession.device_id && currentSession.device_id.indexOf('apple:') === 0) { devicePicture = 'fa fa-apple'; devicePlatform = 'iPhone Native App'; - } else if (currentSession.device_id.indexOf('android:') === 0) { + } else if (currentSession.device_id && currentSession.device_id.indexOf('android:') === 0) { devicePlatform = 'Android Native App'; devicePicture = 'fa fa-android'; } else if (currentSession.props.platform === 'Macintosh' || -- cgit v1.2.3-1-g7c22 From 78314c7d4d1417fd42ab48cbe41d360f80915453 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Sat, 30 Jan 2016 18:10:04 -0300 Subject: PLT-7: Refactoring frontend (chunk 6) - User settings --- web/react/components/activity_log_modal.jsx | 99 +++++++++++++++++++++++++---- 1 file changed, 87 insertions(+), 12 deletions(-) (limited to 'web/react/components/activity_log_modal.jsx') diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index 2c42f5971..f8a2af571 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -8,6 +8,8 @@ const Modal = ReactBootstrap.Modal; import LoadingScreen from './loading_screen.jsx'; import * as Utils from '../utils/utils.jsx'; +import {FormattedMessage} from 'mm-intl'; + export default class ActivityLogModal extends React.Component { constructor(props) { super(props); @@ -102,16 +104,31 @@ export default class ActivityLogModal extends React.Component { devicePicture = 'fa fa-windows'; } else if (currentSession.device_id && currentSession.device_id.indexOf('apple:') === 0) { devicePicture = 'fa fa-apple'; - devicePlatform = 'iPhone Native App'; + devicePlatform = ( + + ); } else if (currentSession.device_id && currentSession.device_id.indexOf('android:') === 0) { - devicePlatform = 'Android Native App'; + devicePlatform = ( + + ); devicePicture = 'fa fa-android'; } else if (currentSession.props.platform === 'Macintosh' || currentSession.props.platform === 'iPhone') { devicePicture = 'fa fa-apple'; } else if (currentSession.props.platform === 'Linux') { if (currentSession.props.os.indexOf('Android') >= 0) { - devicePlatform = 'Android'; + devicePlatform = ( + + ); devicePicture = 'fa fa-android'; } else { devicePicture = 'fa fa-linux'; @@ -122,10 +139,43 @@ export default class ActivityLogModal extends React.Component { if (this.state.moreInfo[i]) { moreInfo = (
-
{`First time active: ${firstAccessTime.toDateString()}, ${lastAccessTime.toLocaleTimeString()}`}
-
{`OS: ${currentSession.props.os}`}
-
{`Browser: ${currentSession.props.browser}`}
-
{`Session ID: ${currentSession.id}`}
+
+ +
+
+ +
+
+ +
+
+ +
); } else { @@ -135,7 +185,10 @@ export default class ActivityLogModal extends React.Component { href='#' onClick={this.handleMoreInfo.bind(this, i)} > - More info + ); } @@ -148,7 +201,16 @@ export default class ActivityLogModal extends React.Component {
{devicePlatform}
-
{`Last activity: ${lastAccessTime.toDateString()}, ${lastAccessTime.toLocaleTimeString()}`}
+
+ +
{moreInfo}
@@ -157,7 +219,10 @@ export default class ActivityLogModal extends React.Component { onClick={this.submitRevoke.bind(this, currentSession.id)} className='btn btn-primary' > - Logout + @@ -178,10 +243,20 @@ export default class ActivityLogModal extends React.Component { bsSize='large' > - {'Active Sessions'} + + + -

{'Sessions are created when you log in with your email and password to a new browser on a device. Sessions let you use Mattermost for up to 30 days without having to log in again. If you want to log out sooner, use the \'Logout\' button below to end a session.'}

+

+ +

{content}
-- cgit v1.2.3-1-g7c22