From 33362a56a759142edcd2713bc0dddb629032da5f Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 29 Oct 2015 19:24:18 +0500 Subject: UI Improvements --- .../components/admin_console/team_analytics.jsx | 184 ++++++++++++--------- web/react/components/popover_list_members.jsx | 32 ++-- 2 files changed, 125 insertions(+), 91 deletions(-) (limited to 'web/react') diff --git a/web/react/components/admin_console/team_analytics.jsx b/web/react/components/admin_console/team_analytics.jsx index a945a551c..0c9d1f61b 100644 --- a/web/react/components/admin_console/team_analytics.jsx +++ b/web/react/components/admin_console/team_analytics.jsx @@ -210,69 +210,89 @@ export default class TeamAnalytics extends React.Component { } var totalCount = ( -
-
{'Total Users'}
-
{this.state.users == null ? 'Loading...' : Object.keys(this.state.users).length}
+
+
+
{'Total Users'}
+
{this.state.users == null ? 'Loading...' : Object.keys(this.state.users).length}
+
); var openChannelCount = ( -
-
{'Public Groups'}
-
{this.state.channel_open_count == null ? 'Loading...' : this.state.channel_open_count}
+
+
+
{'Public Groups'}
+
{this.state.channel_open_count == null ? 'Loading...' : this.state.channel_open_count}
+
); var openPrivateCount = ( -
-
{'Private Groups'}
-
{this.state.channel_private_count == null ? 'Loading...' : this.state.channel_private_count}
+
+
+
{'Private Groups'}
+
{this.state.channel_private_count == null ? 'Loading...' : this.state.channel_private_count}
+
); var postCount = ( -
-
{'Total Posts'}
-
{this.state.post_count == null ? 'Loading...' : this.state.post_count}
+
+
+
{'Total Posts'}
+
{this.state.post_count == null ? 'Loading...' : this.state.post_count}
+
); var postCountsByDay = ( -
-
{'Total Posts'}
-
{'Loading...'}
+
+
+
{'Total Posts'}
+
{'Loading...'}
+
); if (this.state.post_counts_day != null) { postCountsByDay = ( -
-
{'Total Posts'}
- +
+
+
{'Total Posts'}
+
+ +
+
); } var usersWithPostsByDay = ( -
-
{'Total Posts'}
-
{'Loading...'}
+
+
+
{'Total Posts'}
+
{'Loading...'}
+
); if (this.state.user_counts_with_posts_day != null) { usersWithPostsByDay = ( -
-
{'Active Users With Posts'}
- +
+
+
{'Active Users With Posts'}
+
+ +
+
); } @@ -286,22 +306,26 @@ export default class TeamAnalytics extends React.Component { if (this.state.recent_active_users != null) { recentActiveUser = ( -
-
{'Recent Active Users'}
- - - { - this.state.recent_active_users.map((user) => { - return ( - - - - - ); - }) - } - -
{user.email}{Utils.displayDateTime(user.last_activity_at)}
+
+
+
{'Recent Active Users'}
+
+ + + { + this.state.recent_active_users.map((user) => { + return ( + + + + + ); + }) + } + +
{user.email}{Utils.displayDateTime(user.last_activity_at)}
+
+
); } @@ -315,38 +339,50 @@ export default class TeamAnalytics extends React.Component { if (this.state.newly_created_users != null) { newUsers = ( -
-
{'Newly Created Users'}
- - - { - this.state.newly_created_users.map((user) => { - return ( - - - - - ); - }) - } - -
{user.email}{Utils.displayDateTime(user.create_at)}
+
+
+
{'Newly Created Users'}
+
+ + + { + this.state.newly_created_users.map((user) => { + return ( + + + + + ); + }) + } + +
{user.email}{Utils.displayDateTime(user.create_at)}
+
+
); } return ( -
-

{'Statistics for ' + this.props.team.name}

+
+

{'Statistics for ' + this.props.team.name}

{serverError} - {totalCount} - {postCount} - {openChannelCount} - {openPrivateCount} - {postCountsByDay} - {usersWithPostsByDay} - {recentActiveUser} - {newUsers} +
+ {totalCount} + {postCount} + {openChannelCount} + {openPrivateCount} +
+
+ {postCountsByDay} +
+
+ {usersWithPostsByDay} +
+
+ {recentActiveUser} + {newUsers} +
); } diff --git a/web/react/components/popover_list_members.jsx b/web/react/components/popover_list_members.jsx index 9cffa2400..f3c0fa0b4 100644 --- a/web/react/components/popover_list_members.jsx +++ b/web/react/components/popover_list_members.jsx @@ -42,6 +42,10 @@ export default class PopoverListMembers extends React.Component { }; } + componentDidUpdate() { + $(ReactDOM.findDOMNode(this.refs.memebersPopover)).find('.popover-content').perfectScrollbar(); + } + handleShowDirectChannel(teammate, e) { e.preventDefault(); @@ -106,27 +110,27 @@ export default class PopoverListMembers extends React.Component { let button = ''; if (currentUserId !== m.id && ch.type !== 'D') { button = ( - + ); } if (teamMembers[m.username] && teamMembers[m.username].delete_at <= 0) { popoverHtml.push(
@@ -135,14 +139,9 @@ export default class PopoverListMembers extends React.Component { > {m.username}
-
- {details} -
{button}
@@ -182,12 +181,11 @@ export default class PopoverListMembers extends React.Component { placement='bottom' > -
- {popoverHtml} -
+ {popoverHtml}
-- cgit v1.2.3-1-g7c22