summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/admin_console/team_users.jsx8
-rw-r--r--web/react/components/channel_invite_modal.jsx2
-rw-r--r--web/react/components/channel_loader.jsx9
-rw-r--r--web/react/components/channel_members.jsx8
-rw-r--r--web/react/components/member_list.jsx6
-rw-r--r--web/react/components/member_list_item.jsx26
-rw-r--r--web/react/components/member_list_team.jsx8
-rw-r--r--web/react/components/more_direct_channels.jsx2
-rw-r--r--web/react/components/navbar_dropdown.jsx18
-rw-r--r--web/react/components/sidebar.jsx82
-rw-r--r--web/react/components/sidebar_header.jsx3
-rw-r--r--web/react/components/signup_team.jsx15
-rw-r--r--web/react/components/tutorial/tutorial_intro_screens.jsx6
13 files changed, 83 insertions, 110 deletions
diff --git a/web/react/components/admin_console/team_users.jsx b/web/react/components/admin_console/team_users.jsx
index b44aba56e..7161139e6 100644
--- a/web/react/components/admin_console/team_users.jsx
+++ b/web/react/components/admin_console/team_users.jsx
@@ -147,9 +147,11 @@ export default class UserList extends React.Component {
className='form-horizontal'
role='form'
>
- <div className='member-list-holder'>
- {memberList}
- </div>
+ <table className='table more-table member-list-holder'>
+ <tbody>
+ {memberList}
+ </tbody>
+ </table>
</form>
<ResetPasswordModal
user={this.state.user}
diff --git a/web/react/components/channel_invite_modal.jsx b/web/react/components/channel_invite_modal.jsx
index 7c7770095..e90d1a666 100644
--- a/web/react/components/channel_invite_modal.jsx
+++ b/web/react/components/channel_invite_modal.jsx
@@ -139,7 +139,7 @@ export default class ChannelInviteModal extends React.Component {
return (
<div
- className='modal fade'
+ className='modal fade more-modal'
id='channel_invite'
tabIndex='-1'
role='dialog'
diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx
index 55b4a55c0..4fc115a92 100644
--- a/web/react/components/channel_loader.jsx
+++ b/web/react/components/channel_loader.jsx
@@ -30,19 +30,14 @@ export default class ChannelLoader extends React.Component {
AsyncClient.getChannels(true, true);
AsyncClient.getChannelExtraInfo(true);
AsyncClient.findTeams();
- AsyncClient.getStatuses();
AsyncClient.getMyTeam();
+ setTimeout(() => AsyncClient.getStatuses(), 3000); // temporary until statuses are reworked a bit
/* Perform pending post clean-up */
PostStore.clearPendingPosts();
/* Set up interval functions */
- this.intervalId = setInterval(
- function pollStatuses() {
- AsyncClient.getStatuses();
- },
- 30000
- );
+ this.intervalId = setInterval(() => AsyncClient.getStatuses(), 30000);
/* Device tracking setup */
var iOS = (/(iPad|iPhone|iPod)/g).test(navigator.userAgent);
diff --git a/web/react/components/channel_members.jsx b/web/react/components/channel_members.jsx
index 86cc2464d..d0ea7278b 100644
--- a/web/react/components/channel_members.jsx
+++ b/web/react/components/channel_members.jsx
@@ -150,7 +150,7 @@ export default class ChannelMembers extends React.Component {
return (
<div
- className='modal fade'
+ className='modal fade more-modal'
ref='modal'
id='channel_members'
tabIndex='-1'
@@ -181,11 +181,7 @@ export default class ChannelMembers extends React.Component {
ref='modalBody'
className='modal-body'
>
- <div className='col-sm-12'>
- <div className='team-member-list'>
- {memberList}
- </div>
- </div>
+ {memberList}
</div>
<div className='modal-footer'>
<button
diff --git a/web/react/components/member_list.jsx b/web/react/components/member_list.jsx
index fe744760f..70eb0a500 100644
--- a/web/react/components/member_list.jsx
+++ b/web/react/components/member_list.jsx
@@ -21,7 +21,8 @@ export default class MemberList extends React.Component {
}
return (
- <div className='member-list-holder'>
+ <table className='table more-table member-list-holder'>
+ <tbody>
{members.map(function mymembers(member) {
return (
<MemberListItem
@@ -34,8 +35,9 @@ export default class MemberList extends React.Component {
/>
);
}, this)}
+ </tbody>
{message}
- </div>
+ </table>
);
}
}
diff --git a/web/react/components/member_list_item.jsx b/web/react/components/member_list_item.jsx
index 8ed94680e..8251d67bc 100644
--- a/web/react/components/member_list_item.jsx
+++ b/web/react/components/member_list_item.jsx
@@ -37,7 +37,7 @@ export default class MemberListItem extends React.Component {
invite = (
<a
onClick={this.handleInvite}
- className='btn btn-sm btn-primary member-invite'
+ className='btn btn-sm btn-primary'
>
<i className='glyphicon glyphicon-envelope'/>
{' Add'}
@@ -102,17 +102,19 @@ export default class MemberListItem extends React.Component {
}
return (
- <div className='row member-div'>
- <img
- className='post-profile-img pull-left'
- src={'/api/v1/users/' + member.id + '/image?time=' + timestamp + '&' + Utils.getSessionIndex()}
- height='36'
- width='36'
- />
- <span className='member-name'>{member.username}</span>
- <span className='member-email'>{member.email}</span>
- {invite}
- </div>
+ <tr>
+ <td className='direct-channel'>
+ <img
+ className='profile-img pull-left'
+ src={'/api/v1/users/' + member.id + '/image?time=' + timestamp + '&' + Utils.getSessionIndex()}
+ height='36'
+ width='36'
+ />
+ <div className='member-name'>{member.username}</div>
+ <div className='member-description'>{member.email}</div>
+ </td>
+ <td className='td--action lg'>{invite}</td>
+ </tr>
);
}
}
diff --git a/web/react/components/member_list_team.jsx b/web/react/components/member_list_team.jsx
index 5ca40a39d..cb2d0660b 100644
--- a/web/react/components/member_list_team.jsx
+++ b/web/react/components/member_list_team.jsx
@@ -15,9 +15,11 @@ export default class MemberListTeam extends React.Component {
}, this);
return (
- <div className='member-list-holder'>
- {memberList}
- </div>
+ <table className='table more-table member-list-holder'>
+ <tbody>
+ {memberList}
+ </tbody>
+ </table>
);
}
}
diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx
index b0232fc08..40deb37f2 100644
--- a/web/react/components/more_direct_channels.jsx
+++ b/web/react/components/more_direct_channels.jsx
@@ -206,7 +206,7 @@ export default class MoreDirectChannels extends React.Component {
return (
<Modal
- className='modal-direct-channels'
+ dialogClassName='more-modal'
show={this.props.show}
onHide={this.handleHide}
>
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index f43bdffdf..029b9c137 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -11,23 +11,15 @@ var AboutBuildModal = require('./about_build_modal.jsx');
var Constants = require('../utils/constants.jsx');
function getStateFromStores() {
- let teams = [];
- let teamsObject = UserStore.getTeams();
- for (let teamId in teamsObject) {
+ const teams = [];
+ const teamsObject = UserStore.getTeams();
+ for (const teamId in teamsObject) {
if (teamsObject.hasOwnProperty(teamId)) {
teams.push(teamsObject[teamId]);
}
}
- teams.sort(function sortByDisplayName(teamA, teamB) {
- let teamADisplayName = teamA.display_name.toLowerCase();
- let teamBDisplayName = teamB.display_name.toLowerCase();
- if (teamADisplayName < teamBDisplayName) {
- return -1;
- } else if (teamADisplayName > teamBDisplayName) {
- return 1;
- }
- return 0;
- });
+
+ teams.sort(Utils.sortByDisplayName);
return {teams};
}
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index c47919885..aab9919a4 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -100,74 +100,56 @@ export default class Sidebar extends React.Component {
}
getStateFromStores() {
const members = ChannelStore.getAllMembers();
- var teamMemberMap = UserStore.getActiveOnlyProfiles();
- var currentId = ChannelStore.getCurrentId();
- const currentUserId = UserStore.getCurrentId();
+ const currentChannelId = ChannelStore.getCurrentId();
- var teammates = [];
- for (var id in teamMemberMap) {
- if (id === currentUserId) {
- continue;
- }
- teammates.push(teamMemberMap[id]);
- }
+ const channels = Object.assign([], ChannelStore.getAll());
+ const publicChannels = channels.filter((channel) => channel.type === Constants.OPEN_CHANNEL);
+ const privateChannels = channels.filter((channel) => channel.type === Constants.PRIVATE_CHANNEL);
+ const directChannels = channels.filter((channel) => channel.type === Constants.DM_CHANNEL);
const preferences = PreferenceStore.getPreferences(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW);
var visibleDirectChannels = [];
- var hiddenDirectChannelCount = 0;
- for (var i = 0; i < teammates.length; i++) {
- const teammate = teammates[i];
-
- if (teammate.id === currentUserId) {
+ for (var i = 0; i < directChannels.length; i++) {
+ const dm = directChannels[i];
+ const teammate = Utils.getDirectTeammate(dm.id);
+ if (!teammate) {
continue;
}
- const channelName = Utils.getDirectChannelName(currentUserId, teammate.id);
+ const member = members[dm.id];
+ const msgCount = dm.total_msg_count - member.msg_count;
- let forceShow = false;
- let channel = ChannelStore.getByName(channelName);
+ // always show a channel if either it is the current one or if it is unread, but it is not currently being left
+ const forceShow = (currentChannelId === dm.id || msgCount > 0) && !this.isLeaving.get(dm.id);
+ const preferenceShow = preferences.some((preference) => (preference.name === teammate.id && preference.value !== 'false'));
- if (channel) {
- const member = members[channel.id];
- const msgCount = channel.total_msg_count - member.msg_count;
+ if (preferenceShow || forceShow) {
+ dm.display_name = Utils.displayUsername(teammate.id);
+ dm.teammate_id = teammate.id;
+ dm.status = UserStore.getStatus(teammate.id);
- // always show a channel if either it is the current one or if it is unread, but it is not currently being left
- forceShow = (currentId === channel.id || msgCount > 0) && !this.isLeaving.get(channel.id);
- } else {
- channel = {};
- channel.fake = true;
- channel.name = channelName;
- channel.last_post_at = 0;
- channel.total_msg_count = 0;
- channel.type = 'D';
- }
+ visibleDirectChannels.push(dm);
- channel.display_name = Utils.displayUsername(teammate.id);
- channel.teammate_id = teammate.id;
- channel.status = UserStore.getStatus(teammate.id);
-
- if (preferences.some((preference) => (preference.name === teammate.id && preference.value !== 'false'))) {
- visibleDirectChannels.push(channel);
- } else if (forceShow) {
- // make sure that unread direct channels are visible
- const preference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, teammate.id, 'true');
- AsyncClient.savePreferences([preference]);
-
- visibleDirectChannels.push(channel);
- } else {
- hiddenDirectChannelCount += 1;
+ if (forceShow && !preferenceShow) {
+ // make sure that unread direct channels are visible
+ const preference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, teammate.id, 'true');
+ AsyncClient.savePreferences([preference]);
+ }
}
}
+ const hiddenDirectChannelCount = UserStore.getActiveOnlyProfileList().length - visibleDirectChannels.length;
+
visibleDirectChannels.sort(this.sortChannelsByDisplayName);
const tutorialPref = PreferenceStore.getPreference(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), {value: '0'});
return {
- activeId: currentId,
- channels: ChannelStore.getAll(),
+ activeId: currentChannelId,
members,
+ publicChannels,
+ privateChannels,
visibleDirectChannels,
hiddenDirectChannelCount,
showTutorialTip: parseInt(tutorialPref.value, 10) === TutorialSteps.CHANNEL_POPOVER
@@ -534,11 +516,9 @@ export default class Sidebar extends React.Component {
this.lastUnreadChannel = null;
// create elements for all 3 types of channels
- const publicChannels = this.state.channels.filter((channel) => channel.type === 'O');
- const publicChannelItems = publicChannels.map(this.createChannelElement);
+ const publicChannelItems = this.state.publicChannels.map(this.createChannelElement);
- const privateChannels = this.state.channels.filter((channel) => channel.type === 'P');
- const privateChannelItems = privateChannels.map(this.createChannelElement);
+ const privateChannelItems = this.state.privateChannels.map(this.createChannelElement);
const directMessageItems = this.state.visibleDirectChannels.map((channel, index, arr) => {
return this.createChannelElement(channel, index, arr, this.handleLeaveDirectChannel);
diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx
index 3f777d93c..46730e1e6 100644
--- a/web/react/components/sidebar_header.jsx
+++ b/web/react/components/sidebar_header.jsx
@@ -62,6 +62,9 @@ export default class SidebarHeader extends React.Component {
<p>
{'Team administrators can also access their '}<strong>{'Team Settings'}</strong>{' from this menu.'}
</p>
+ <p>
+ {'System administrators will find a '}<strong>{'System Console'}</strong>{' option to administrate the entire system.'}
+ </p>
</div>
);
diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx
index 37760a2a2..516765a3f 100644
--- a/web/react/components/signup_team.jsx
+++ b/web/react/components/signup_team.jsx
@@ -46,7 +46,7 @@ export default class TeamSignUp extends React.Component {
} else {
teamListing = (
<div>
- <h3>{'Choose a Team'}</h3>
+ <h4>{'Choose a Team'}</h4>
<div className='signup-team-all'>
{
this.props.teams.map((team) => {
@@ -58,19 +58,18 @@ export default class TeamSignUp extends React.Component {
<a
href={'/' + team.name}
>
- <div className='signup-team-dir__group'>
- <span className='signup-team-dir__name'>{team.display_name}</span>
- <span
- className='glyphicon glyphicon-menu-right right signup-team-dir__arrow'
- aria-hidden='true'
- />
- </div>
+ <span className='signup-team-dir__name'>{team.display_name}</span>
+ <span
+ className='glyphicon glyphicon-menu-right right signup-team-dir__arrow'
+ aria-hidden='true'
+ />
</a>
</div>
);
})
}
</div>
+ <h4>{'Or Create a Team'}</h4>
</div>
);
}
diff --git a/web/react/components/tutorial/tutorial_intro_screens.jsx b/web/react/components/tutorial/tutorial_intro_screens.jsx
index 8fc38b1e3..a99e9fe28 100644
--- a/web/react/components/tutorial/tutorial_intro_screens.jsx
+++ b/web/react/components/tutorial/tutorial_intro_screens.jsx
@@ -53,7 +53,7 @@ export default class TutorialIntroScreens extends React.Component {
<div>
<h3>{'Welcome to:'}</h3>
<h1>{'Mattermost'}</h1>
- <p>{'Your team communications all in one place, instantly searchable and available anywhere.'}</p>
+ <p>{'Your team communication all in one place, instantly searchable and available anywhere.'}</p>
<p>{'Keep your team connected to help them achieve what matters most.'}</p>
<div className='tutorial__circles'>
<div className='circle active'/>
@@ -68,7 +68,7 @@ export default class TutorialIntroScreens extends React.Component {
<div>
<h3>{'How Mattermost works:'}</h3>
<p>{'Communication happens in public discussion channels, private groups and direct messages.'}</p>
- <p>{'Everything is archived and searchable from any web-enabled laptop, tablet or phone.'}</p>
+ <p>{'Everything is archived and searchable from any web-enabled desktop, laptop or phone.'}</p>
<div className='tutorial__circles'>
<div className='circle'/>
<div className='circle active'/>
@@ -123,7 +123,7 @@ export default class TutorialIntroScreens extends React.Component {
</a>
{'.'}
</p>
- {'Click “Next” to enter Town Square. This is the first channel teammates see when they sign up - use it for posting updates everyone needs to know.'}
+ {'Click “Next” to enter Town Square. This is the first channel teammates see when they sign up. Use it for posting updates everyone needs to know.'}
<div className='tutorial__circles'>
<div className='circle'/>
<div className='circle'/>