From 8c2d6118ff384ffe003b08ec3029e8099fafbaa0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 14 Sep 2017 11:20:19 -0400 Subject: [PATCH] Remove some of the last few `fa-icon` helpers --- app/assets/javascripts/discourse/widgets/embedded-post.js.es6 | 4 ++-- .../javascripts/discourse/widgets/private-message-map.js.es6 | 4 ++-- lib/javascripts/widget-hbs-compiler.js.es6 | 1 + test/javascripts/widgets/widget-test.js.es6 | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 b/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 index f3476faec4a..d788294e218 100644 --- a/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 +++ b/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 @@ -9,11 +9,11 @@ createWidget('post-link-arrow', { template: hbs` {{#if attrs.above}} - {{fa-icon "arrow-up"}} + {{d-icon "arrow-up"}} {{else}} - {{fa-icon "arrow-down"}} + {{d-icon "arrow-down"}} {{/if}} `, diff --git a/app/assets/javascripts/discourse/widgets/private-message-map.js.es6 b/app/assets/javascripts/discourse/widgets/private-message-map.js.es6 index 2aa4ba4ef0a..fc8b505c28f 100644 --- a/app/assets/javascripts/discourse/widgets/private-message-map.js.es6 +++ b/app/assets/javascripts/discourse/widgets/private-message-map.js.es6 @@ -6,7 +6,7 @@ import hbs from 'discourse/widgets/hbs-compiler'; createWidget('pm-remove-group-link', { tagName: 'a.remove-invited', - template: hbs`{{fa-icon "times"}}`, + template: hbs`{{d-icon "times"}}`, click() { bootbox.confirm(I18n.t("private_message_info.remove_allowed_group", {name: this.attrs.name}), (confirmed) => { @@ -33,7 +33,7 @@ createWidget('pm-map-user-group', { createWidget('pm-remove-link', { tagName: 'a.remove-invited', - template: hbs`{{fa-icon "times"}}`, + template: hbs`{{d-icon "times"}}`, click() { bootbox.confirm(I18n.t("private_message_info.remove_allowed_user", {name: this.attrs.username}), (confirmed) => { diff --git a/lib/javascripts/widget-hbs-compiler.js.es6 b/lib/javascripts/widget-hbs-compiler.js.es6 index 24f02eecce1..1603a5e5854 100644 --- a/lib/javascripts/widget-hbs-compiler.js.es6 +++ b/lib/javascripts/widget-hbs-compiler.js.es6 @@ -27,6 +27,7 @@ function mustacheValue(node, state) { break; case 'fa-icon': + case 'd-icon': state.helpersUsed.iconNode = true; let icon = node.params[0].value; return `__iN("${icon}")`; diff --git a/test/javascripts/widgets/widget-test.js.es6 b/test/javascripts/widgets/widget-test.js.es6 index 97ef29b40e9..6305d6ab785 100644 --- a/test/javascripts/widgets/widget-test.js.es6 +++ b/test/javascripts/widgets/widget-test.js.es6 @@ -198,12 +198,12 @@ widgetTest('widget attaching', { } }); -widgetTest("handlebars fa-icon", { +widgetTest("handlebars d-icon", { template: `{{mount-widget widget="hbs-icon-test" args=args}}`, beforeEach() { createWidget('hbs-icon-test', { - template: hbs`{{fa-icon "arrow-down"}}` + template: hbs`{{d-icon "arrow-down"}}` }); },