diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-07-09 15:49:23 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-07-17 15:13:31 -0400 |
commit | 1c7f0be268046d2b509e23268eebcbbef78c5a24 (patch) | |
tree | 5da2b715ed681f2ec53bc7098f789803b3906d97 /web | |
parent | c09f1b9e4e5638080622ff9aa70735db382a16df (diff) | |
download | chat-1c7f0be268046d2b509e23268eebcbbef78c5a24.tar.gz chat-1c7f0be268046d2b509e23268eebcbbef78c5a24.tar.bz2 chat-1c7f0be268046d2b509e23268eebcbbef78c5a24.zip |
Renamed all clientside references from full_name to nickname
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/channel_header.jsx | 2 | ||||
-rw-r--r-- | web/react/components/member_list_team.jsx | 4 | ||||
-rw-r--r-- | web/react/components/mention_list.jsx | 10 | ||||
-rw-r--r-- | web/react/components/post_list.jsx | 2 | ||||
-rw-r--r-- | web/react/components/sidebar.jsx | 4 | ||||
-rw-r--r-- | web/react/components/user_settings.jsx | 14 | ||||
-rw-r--r-- | web/react/stores/user_store.jsx | 4 | ||||
-rw-r--r-- | web/templates/head.html | 2 |
8 files changed, 21 insertions, 21 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index 2e430489f..30435dc08 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -153,7 +153,7 @@ module.exports = React.createClass({ if (isDirect) { if (this.state.users.length > 1) { var contact = this.state.users[((this.state.users[0].id === currentId) ? 1 : 0)]; - channelTitle = <UserProfile userId={contact.id} overwriteName={contact.full_name || contact.username} />; + channelTitle = <UserProfile userId={contact.id} overwriteName={contact.nickname || contact.username} />; } } diff --git a/web/react/components/member_list_team.jsx b/web/react/components/member_list_team.jsx index 89b5e49d5..8d69a36d3 100644 --- a/web/react/components/member_list_team.jsx +++ b/web/react/components/member_list_team.jsx @@ -85,8 +85,8 @@ var MemberListTeamItem = React.createClass({ return ( <div className="row member-div"> <img className="post-profile-img pull-left" src={"/api/v1/users/" + user.id + "/image?time=" + timestamp} height="36" width="36" /> - <span className="member-name">{user.full_name.trim() ? user.full_name : user.username}</span> - <span className="member-email">{user.full_name.trim() ? user.username : email}</span> + <span className="member-name">{user.nickname.trim() ? user.nickname : user.username}</span> + <span className="member-email">{user.nickname.trim() ? user.username : email}</span> <div className="dropdown member-drop"> <a href="#" className="dropdown-toggle theme" type="button" id="channel_header_dropdown" data-toggle="dropdown" aria-expanded="true"> <span>{currentRoles} </span> diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx index c5ff82346..c04e28849 100644 --- a/web/react/components/mention_list.jsx +++ b/web/react/components/mention_list.jsx @@ -165,14 +165,14 @@ module.exports = React.createClass({ var all = {}; all.username = "all"; - all.full_name = ""; + all.nickname = ""; all.secondary_text = "Notifies everyone in the team"; all.id = "allmention"; users.push(all); var channel = {}; channel.username = "channel"; - channel.full_name = ""; + channel.nickname = ""; channel.secondary_text = "Notifies everyone in the channel"; channel.id = "channelmention"; users.push(channel); @@ -189,11 +189,11 @@ module.exports = React.createClass({ if (this.alreadyMentioned(users[i].username)) continue; var firstName = "", lastName = ""; - if (users[i].full_name.length > 0) { - var splitName = users[i].full_name.split(' '); + if (users[i].nickname.length > 0) { + var splitName = users[i].nickname.split(' '); firstName = splitName[0].toLowerCase(); lastName = splitName.length > 1 ? splitName[splitName.length-1].toLowerCase() : ""; - users[i].secondary_text = users[i].full_name; + users[i].secondary_text = users[i].nickname; } if (firstName.lastIndexOf(mentionText,0) === 0 diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 573799a19..5439ca43d 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -305,7 +305,7 @@ module.exports = React.createClass({ var teammate = utils.getDirectTeammate(channel.id) if (teammate) { - var teammate_name = teammate.full_name.length > 0 ? teammate.full_name : teammate.username; + var teammate_name = teammate.nickname.length > 0 ? teammate.nickname : teammate.username; more_messages = ( <div className="channel-intro"> <div className="post-profile-img__container channel-intro-img"> diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index cae9425d3..742720048 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -131,7 +131,7 @@ function getStateFromStores() { var channel = ChannelStore.getByName(channelName); if (channel != null) { - channel.display_name = teammate.full_name.trim() != "" ? teammate.full_name : teammate.username; + channel.display_name = teammate.nickname.trim() != "" ? teammate.nickname : teammate.username; channel.teammate_username = teammate.username; channel.status = UserStore.getStatus(teammate.id); @@ -150,7 +150,7 @@ function getStateFromStores() { var tempChannel = {}; tempChannel.fake = true; tempChannel.name = channelName; - tempChannel.display_name = teammate.full_name.trim() != "" ? teammate.full_name : teammate.username; + tempChannel.display_name = teammate.nickname.trim() != "" ? teammate.nickname : teammate.username; tempChannel.status = UserStore.getStatus(teammate.id); tempChannel.last_post_at = 0; readDirectChannels.push(tempChannel); diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx index 38e4b1aea..9ec7f64c9 100644 --- a/web/react/components/user_settings.jsx +++ b/web/react/components/user_settings.jsx @@ -316,8 +316,8 @@ var NotificationsTab = React.createClass({ if (this.props.activeSection === 'keys') { var user = this.props.user; var first_name = ""; - if (user.full_name.length > 0) { - first_name = user.full_name.split(' ')[0]; + if (user.nickname.length > 0) { + first_name = user.nickname.split(' ')[0]; } var inputs = []; @@ -399,7 +399,7 @@ var NotificationsTab = React.createClass({ if (this.state.first_name_key) { var first_name = ""; var user = this.props.user; - if (user.full_name.length > 0) first_name = user.full_name.split(' ')[0]; + if (user.nickname.length > 0) first_name = user.nickname.split(' ')[0]; if (first_name != "") keys.push(first_name); } if (this.state.username_key) keys.push(this.props.user.username); @@ -761,12 +761,12 @@ var GeneralTab = React.createClass({ var fullName = firstName + ' ' + lastName; - if (user.full_name === fullName) { + if (user.nickname === fullName) { this.setState({client_error: "You must submit a new name"}) return; } - user.full_name = fullName; + user.nickname = fullName; this.submitUser(user); }, @@ -861,7 +861,7 @@ var GeneralTab = React.createClass({ getInitialState: function() { var user = this.props.user; - var splitStr = user.full_name.split(' '); + var splitStr = user.nickname.split(' '); var firstName = splitStr.shift(); var lastName = splitStr.join(' '); @@ -913,7 +913,7 @@ var GeneralTab = React.createClass({ nameSection = ( <SettingItemMin title="Name" - describe={UserStore.getCurrentUser().full_name} + describe={UserStore.getCurrentUser().nickname} updateSection={function(){self.updateSection("name");}} /> ); diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx index dd207ca80..c293469e5 100644 --- a/web/react/stores/user_store.jsx +++ b/web/react/stores/user_store.jsx @@ -180,8 +180,8 @@ var UserStore = assign({}, EventEmitter.prototype, { if (user && user.notify_props && user.notify_props.mention_keys) { var keys = user.notify_props.mention_keys.split(','); - if (user.full_name.length > 0 && user.notify_props.first_name === "true") { - var first = user.full_name.split(' ')[0]; + if (user.nickname.length > 0 && user.notify_props.first_name === "true") { + var first = user.nickname.split(' ')[0]; if (first.length > 0) keys.push(first); } diff --git a/web/templates/head.html b/web/templates/head.html index 5b423d487..0cbda28c5 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -59,7 +59,7 @@ var user = window.UserStore.getCurrentUser(true); if (user) { analytics.identify(user.id, { - name: user.full_name, + name: user.nickname, email: user.email, createdAt: user.create_at, username: user.username, |