summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/post.go6
-rw-r--r--config/config.json4
-rw-r--r--doc/install/Requirements.md6
-rw-r--r--docker/dev/config_docker.json4
-rw-r--r--docker/local/config_docker.json4
-rw-r--r--model/config.go4
-rw-r--r--web/react/components/search_results_item.jsx22
-rw-r--r--web/react/components/suggestion/command_provider.jsx1
-rw-r--r--web/react/components/suggestion/suggestion_box.jsx2
-rw-r--r--web/react/components/team_signup_with_email.jsx19
-rw-r--r--web/react/dispatcher/event_helpers.jsx25
-rw-r--r--web/react/stores/suggestion_store.jsx15
-rw-r--r--web/sass-files/sass/partials/_search.scss7
13 files changed, 84 insertions, 35 deletions
diff --git a/api/post.go b/api/post.go
index e1adc1d98..6736d75e2 100644
--- a/api/post.go
+++ b/api/post.go
@@ -565,7 +565,11 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
msg.DeviceId = strings.TrimPrefix(session.DeviceId, "apple:")
msg.ServerId = utils.CfgDiagnosticId
- msg.Message = profileMap[id].FirstName + " mentioned you in " + channel.DisplayName
+ if channel.Type == model.CHANNEL_DIRECT {
+ msg.Message = channelName + " sent you a direct message"
+ } else {
+ msg.Message = profileMap[id].FirstName + " mentioned you in " + channelName
+ }
httpClient := http.Client{}
request, _ := http.NewRequest("POST", *utils.Cfg.EmailSettings.PushNotificationServer+"/api/v1/send_push", strings.NewReader(msg.ToJson()))
diff --git a/config/config.json b/config/config.json
index 999ea8a83..4220d1055 100644
--- a/config/config.json
+++ b/config/config.json
@@ -68,8 +68,8 @@
"ConnectionSecurity": "",
"InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",
"PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",
- "SendPushNotifications": true,
- "PushNotificationServer": "https://push.mattermost.com"
+ "SendPushNotifications": false,
+ "PushNotificationServer": ""
},
"RateLimitSettings": {
"EnableRateLimiter": true,
diff --git a/doc/install/Requirements.md b/doc/install/Requirements.md
index b877b6dc0..162caf90d 100644
--- a/doc/install/Requirements.md
+++ b/doc/install/Requirements.md
@@ -4,10 +4,10 @@
Supported Operating Systems and Browsers for the Mattermost Web Client include:
-- PC: Windows 7, Windows 8 (Chrome 43+, Firefox 38+, Internet Explorer 10+)
-- Mac: OS 10 (Safari 7, Chrome 43+)
+- PC: Windows 7, Windows 8, Windows 10 (Chrome 43+, Firefox 38+, Internet Explorer 11, Edge)
+- Mac: OS 10 (Safari 9, Chrome 43+)
- Linux: Arch 4.0.0 (Chrome 43+)
-- iPhone 4s and higher (Safari on iOS 8.3+, Chrome 43+)
+- iPhone 4s and higher (Safari on iOS 9+, Chrome 43+)
- Android 5 and higher (Chrome 43+)
### Email Client
diff --git a/docker/dev/config_docker.json b/docker/dev/config_docker.json
index 4c5502ddd..a35abb9da 100644
--- a/docker/dev/config_docker.json
+++ b/docker/dev/config_docker.json
@@ -68,8 +68,8 @@
"ConnectionSecurity": "",
"InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",
"PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",
- "SendPushNotifications": true,
- "PushNotificationServer": "https://push.mattermost.com"
+ "SendPushNotifications": false,
+ "PushNotificationServer": ""
},
"RateLimitSettings": {
"EnableRateLimiter": true,
diff --git a/docker/local/config_docker.json b/docker/local/config_docker.json
index 4c5502ddd..a35abb9da 100644
--- a/docker/local/config_docker.json
+++ b/docker/local/config_docker.json
@@ -68,8 +68,8 @@
"ConnectionSecurity": "",
"InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",
"PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",
- "SendPushNotifications": true,
- "PushNotificationServer": "https://push.mattermost.com"
+ "SendPushNotifications": false,
+ "PushNotificationServer": ""
},
"RateLimitSettings": {
"EnableRateLimiter": true,
diff --git a/model/config.go b/model/config.go
index 869f975e6..14ce444c5 100644
--- a/model/config.go
+++ b/model/config.go
@@ -181,12 +181,12 @@ func (o *Config) SetDefaults() {
if o.EmailSettings.SendPushNotifications == nil {
o.EmailSettings.SendPushNotifications = new(bool)
- *o.EmailSettings.SendPushNotifications = true
+ *o.EmailSettings.SendPushNotifications = false
}
if o.EmailSettings.PushNotificationServer == nil {
o.EmailSettings.PushNotificationServer = new(string)
- *o.EmailSettings.PushNotificationServer = "https://push.mattermost.com"
+ *o.EmailSettings.PushNotificationServer = ""
}
}
diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx
index cd8359df5..f71abf971 100644
--- a/web/react/components/search_results_item.jsx
+++ b/web/react/components/search_results_item.jsx
@@ -8,11 +8,14 @@ import * as EventHelpers from '../dispatcher/event_helpers.jsx';
import * as utils from '../utils/utils.jsx';
import * as TextFormatting from '../utils/text_formatting.jsx';
+import Constants from '../utils/constants.jsx';
+
export default class SearchResultsItem extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
+ this.handleFocusRHSClick = this.handleFocusRHSClick.bind(this);
}
handleClick(e) {
@@ -26,6 +29,12 @@ export default class SearchResultsItem extends React.Component {
}
}
+ handleFocusRHSClick(e) {
+ e.preventDefault();
+
+ EventHelpers.emitPostFocusRightHandSideEvent(this.props.post);
+ }
+
render() {
var channelName = '';
var channel = ChannelStore.get(this.props.post.channel_id);
@@ -73,10 +82,21 @@ export default class SearchResultsItem extends React.Component {
{'Jump'}
</a>
</li>
+ <li>
+ <a
+ href='#'
+ className='comment-icon__container search-item__comment'
+ onClick={this.handleFocusRHSClick}
+ >
+ <span
+ className='comment-icon'
+ dangerouslySetInnerHTML={{__html: Constants.COMMENT_ICON}}
+ />
+ </a>
+ </li>
</ul>
<div className='search-item-snippet'>
<span
- onClick={this.handleClick}
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.props.post.message, formattingOptions)}}
/>
</div>
diff --git a/web/react/components/suggestion/command_provider.jsx b/web/react/components/suggestion/command_provider.jsx
index a2a446de2..91d556bb9 100644
--- a/web/react/components/suggestion/command_provider.jsx
+++ b/web/react/components/suggestion/command_provider.jsx
@@ -39,7 +39,6 @@ export default class CommandProvider {
handlePretextChanged(suggestionId, pretext) {
if (pretext.startsWith('/')) {
SuggestionStore.setMatchedPretext(suggestionId, pretext);
- SuggestionStore.setCompleteOnSpace(suggestionId, false);
AsyncClient.getSuggestedCommands(pretext, suggestionId, CommandSuggestion);
}
diff --git a/web/react/components/suggestion/suggestion_box.jsx b/web/react/components/suggestion/suggestion_box.jsx
index ad8ad1e9e..57a33c24a 100644
--- a/web/react/components/suggestion/suggestion_box.jsx
+++ b/web/react/components/suggestion/suggestion_box.jsx
@@ -94,7 +94,7 @@ export default class SuggestionBox extends React.Component {
} else if (e.which === KeyCodes.DOWN) {
EventHelpers.emitSelectNextSuggestion(this.suggestionId);
e.preventDefault();
- } else if (e.which === KeyCodes.ENTER || e.which === KeyCodes.TAB || (e.which === KeyCodes.SPACE && SuggestionStore.shouldCompleteOnSpace(this.suggestionId))) {
+ } else if (e.which === KeyCodes.ENTER || e.which === KeyCodes.TAB) {
EventHelpers.emitCompleteWordSuggestion(this.suggestionId);
e.preventDefault();
} else if (this.props.onKeyDown) {
diff --git a/web/react/components/team_signup_with_email.jsx b/web/react/components/team_signup_with_email.jsx
index 06d6e3934..4150a0013 100644
--- a/web/react/components/team_signup_with_email.jsx
+++ b/web/react/components/team_signup_with_email.jsx
@@ -14,18 +14,19 @@ export default class EmailSignUpPage extends React.Component {
}
handleSubmit(e) {
e.preventDefault();
- var team = {};
- var state = {serverError: ''};
+ const team = {};
+ const state = {serverError: null};
+ let isValid = true;
team.email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase();
if (!team.email || !Utils.isEmail(team.email)) {
state.emailError = 'Please enter a valid email address';
- state.inValid = true;
+ isValid = false;
} else {
- state.emailError = '';
+ state.emailError = null;
}
- if (state.inValid) {
+ if (!isValid) {
this.setState(state);
return;
}
@@ -45,11 +46,16 @@ export default class EmailSignUpPage extends React.Component {
);
}
render() {
- var serverError = null;
+ let serverError = null;
if (this.state.serverError) {
serverError = <div className='form-group has-error'><label className='control-label'>{this.state.serverError}</label></div>;
}
+ let emailError = null;
+ if (this.state.emailError) {
+ emailError = <div className='form-group has-error'><label className='control-label'>{this.state.emailError}</label></div>;
+ }
+
return (
<form
role='form'
@@ -65,6 +71,7 @@ export default class EmailSignUpPage extends React.Component {
maxLength='128'
spellCheck='false'
/>
+ {emailError}
</div>
<div className='form-group'>
<button
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 306c59e8b..bc1132765 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -8,6 +8,7 @@ import Constants from '../utils/constants.jsx';
const ActionTypes = Constants.ActionTypes;
import * as AsyncClient from '../utils/async_client.jsx';
import * as Client from '../utils/client.jsx';
+import * as Utils from '../utils/utils.jsx';
export function emitChannelClickEvent(channel) {
AsyncClient.getChannels(true);
@@ -38,6 +39,30 @@ export function emitPostFocusEvent(postId) {
);
}
+export function emitPostFocusRightHandSideEvent(post) {
+ Client.getPost(
+ post.channel_id,
+ post.id,
+ (data) => {
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECIEVED_POST_SELECTED,
+ post_list: data
+ });
+
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECIEVED_SEARCH,
+ results: null
+ });
+ },
+ (err) => {
+ AsyncClient.dispatchError(err, 'getPost');
+ }
+ );
+
+ var postChannel = ChannelStore.get(post.channel_id);
+ Utils.switchChannel(postChannel);
+}
+
export function emitLoadMorePostsEvent() {
const id = ChannelStore.getCurrentId();
loadMorePostsTop(id);
diff --git a/web/react/stores/suggestion_store.jsx b/web/react/stores/suggestion_store.jsx
index 2250ec234..9cd566c22 100644
--- a/web/react/stores/suggestion_store.jsx
+++ b/web/react/stores/suggestion_store.jsx
@@ -38,7 +38,6 @@ class SuggestionStore extends EventEmitter {
// items: a list of objects backing the terms which may be used in rendering
// components: a list of react components that can be used to render their corresponding item
// selection: the term currently selected by the keyboard
- // completeOnSpace: whether or not space will trigger the term to be autocompleted
this.suggestions = new Map();
}
@@ -79,8 +78,7 @@ class SuggestionStore extends EventEmitter {
terms: [],
items: [],
components: [],
- selection: '',
- completeOnSpace: true
+ selection: ''
});
}
@@ -95,7 +93,6 @@ class SuggestionStore extends EventEmitter {
suggestion.terms = [];
suggestion.items = [];
suggestion.components = [];
- suggestion.completeOnSpace = true;
}
clearSelection(id) {
@@ -120,12 +117,6 @@ class SuggestionStore extends EventEmitter {
suggestion.matchedPretext = matchedPretext;
}
- setCompleteOnSpace(id, completeOnSpace) {
- const suggestion = this.suggestions.get(id);
-
- suggestion.completeOnSpace = completeOnSpace;
- }
-
addSuggestion(id, term, item, component) {
const suggestion = this.suggestions.get(id);
@@ -189,10 +180,6 @@ class SuggestionStore extends EventEmitter {
return this.suggestions.get(id).selection;
}
- shouldCompleteOnSpace(id) {
- return this.suggestions.get(id).completeOnSpace;
- }
-
selectNext(id) {
this.setSelectionByDelta(id, 1);
}
diff --git a/web/sass-files/sass/partials/_search.scss b/web/sass-files/sass/partials/_search.scss
index a5b2a78dd..eceeb9a8c 100644
--- a/web/sass-files/sass/partials/_search.scss
+++ b/web/sass-files/sass/partials/_search.scss
@@ -121,6 +121,13 @@
}
+.search-item__comment {
+ position: absolute;
+ right: 0;
+ margin-right: 35px;
+ top: 0;
+}
+
.search-item-time {
color: #a8adb7;
}