UX: do not show error title

This commit is contained in:
Arpit Jalan 2015-07-29 21:22:28 +05:30
parent 201617811e
commit 794b9a5c24
3 changed files with 0 additions and 8 deletions

View File

@ -767,14 +767,12 @@ const PostStream = RestModel.extend({
// If the result was 404 the post is not found
if (status === 404) {
topic.set('errorTitle', I18n.t('topic.not_found.title'));
topic.set('notFoundHtml', result.jqXHR.responseText);
return;
}
// If the result is 403 it means invalid access
if (status === 403) {
topic.set('errorTitle', I18n.t('topic.invalid_access.title'));
topic.set('noRetry', true);
if (Discourse.User.current()) {
topic.set('message', I18n.t('topic.invalid_access.description'));
@ -785,7 +783,6 @@ const PostStream = RestModel.extend({
}
// Otherwise supply a generic error message
topic.set('errorTitle', I18n.t('topic.server_error.title'));
topic.set('message', I18n.t('topic.server_error.description'));
}

View File

@ -2,7 +2,6 @@ import RestModel from 'discourse/models/rest';
const Topic = RestModel.extend({
message: null,
errorTitle: null,
errorLoading: false,
fancyTitle: function() {

View File

@ -9,10 +9,6 @@
{{#if topic.details.loaded}}
{{topic-status topic=topic}}
<a class='topic-link' href='{{unbound topic.url}}' {{action "jumpToTopPost"}}>{{{topic.fancyTitle}}}</a>
{{else}}
{{#if topic.errorLoading}}
<span class="error">{{topic.errorTitle}}</span>
{{/if}}
{{/if}}
</h1>
{{#if topic.details.loaded}}