From 794b9a5c24ac1e360e1b18b953db2f146771370f Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 29 Jul 2015 21:22:28 +0530 Subject: [PATCH] UX: do not show error title --- app/assets/javascripts/discourse/models/post-stream.js.es6 | 3 --- app/assets/javascripts/discourse/models/topic.js.es6 | 1 - .../discourse/templates/components/header-extra-info.hbs | 4 ---- 3 files changed, 8 deletions(-) diff --git a/app/assets/javascripts/discourse/models/post-stream.js.es6 b/app/assets/javascripts/discourse/models/post-stream.js.es6 index 8052ee4048d..5a45ddcc592 100644 --- a/app/assets/javascripts/discourse/models/post-stream.js.es6 +++ b/app/assets/javascripts/discourse/models/post-stream.js.es6 @@ -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')); } diff --git a/app/assets/javascripts/discourse/models/topic.js.es6 b/app/assets/javascripts/discourse/models/topic.js.es6 index 5d69700184c..0f06dc48471 100644 --- a/app/assets/javascripts/discourse/models/topic.js.es6 +++ b/app/assets/javascripts/discourse/models/topic.js.es6 @@ -2,7 +2,6 @@ import RestModel from 'discourse/models/rest'; const Topic = RestModel.extend({ message: null, - errorTitle: null, errorLoading: false, fancyTitle: function() { diff --git a/app/assets/javascripts/discourse/templates/components/header-extra-info.hbs b/app/assets/javascripts/discourse/templates/components/header-extra-info.hbs index 2f6b95c498c..614e48e38b5 100644 --- a/app/assets/javascripts/discourse/templates/components/header-extra-info.hbs +++ b/app/assets/javascripts/discourse/templates/components/header-extra-info.hbs @@ -9,10 +9,6 @@ {{#if topic.details.loaded}} {{topic-status topic=topic}} {{{topic.fancyTitle}}} - {{else}} - {{#if topic.errorLoading}} - {{topic.errorTitle}} - {{/if}} {{/if}} {{#if topic.details.loaded}}