From 7887aaf58704db40d02704acd6b6509bdc6b10f2 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 11 Sep 2020 15:05:50 -0400 Subject: [PATCH] FIX: `isVisible` is no longer allowed even if used properly This changes it to `shouldShow` instead. --- .../discourse/app/components/private-message-glyph.js | 1 + .../app/templates/components/private-message-glyph.hbs | 2 +- app/assets/javascripts/discourse/app/templates/topic.hbs | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/private-message-glyph.js b/app/assets/javascripts/discourse/app/components/private-message-glyph.js index 0cb19242153..d1d40424515 100644 --- a/app/assets/javascripts/discourse/app/components/private-message-glyph.js +++ b/app/assets/javascripts/discourse/app/components/private-message-glyph.js @@ -5,4 +5,5 @@ export default Component.extend({ href: null, title: null, ariaLabel: null, + shouldShow: null, }); diff --git a/app/assets/javascripts/discourse/app/templates/components/private-message-glyph.hbs b/app/assets/javascripts/discourse/app/templates/components/private-message-glyph.hbs index 833900625cf..8ccce6f788c 100644 --- a/app/assets/javascripts/discourse/app/templates/components/private-message-glyph.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/private-message-glyph.hbs @@ -1,4 +1,4 @@ -{{#if isVisible}} +{{#if shouldShow}} {{#if href}} diff --git a/app/assets/javascripts/discourse/app/templates/topic.hbs b/app/assets/javascripts/discourse/app/templates/topic.hbs index f2cddfa09c1..f0715b2d3f3 100644 --- a/app/assets/javascripts/discourse/app/templates/topic.hbs +++ b/app/assets/javascripts/discourse/app/templates/topic.hbs @@ -17,7 +17,7 @@ {{#topic-title cancelled=(action "cancelEditingTopic") save=(action "finishedEditingTopic") model=model}} {{#if editingTopic}}
- {{private-message-glyph isVisible=model.isPrivateMessage}} + {{private-message-glyph shouldShow=model.isPrivateMessage}} {{text-field id="edit-title" value=buffered.title maxlength=siteSettings.max_topic_title_length autofocus="true"}} @@ -61,13 +61,13 @@ {{#unless model.is_warning}} {{#if siteSettings.enable_personal_messages}} {{private-message-glyph - isVisible=model.isPrivateMessage + shouldShow=model.isPrivateMessage href=pmPath title="topic_statuses.personal_message.title" ariaLabel="user.messages.inbox" }} {{else}} - {{private-message-glyph isVisible=model.isPrivateMessage}} + {{private-message-glyph shouldShow=model.isPrivateMessage}} {{/if}} {{/unless}}