From d0c41a578e2a0df2cc95e2b06bcd7827270a3fca Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 26 Jul 2017 16:25:09 -0400 Subject: [PATCH] Rename `{{fa-icon}}` to `{{d-icon}}` so it can be more generic --- .../components/admin-watched-word.js.es6 | 2 +- .../admin/templates/badges-index.hbs | 2 +- .../admin/templates/badges-show.hbs | 2 +- .../javascripts/admin/templates/badges.hbs | 2 +- .../components/admin-report-counts.hbs | 8 +++---- .../components/setting-validation-message.hbs | 2 +- .../components/watched-word-uploader.hbs | 2 +- .../admin/templates/customize-colors.hbs | 4 ++-- .../admin/templates/customize-themes-edit.hbs | 6 ++--- .../admin/templates/customize-themes-show.hbs | 8 +++---- .../admin/templates/customize-themes.hbs | 4 ++-- .../javascripts/admin/templates/dashboard.hbs | 12 +++++----- .../admin/templates/email-sent.hbs | 2 +- .../javascripts/admin/templates/emojis.hbs | 2 +- .../admin/templates/flags-list.hbs | 2 +- .../javascripts/admin/templates/group.hbs | 2 +- .../admin/templates/groups-type-index.hbs | 2 +- .../admin/templates/groups-type.hbs | 2 +- .../admin/templates/logs/screened-emails.hbs | 2 +- .../templates/logs/screened-ip-addresses.hbs | 4 ++-- .../admin/templates/logs/screened-urls.hbs | 2 +- .../templates/logs/staff-action-logs.hbs | 8 +++---- .../modal/admin-color-scheme-select-base.hbs | 2 +- .../modal/admin-edit-badge-groupings.hbs | 10 ++++----- .../admin/templates/site-text-edit.hbs | 2 +- .../admin/templates/user-index.hbs | 6 ++--- .../admin/templates/users-list-show.hbs | 4 ++-- .../admin/templates/version-checks.hbs | 12 +++++----- .../admin/templates/web-hooks-show-events.hbs | 4 ++-- .../admin/templates/web-hooks-show.hbs | 6 ++--- .../javascripts/admin/templates/web-hooks.hbs | 4 ++-- .../discourse-common/helpers/d-icon.js.es6 | 6 +++++ .../discourse-common/helpers/fa-icon.js.es6 | 2 ++ .../discourse-common/lib/icon-library.js.es6 | 2 +- .../javascripts/discourse/templates/about.hbs | 8 +++---- .../category-tag-autocomplete.raw.hbs | 2 +- .../components/auto-update-input.hbs | 6 ++--- .../templates/components/avatar-uploader.hbs | 2 +- .../templates/components/badge-card.hbs | 2 +- .../categories-boxes-with-topics.hbs | 2 +- .../templates/components/categories-boxes.hbs | 2 +- .../templates/components/category-drop.hbs | 2 +- .../components/category-title-link.hbs | 2 +- .../templates/components/composer-editor.hbs | 2 +- .../templates/components/csv-uploader.hbs | 2 +- .../templates/components/d-button.hbs | 2 +- .../templates/components/disabled-icon.hbs | 4 ++-- .../components/edit-category-security.hbs | 2 +- .../components/edit-category-settings.hbs | 2 +- .../templates/components/emoji-uploader.hbs | 2 +- .../templates/components/expand-post.hbs | 2 +- .../templates/components/flat-button.hbs | 2 +- .../components/group-logs-filter.hbs | 2 +- .../templates/components/group-logs-row.hbs | 4 ++-- .../templates/components/group-member.hbs | 2 +- .../components/group-members-input.hbs | 4 ++-- .../templates/components/image-uploader.hbs | 4 ++-- .../templates/components/ip-lookup.hbs | 6 ++--- .../templates/components/period-chooser.hbs | 2 +- .../templates/components/share-popup.hbs | 6 ++--- .../templates/components/small-action.hbs | 4 ++-- .../templates/components/stream-item.hbs | 4 ++-- .../templates/components/topic-entrance.hbs | 4 ++-- .../components/topic-footer-buttons.hbs | 2 +- .../components/user-card-contents.hbs | 14 ++++++------ .../templates/components/user-stat.hbs | 2 +- .../discourse/templates/composer.hbs | 2 +- .../templates/composer/custom-body.hbs | 2 +- .../templates/composer/education.hbs | 2 +- .../templates/composer/group-mentioned.hbs | 2 +- .../templates/composer/similar-topics.hbs | 2 +- .../templates/emoji-picker.raw.hbs.erb | 8 +++---- .../discourse/templates/flat-button.raw.hbs | 2 +- .../discourse/templates/full-page-search.hbs | 2 +- .../javascripts/discourse/templates/group.hbs | 2 +- .../javascripts/discourse/templates/modal.hbs | 2 +- .../templates/modal/feature-topic.hbs | 4 ++-- .../discourse/templates/modal/history.hbs | 2 +- .../discourse/templates/modal/merge-topic.hbs | 2 +- .../discourse/templates/modal/split-topic.hbs | 2 +- .../templates/preferences/account.hbs | 6 ++--- .../templates/preferences/profile.hbs | 2 +- .../discourse/templates/tags/show.hbs | 2 +- .../javascripts/discourse/templates/topic.hbs | 8 +++---- .../discourse/templates/user-invited-show.hbs | 2 +- .../javascripts/discourse/templates/user.hbs | 22 +++++++++---------- .../discourse/templates/user/summary.hbs | 10 ++++----- .../templates/components/invite-list-user.hbs | 2 +- .../templates/components/invite-list.hbs | 2 +- .../templates/components/radio-button.hbs | 2 +- .../components/wizard-field-image.hbs | 2 +- .../templates/components/wizard-step.hbs | 2 +- 92 files changed, 178 insertions(+), 170 deletions(-) create mode 100644 app/assets/javascripts/discourse-common/helpers/d-icon.js.es6 diff --git a/app/assets/javascripts/admin/components/admin-watched-word.js.es6 b/app/assets/javascripts/admin/components/admin-watched-word.js.es6 index eda556e38e2..3c78becb493 100644 --- a/app/assets/javascripts/admin/components/admin-watched-word.js.es6 +++ b/app/assets/javascripts/admin/components/admin-watched-word.js.es6 @@ -1,4 +1,4 @@ -import { iconHTML } from 'discourse-common/helpers/fa-icon'; +import { iconHTML } from 'discourse-common/lib/icon-library'; import { bufferedRender } from 'discourse-common/lib/buffered-render'; export default Ember.Component.extend(bufferedRender({ diff --git a/app/assets/javascripts/admin/templates/badges-index.hbs b/app/assets/javascripts/admin/templates/badges-index.hbs index c94f59fe105..674eae8de29 100644 --- a/app/assets/javascripts/admin/templates/badges-index.hbs +++ b/app/assets/javascripts/admin/templates/badges-index.hbs @@ -3,7 +3,7 @@
{{#link-to 'adminBadges.show' 'new' class="btn"}} - {{fa-icon "plus"}} {{i18n 'admin.badges.new'}} + {{d-icon "plus"}} {{i18n 'admin.badges.new'}} {{/link-to}}
{{/d-section}} diff --git a/app/assets/javascripts/admin/templates/badges-show.hbs b/app/assets/javascripts/admin/templates/badges-show.hbs index e0ae7001df0..e40e6bfec08 100644 --- a/app/assets/javascripts/admin/templates/badges-show.hbs +++ b/app/assets/javascripts/admin/templates/badges-show.hbs @@ -38,7 +38,7 @@ content=badgeGroupings optionValuePath="content.id" optionLabelPath="content.displayName"}} -   +   diff --git a/app/assets/javascripts/admin/templates/badges.hbs b/app/assets/javascripts/admin/templates/badges.hbs index 3ca7f912940..aeeaac9c9e2 100644 --- a/app/assets/javascripts/admin/templates/badges.hbs +++ b/app/assets/javascripts/admin/templates/badges.hbs @@ -15,7 +15,7 @@ {{/each}} {{#link-to 'adminBadges.show' 'new' class="btn"}} - {{fa-icon "plus"}} {{i18n 'admin.badges.new'}} + {{d-icon "plus"}} {{i18n 'admin.badges.new'}} {{/link-to}}

diff --git a/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs b/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs index 304570c0a52..82fbf0d7996 100644 --- a/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs +++ b/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs @@ -1,6 +1,6 @@ {{#if report.icon}} - {{fa-icon report.icon}} + {{d-icon report.icon}} {{/if}} {{report.title}} @@ -8,15 +8,15 @@ {{number report.todayCount}} - {{number report.yesterdayCount}} {{fa-icon "caret-up" class="up"}} {{fa-icon "caret-down" class="down"}} + {{number report.yesterdayCount}} {{d-icon "caret-up" class="up"}} {{d-icon "caret-down" class="down"}} - {{number report.lastSevenDaysCount}} {{fa-icon "caret-up" class="up"}} {{fa-icon "caret-down" class="down"}} + {{number report.lastSevenDaysCount}} {{d-icon "caret-up" class="up"}} {{d-icon "caret-down" class="down"}} - {{number report.lastThirtyDaysCount}} {{fa-icon "caret-up" class="up"}} {{fa-icon "caret-down" class="down"}} + {{number report.lastThirtyDaysCount}} {{d-icon "caret-up" class="up"}} {{d-icon "caret-down" class="down"}} {{number report.total}} diff --git a/app/assets/javascripts/admin/templates/components/setting-validation-message.hbs b/app/assets/javascripts/admin/templates/components/setting-validation-message.hbs index 92451dbbf92..88d59816fe3 100644 --- a/app/assets/javascripts/admin/templates/components/setting-validation-message.hbs +++ b/app/assets/javascripts/admin/templates/components/setting-validation-message.hbs @@ -1,4 +1,4 @@
- {{fa-icon "times"}} + {{d-icon "times"}} {{message}}
diff --git a/app/assets/javascripts/admin/templates/components/watched-word-uploader.hbs b/app/assets/javascripts/admin/templates/components/watched-word-uploader.hbs index 2582bdcbb0a..caa74a86152 100644 --- a/app/assets/javascripts/admin/templates/components/watched-word-uploader.hbs +++ b/app/assets/javascripts/admin/templates/components/watched-word-uploader.hbs @@ -1,5 +1,5 @@ diff --git a/app/assets/javascripts/admin/templates/customize-colors.hbs b/app/assets/javascripts/admin/templates/customize-colors.hbs index 1ed39b8fcf2..920f6f19540 100644 --- a/app/assets/javascripts/admin/templates/customize-colors.hbs +++ b/app/assets/javascripts/admin/templates/customize-colors.hbs @@ -4,12 +4,12 @@ {{#each model as |scheme|}} {{#unless scheme.is_base}}
  • - {{#link-to 'adminCustomize.colors.show' scheme replace=true}}{{fa-icon 'paint-brush'}}{{scheme.description}}{{/link-to}} + {{#link-to 'adminCustomize.colors.show' scheme replace=true}}{{d-icon 'paint-brush'}}{{scheme.description}}{{/link-to}}
  • {{/unless}} {{/each}} - + {{outlet}} diff --git a/app/assets/javascripts/admin/templates/customize-themes-edit.hbs b/app/assets/javascripts/admin/templates/customize-themes-edit.hbs index fafce666a6f..ba65a6d33fd 100644 --- a/app/assets/javascripts/admin/templates/customize-themes-edit.hbs +++ b/app/assets/javascripts/admin/templates/customize-themes-edit.hbs @@ -19,7 +19,7 @@
  • {{#link-to 'adminCustomizeThemes.edit' model.id 'desktop' fieldName replace=true title=field.title}} {{i18n 'admin.customize.theme.desktop'}} - {{fa-icon 'desktop'}} + {{d-icon 'desktop'}} {{/link-to}}
  • {{/if}} @@ -27,7 +27,7 @@
  • {{#link-to 'adminCustomizeThemes.edit' model.id 'mobile' fieldName replace=true title=field.title}} {{i18n 'admin.customize.theme.mobile'}} - {{fa-icon 'mobile'}} + {{d-icon 'mobile'}} {{/link-to}}
  • {{/if}} @@ -46,7 +46,7 @@ {{#each fields as |field|}}
  • {{#link-to 'adminCustomizeThemes.edit' model.id currentTargetName field.name replace=true title=field.title}} - {{#if field.icon}}{{fa-icon field.icon}} {{/if}} + {{#if field.icon}}{{d-icon field.icon}} {{/if}} {{i18n field.key}} {{/link-to}}
  • diff --git a/app/assets/javascripts/admin/templates/customize-themes-show.hbs b/app/assets/javascripts/admin/templates/customize-themes-show.hbs index 6e89af47678..638d7f24d42 100644 --- a/app/assets/javascripts/admin/templates/customize-themes-show.hbs +++ b/app/assets/javascripts/admin/templates/customize-themes-show.hbs @@ -5,7 +5,7 @@ {{d-button action="finishedEditingName" class="btn-primary btn-small submit-edit" icon="check"}} {{d-button action="cancelEditingName" class="btn-small cancel-edit" icon="times"}} {{else}} - {{model.name}} {{fa-icon "pencil"}} + {{model.name}} {{d-icon "pencil"}} {{/if}} @@ -15,7 +15,7 @@

    {{#if model.remote_theme.license_url}}

    - {{i18n "admin.customize.theme.license"}} {{fa-icon "copyright"}} + {{i18n "admin.customize.theme.license"}} {{d-icon "copyright"}}

    {{/if}} {{/if}} @@ -133,8 +133,8 @@ {{/if}} {{/if}} - {{fa-icon 'desktop'}}{{i18n 'admin.customize.theme.preview'}} - {{fa-icon "download"}} {{i18n 'admin.export_json.button_text'}} + {{d-icon 'desktop'}}{{i18n 'admin.customize.theme.preview'}} + {{d-icon "download"}} {{i18n 'admin.export_json.button_text'}} {{d-button action="destroy" label="admin.customize.delete" icon="trash" class="btn-danger"}} diff --git a/app/assets/javascripts/admin/templates/customize-themes.hbs b/app/assets/javascripts/admin/templates/customize-themes.hbs index 43129006a51..c9474917ef6 100644 --- a/app/assets/javascripts/admin/templates/customize-themes.hbs +++ b/app/assets/javascripts/admin/templates/customize-themes.hbs @@ -7,10 +7,10 @@ {{#link-to 'adminCustomizeThemes.show' theme replace=true}} {{theme.name}} {{#if theme.user_selectable}} - {{fa-icon "user"}} + {{d-icon "user"}} {{/if}} {{#if theme.default}} - {{fa-icon "asterisk"}} + {{d-icon "asterisk"}} {{/if}} {{/link-to}} diff --git a/app/assets/javascripts/admin/templates/dashboard.hbs b/app/assets/javascripts/admin/templates/dashboard.hbs index c6c44870094..b8c0297d48d 100644 --- a/app/assets/javascripts/admin/templates/dashboard.hbs +++ b/app/assets/javascripts/admin/templates/dashboard.hbs @@ -29,15 +29,15 @@
    - + - + - + - +
    {{fa-icon "shield"}} {{i18n 'admin.dashboard.admins'}}{{d-icon "shield"}} {{i18n 'admin.dashboard.admins'}} {{#link-to 'adminUsersList.show' 'admins'}}{{admins}}{{/link-to}}{{fa-icon "ban"}} {{i18n 'admin.dashboard.suspended'}}{{d-icon "ban"}} {{i18n 'admin.dashboard.suspended'}} {{#link-to 'adminUsersList.show' 'suspended'}}{{suspended}}{{/link-to}}
    {{fa-icon "shield"}} {{i18n 'admin.dashboard.moderators'}}{{d-icon "shield"}} {{i18n 'admin.dashboard.moderators'}} {{#link-to 'adminUsersList.show' 'moderators'}}{{moderators}}{{/link-to}}{{fa-icon "ban"}} {{i18n 'admin.dashboard.blocked'}}{{d-icon "ban"}} {{i18n 'admin.dashboard.blocked'}} {{#link-to 'adminUsersList.show' 'blocked'}}{{blocked}}{{/link-to}}
    @@ -87,7 +87,7 @@ - + @@ -176,7 +176,7 @@
    {{#if foundProblems}}
    -
    {{fa-icon "exclamation-triangle"}}
    +
    {{d-icon "exclamation-triangle"}}
    {{#conditional-loading-spinner condition=loadingProblems}}

    diff --git a/app/assets/javascripts/admin/templates/email-sent.hbs b/app/assets/javascripts/admin/templates/email-sent.hbs index 847076f098a..9dd7996ff54 100644 --- a/app/assets/javascripts/admin/templates/email-sent.hbs +++ b/app/assets/javascripts/admin/templates/email-sent.hbs @@ -30,7 +30,7 @@ {{/if}}

    diff --git a/app/assets/javascripts/admin/templates/emojis.hbs b/app/assets/javascripts/admin/templates/emojis.hbs index 6f35c097a96..675e8249be0 100644 --- a/app/assets/javascripts/admin/templates/emojis.hbs +++ b/app/assets/javascripts/admin/templates/emojis.hbs @@ -20,7 +20,7 @@ - + {{/each}} diff --git a/app/assets/javascripts/admin/templates/flags-list.hbs b/app/assets/javascripts/admin/templates/flags-list.hbs index 8796f31ff3c..796552d4d2f 100644 --- a/app/assets/javascripts/admin/templates/flags-list.hbs +++ b/app/assets/javascripts/admin/templates/flags-list.hbs @@ -31,7 +31,7 @@

    {{#if flaggedPost.topic.isPrivateMessage}} - {{fa-icon "envelope"}} + {{d-icon "envelope"}} {{/if}} {{topic-status topic=flaggedPost.topic}} {{{unbound flaggedPost.topic.fancyTitle}}} diff --git a/app/assets/javascripts/admin/templates/group.hbs b/app/assets/javascripts/admin/templates/group.hbs index acf6b9e6d07..7ff651e7c9d 100644 --- a/app/assets/javascripts/admin/templates/group.hbs +++ b/app/assets/javascripts/admin/templates/group.hbs @@ -133,7 +133,7 @@
    {{#unless model.automatic}} - + {{/unless}} {{savingStatus}} diff --git a/app/assets/javascripts/admin/templates/groups-type-index.hbs b/app/assets/javascripts/admin/templates/groups-type-index.hbs index 88d870c1f6e..196ded96d2e 100644 --- a/app/assets/javascripts/admin/templates/groups-type-index.hbs +++ b/app/assets/javascripts/admin/templates/groups-type-index.hbs @@ -3,7 +3,7 @@
    {{#link-to 'adminGroup' 'new' class="btn"}} - {{fa-icon "plus"}} {{i18n 'admin.groups.new'}} + {{d-icon "plus"}} {{i18n 'admin.groups.new'}} {{/link-to}}
    diff --git a/app/assets/javascripts/admin/templates/groups-type.hbs b/app/assets/javascripts/admin/templates/groups-type.hbs index b4d2a0acf35..a1fa8298970 100644 --- a/app/assets/javascripts/admin/templates/groups-type.hbs +++ b/app/assets/javascripts/admin/templates/groups-type.hbs @@ -18,7 +18,7 @@ {{d-button action="refreshAutoGroups" icon="refresh" label="admin.groups.refresh" disabled=refreshingAutoGroups}} {{else}} {{#link-to 'adminGroup' 'new' class="btn"}} - {{fa-icon "plus"}} {{i18n 'admin.groups.new'}} + {{d-icon "plus"}} {{i18n 'admin.groups.new'}} {{/link-to}} {{/if}}

    diff --git a/app/assets/javascripts/admin/templates/logs/screened-emails.hbs b/app/assets/javascripts/admin/templates/logs/screened-emails.hbs index 685d8455c39..f99ff865e15 100644 --- a/app/assets/javascripts/admin/templates/logs/screened-emails.hbs +++ b/app/assets/javascripts/admin/templates/logs/screened-emails.hbs @@ -1,6 +1,6 @@

    {{i18n 'admin.logs.screened_emails.description'}} - +


    diff --git a/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs b/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs index ca6c216f502..00e67a9aa5c 100644 --- a/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs +++ b/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs @@ -41,9 +41,9 @@
    {{#if item.isBlocked}} - {{fa-icon "ban"}} + {{d-icon "ban"}} {{else}} - {{fa-icon "check"}} + {{d-icon "check"}} {{/if}} {{item.actionName}}
    diff --git a/app/assets/javascripts/admin/templates/logs/screened-urls.hbs b/app/assets/javascripts/admin/templates/logs/screened-urls.hbs index 40aaceba70d..7b1048f1b44 100644 --- a/app/assets/javascripts/admin/templates/logs/screened-urls.hbs +++ b/app/assets/javascripts/admin/templates/logs/screened-urls.hbs @@ -1,6 +1,6 @@

    {{i18n 'admin.logs.screened_urls.description'}} - +


    diff --git a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs index f469ec266e8..50f02f9f5b1 100644 --- a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs +++ b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs @@ -7,25 +7,25 @@ {{#if actionFilter}} {{i18n 'admin.logs.action'}}: {{actionFilter}} - {{fa-icon "times-circle"}} + {{d-icon "times-circle"}} {{/if}} {{#if filters.acting_user}} {{i18n 'admin.logs.staff_actions.staff_user'}}: {{filters.acting_user}} - {{fa-icon "times-circle"}} + {{d-icon "times-circle"}} {{/if}} {{#if filters.target_user}} {{i18n 'admin.logs.staff_actions.target_user'}}: {{filters.target_user}} - {{fa-icon "times-circle"}} + {{d-icon "times-circle"}} {{/if}} {{#if filters.subject}} {{i18n 'admin.logs.staff_actions.subject'}}: {{filters.subject}} - {{fa-icon "times-circle"}} + {{d-icon "times-circle"}} {{/if}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs b/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs index 5286bbf0b07..d58a63c1342 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs @@ -7,6 +7,6 @@ valueAttribute="base_scheme_id"}} {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs b/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs index 80eb0844b30..f37c1f414d1 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs @@ -5,15 +5,15 @@
  • {{#if wc.editing}} {{input value=wc.name}} - + {{else}} {{wc.displayName}} {{/if}}
    - - - - + + + +
  • {{/each}} diff --git a/app/assets/javascripts/admin/templates/site-text-edit.hbs b/app/assets/javascripts/admin/templates/site-text-edit.hbs index 5e02eb07316..4e134433d84 100644 --- a/app/assets/javascripts/admin/templates/site-text-edit.hbs +++ b/app/assets/javascripts/admin/templates/site-text-edit.hbs @@ -13,7 +13,7 @@ {{/save-controls}} {{#link-to 'adminSiteText.index' class="go-back"}} - {{fa-icon 'arrow-left'}} + {{d-icon 'arrow-left'}} {{i18n 'admin.site_text.go_back'}} {{/link-to}} diff --git a/app/assets/javascripts/admin/templates/user-index.hbs b/app/assets/javascripts/admin/templates/user-index.hbs index f6a7a2d75e1..eecc669e6cc 100644 --- a/app/assets/javascripts/admin/templates/user-index.hbs +++ b/app/assets/javascripts/admin/templates/user-index.hbs @@ -3,7 +3,7 @@
    {{#if model.canViewProfile}} {{#link-to 'user' model class="btn"}} - {{fa-icon "user"}} + {{d-icon "user"}} {{i18n 'admin.user.show_public_profile'}} {{/link-to}} {{/if}} @@ -151,7 +151,7 @@ {{i18n 'badges.badge_count' count=model.badge_count}}
    - {{#link-to 'adminUser.badges' model class="btn"}}{{fa-icon "certificate"}}{{i18n 'admin.badges.edit_badges'}}{{/link-to}} + {{#link-to 'adminUser.badges' model class="btn"}}{{d-icon "certificate"}}{{i18n 'admin.badges.edit_badges'}}{{/link-to}}
    {{/if}} @@ -487,7 +487,7 @@

    - {{fa-icon "exclamation-triangle"}} {{model.deleteExplanation}} + {{d-icon "exclamation-triangle"}} {{model.deleteExplanation}}
    {{/if}} diff --git a/app/assets/javascripts/admin/templates/users-list-show.hbs b/app/assets/javascripts/admin/templates/users-list-show.hbs index cc0c5ce09ef..9bb578af7de 100644 --- a/app/assets/javascripts/admin/templates/users-list-show.hbs +++ b/app/assets/javascripts/admin/templates/users-list-show.hbs @@ -92,10 +92,10 @@ {{/if}} diff --git a/app/assets/javascripts/admin/templates/version-checks.hbs b/app/assets/javascripts/admin/templates/version-checks.hbs index 25c560ad6ae..4f392650267 100644 --- a/app/assets/javascripts/admin/templates/version-checks.hbs +++ b/app/assets/javascripts/admin/templates/version-checks.hbs @@ -18,7 +18,7 @@ {{#if versionCheck.noCheckPerformed}} diff --git a/app/assets/javascripts/discourse-common/helpers/d-icon.js.es6 b/app/assets/javascripts/discourse-common/helpers/d-icon.js.es6 new file mode 100644 index 00000000000..b85b9ebf269 --- /dev/null +++ b/app/assets/javascripts/discourse-common/helpers/d-icon.js.es6 @@ -0,0 +1,6 @@ +import { registerUnbound } from 'discourse-common/lib/helpers'; +import { renderIcon } from 'discourse-common/lib/icon-library'; + +registerUnbound('d-icon', function(id, params) { + return new Handlebars.SafeString(renderIcon('string', id, params)); +}); diff --git a/app/assets/javascripts/discourse-common/helpers/fa-icon.js.es6 b/app/assets/javascripts/discourse-common/helpers/fa-icon.js.es6 index b8dc58f23a3..bd736c84821 100644 --- a/app/assets/javascripts/discourse-common/helpers/fa-icon.js.es6 +++ b/app/assets/javascripts/discourse-common/helpers/fa-icon.js.es6 @@ -1,10 +1,12 @@ import { registerUnbound } from 'discourse-common/lib/helpers'; import { renderIcon } from 'discourse-common/lib/icon-library'; +import deprecated from 'discourse-common/lib/deprecated'; export function iconHTML(id, params) { return renderIcon('string', id, params); } registerUnbound('fa-icon', function(icon, params) { + deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}"); return new Handlebars.SafeString(iconHTML(icon, params)); }); diff --git a/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 b/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 index 04d4629d16d..eac3ea194b5 100644 --- a/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 +++ b/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 @@ -29,7 +29,7 @@ export function registerIconRenderer(renderer) { // Support for font awesome icons function faClasses(id, params) { - let classNames = `fa fa-${id}`; + let classNames = `fa fa-${id} d-icon d-icon-${id}`; if (params) { if (params.modifier) { classNames += " fa-" + params.modifier; } if (params['class']) { classNames += ' ' + params['class']; } diff --git a/app/assets/javascripts/discourse/templates/about.hbs b/app/assets/javascripts/discourse/templates/about.hbs index b5191b5696a..aa5027486f6 100644 --- a/app/assets/javascripts/discourse/templates/about.hbs +++ b/app/assets/javascripts/discourse/templates/about.hbs @@ -21,7 +21,7 @@ {{#if model.admins}}
    -

    {{fa-icon "users"}} {{i18n 'about.our_admins'}}

    +

    {{d-icon "users"}} {{i18n 'about.our_admins'}}

    {{#each model.admins as |a|}} {{user-info user=a}} @@ -33,7 +33,7 @@ {{#if model.moderators}}
    -

    {{fa-icon "users"}} {{i18n 'about.our_moderators'}}

    +

    {{d-icon "users"}} {{i18n 'about.our_moderators'}}

    {{#each model.moderators as |m|}} @@ -45,7 +45,7 @@ {{/if}}
    -

    {{fa-icon "bar-chart"}} {{i18n 'about.stats'}}

    +

    {{d-icon "bar-chart"}} {{i18n 'about.stats'}}

    {{fa-icon "envelope"}} {{i18n 'admin.dashboard.private_messages_short'}}{{d-icon "envelope"}} {{i18n 'admin.dashboard.private_messages_short'}} {{i18n 'admin.dashboard.reports.today'}} {{i18n 'admin.dashboard.reports.yesterday'}} {{i18n 'admin.dashboard.reports.last_7_days'}} - {{#if l.bounced}}{{fa-icon "repeat" title="admin.email.bounced"}}{{/if}} + {{#if l.bounced}}{{d-icon "repeat" title="admin.email.bounced"}}{{/if}} {{l.to_address}} {{l.email_type}}
    :{{e.name}}:
    {{#if user.admin}} - {{fa-icon "shield" title="admin.title" }} + {{d-icon "shield" title="admin.title" }} {{/if}} {{#if user.moderator}} - {{fa-icon "shield" title="admin.moderator" }} + {{d-icon "shield" title="admin.moderator" }} {{/if}}
    - {{fa-icon "frown-o"}} + {{d-icon "frown-o"}} {{i18n 'admin.dashboard.no_check_performed'}} @@ -28,9 +28,9 @@ {{#if versionCheck.version_check_pending}}{{dash-if-empty versionCheck.installed_version}}{{/if}} {{#if versionCheck.version_check_pending}} - {{fa-icon "smile-o"}} + {{d-icon "smile-o"}} {{else}} - {{fa-icon "frown-o"}} + {{d-icon "frown-o"}} {{/if}} @@ -46,13 +46,13 @@ {{dash-if-empty versionCheck.latest_version}} {{#if versionCheck.upToDate }} - {{fa-icon "smile-o"}} + {{d-icon "smile-o"}} {{else}} {{#if versionCheck.behindByOneVersion}} - {{fa-icon "meh-o"}} + {{d-icon "meh-o"}} {{else}} - {{fa-icon "frown-o"}} + {{d-icon "frown-o"}} {{/if}} {{/if}} diff --git a/app/assets/javascripts/admin/templates/web-hooks-show-events.hbs b/app/assets/javascripts/admin/templates/web-hooks-show-events.hbs index f3b8825e5bf..e0d06098713 100644 --- a/app/assets/javascripts/admin/templates/web-hooks-show-events.hbs +++ b/app/assets/javascripts/admin/templates/web-hooks-show-events.hbs @@ -1,10 +1,10 @@
    {{#link-to 'adminWebHooks' tagName='button' classNames='btn'}} - {{fa-icon 'list'}} {{i18n 'admin.web_hooks.events.go_list'}} + {{d-icon 'list'}} {{i18n 'admin.web_hooks.events.go_list'}} {{/link-to}} {{d-button icon="send" label="admin.web_hooks.events.ping" action="ping" disabled=pingDisabled}} {{#link-to 'adminWebHooks.show' model.extras.web_hook_id tagName='button' classNames='btn'}} - {{fa-icon 'edit'}} {{i18n 'admin.web_hooks.events.go_details'}} + {{d-icon 'edit'}} {{i18n 'admin.web_hooks.events.go_details'}} {{/link-to}}
    diff --git a/app/assets/javascripts/admin/templates/web-hooks-show.hbs b/app/assets/javascripts/admin/templates/web-hooks-show.hbs index c7a8e030888..8530de5f129 100644 --- a/app/assets/javascripts/admin/templates/web-hooks-show.hbs +++ b/app/assets/javascripts/admin/templates/web-hooks-show.hbs @@ -1,5 +1,5 @@ {{#link-to 'adminWebHooks' class="go-back"}} - {{fa-icon 'arrow-left'}} + {{d-icon 'arrow-left'}} {{i18n 'admin.web_hooks.go_back'}} {{/link-to}} @@ -49,12 +49,12 @@
    - + {{category-selector categories=model.categories blacklist=model.categories}}
    {{i18n 'admin.web_hooks.categories_filter_instructions'}}
    - + {{group-selector groupNames=model.groupsFilterInName groupFinder=model.groupFinder}}
    {{i18n 'admin.web_hooks.groups_filter_instructions'}}
    diff --git a/app/assets/javascripts/admin/templates/web-hooks.hbs b/app/assets/javascripts/admin/templates/web-hooks.hbs index 082cf170b41..81d4b86e4dc 100644 --- a/app/assets/javascripts/admin/templates/web-hooks.hbs +++ b/app/assets/javascripts/admin/templates/web-hooks.hbs @@ -1,6 +1,6 @@
    {{#link-to 'adminWebHooks.show' 'new' tagName='button' classNames='btn'}} - {{fa-icon 'plus'}} {{i18n 'admin.web_hooks.new'}} + {{d-icon 'plus'}} {{i18n 'admin.web_hooks.new'}} {{/link-to}}
    @@ -24,7 +24,7 @@
    {{#link-to 'adminWebHooks.show' webHook}}{{webHook.payload_url}}{{/link-to}} {{webHook.description}} - {{#link-to 'adminWebHooks.show' webHook tagName='button' classNames='btn btn-default no-text'}}{{fa-icon 'edit'}}{{/link-to}} + {{#link-to 'adminWebHooks.show' webHook tagName='button' classNames='btn btn-default no-text'}}{{d-icon 'edit'}}{{/link-to}} {{d-button class="destroy btn-danger" action='destroy' actionParam=webHook icon="remove"}}
    @@ -89,7 +89,7 @@ {{#if contactInfo}}
    -

    {{fa-icon "envelope-o"}} {{i18n 'about.contact'}}

    +

    {{d-icon "envelope-o"}} {{i18n 'about.contact'}}

    {{{contactInfo}}}

    {{/if}} diff --git a/app/assets/javascripts/discourse/templates/category-tag-autocomplete.raw.hbs b/app/assets/javascripts/discourse/templates/category-tag-autocomplete.raw.hbs index efbf18a33bf..1c429ddb39d 100644 --- a/app/assets/javascripts/discourse/templates/category-tag-autocomplete.raw.hbs +++ b/app/assets/javascripts/discourse/templates/category-tag-autocomplete.raw.hbs @@ -5,7 +5,7 @@ {{#if option.model}} {{category-link option.model allowUncategorized="true" link="false"}} {{else}} - {{fa-icon 'tag'}}{{option.text}} x {{option.count}} + {{d-icon 'tag'}}{{option.text}} x {{option.count}} {{/if}} {{/each}} diff --git a/app/assets/javascripts/discourse/templates/components/auto-update-input.hbs b/app/assets/javascripts/discourse/templates/components/auto-update-input.hbs index 1e6fbe778ba..50f0a8ee258 100644 --- a/app/assets/javascripts/discourse/templates/components/auto-update-input.hbs +++ b/app/assets/javascripts/discourse/templates/components/auto-update-input.hbs @@ -14,11 +14,11 @@ {{#if isCustom}}
    - {{fa-icon "calendar"}} {{date-picker-future value=date defaultDate=date}} + {{d-icon "calendar"}} {{date-picker-future value=date defaultDate=date}}
    - {{fa-icon "clock-o"}} + {{d-icon "clock-o"}} {{input type="time" value=time}}
    {{/if}} @@ -33,7 +33,7 @@ {{#if willCloseImmediately}}
    - {{fa-icon "warning"}} + {{d-icon "warning"}} {{willCloseI18n}}
    {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/avatar-uploader.hbs b/app/assets/javascripts/discourse/templates/components/avatar-uploader.hbs index 89c46363e34..b43cbb0d567 100644 --- a/app/assets/javascripts/discourse/templates/components/avatar-uploader.hbs +++ b/app/assets/javascripts/discourse/templates/components/avatar-uploader.hbs @@ -1,5 +1,5 @@ {{#if uploading}} diff --git a/app/assets/javascripts/discourse/templates/components/badge-card.hbs b/app/assets/javascripts/discourse/templates/components/badge-card.hbs index 93d3c490b6e..3c519d85ddf 100644 --- a/app/assets/javascripts/discourse/templates/components/badge-card.hbs +++ b/app/assets/javascripts/discourse/templates/components/badge-card.hbs @@ -2,7 +2,7 @@ {{displayCount}} {{/if}} {{#if badge.has_badge}} - {{fa-icon "check"}} + {{d-icon "check"}} {{/if}}
    diff --git a/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs b/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs index 8909e8a9bab..434e18fe629 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs @@ -9,7 +9,7 @@

    {{#if c.read_restricted}} - {{fa-icon 'lock'}} + {{d-icon 'lock'}} {{/if}} {{c.name}}

    diff --git a/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs b/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs index 3bb4fde6653..c473668648f 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs @@ -9,7 +9,7 @@

    {{#if c.read_restricted}} - {{fa-icon 'lock'}} + {{d-icon 'lock'}} {{/if}} {{c.name}}

    diff --git a/app/assets/javascripts/discourse/templates/components/category-drop.hbs b/app/assets/javascripts/discourse/templates/components/category-drop.hbs index 9e9cc410e57..339d4927b60 100644 --- a/app/assets/javascripts/discourse/templates/components/category-drop.hbs +++ b/app/assets/javascripts/discourse/templates/components/category-drop.hbs @@ -2,7 +2,7 @@ {{#if category.read_restricted}} - {{fa-icon "lock"}} + {{d-icon "lock"}} {{/if}} {{category.name}} diff --git a/app/assets/javascripts/discourse/templates/components/category-title-link.hbs b/app/assets/javascripts/discourse/templates/components/category-title-link.hbs index 49e3b088f18..fcb0bdeb071 100644 --- a/app/assets/javascripts/discourse/templates/components/category-title-link.hbs +++ b/app/assets/javascripts/discourse/templates/components/category-title-link.hbs @@ -1,6 +1,6 @@ {{#if category.read_restricted}} - {{fa-icon 'lock'}} + {{d-icon 'lock'}} {{/if}} {{category.name}} diff --git a/app/assets/javascripts/discourse/templates/components/composer-editor.hbs b/app/assets/javascripts/discourse/templates/components/composer-editor.hbs index 46daaeb10e6..3d3f6fc8eb9 100644 --- a/app/assets/javascripts/discourse/templates/components/composer-editor.hbs +++ b/app/assets/javascripts/discourse/templates/components/composer-editor.hbs @@ -30,7 +30,7 @@ {{loading-spinner size="small"}} {{i18n 'upload_selector.uploading'}} {{uploadProgress}}% {{#if isCancellable}} - {{fa-icon "times"}} + {{d-icon "times"}} {{/if}}
    {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/csv-uploader.hbs b/app/assets/javascripts/discourse/templates/components/csv-uploader.hbs index a29839a7909..859433546c3 100644 --- a/app/assets/javascripts/discourse/templates/components/csv-uploader.hbs +++ b/app/assets/javascripts/discourse/templates/components/csv-uploader.hbs @@ -1,5 +1,5 @@ {{#if uploading}} diff --git a/app/assets/javascripts/discourse/templates/components/d-button.hbs b/app/assets/javascripts/discourse/templates/components/d-button.hbs index e01a9bb5c82..d06d14e66df 100644 --- a/app/assets/javascripts/discourse/templates/components/d-button.hbs +++ b/app/assets/javascripts/discourse/templates/components/d-button.hbs @@ -1,5 +1,5 @@ {{#if icon}} - {{fa-icon icon}} + {{d-icon icon}} {{/if}} {{#if translatedLabel}} diff --git a/app/assets/javascripts/discourse/templates/components/disabled-icon.hbs b/app/assets/javascripts/discourse/templates/components/disabled-icon.hbs index b7749feceec..100849f3123 100644 --- a/app/assets/javascripts/discourse/templates/components/disabled-icon.hbs +++ b/app/assets/javascripts/discourse/templates/components/disabled-icon.hbs @@ -1,5 +1,5 @@ -{{fa-icon icon modifier="stack-2x"}} +{{d-icon icon modifier="stack-2x"}} {{#if disabled}} - {{fa-icon "ban" modifier="stack-2x"}} + {{d-icon "ban" modifier="stack-2x"}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/edit-category-security.hbs b/app/assets/javascripts/discourse/templates/components/edit-category-security.hbs index 760863befee..a389e2ceab0 100644 --- a/app/assets/javascripts/discourse/templates/components/edit-category-security.hbs +++ b/app/assets/javascripts/discourse/templates/components/edit-category-security.hbs @@ -9,7 +9,7 @@ {{{i18n "category.can"}}} {{p.permission.description}} {{#if editingPermissions}} - {{fa-icon "times-circle"}} + {{d-icon "times-circle"}} {{/if}} {{/each}} diff --git a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs index ddfb1ce11be..05f70e3b27a 100644 --- a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs +++ b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs @@ -107,7 +107,7 @@
    diff --git a/app/assets/javascripts/discourse/templates/components/emoji-uploader.hbs b/app/assets/javascripts/discourse/templates/components/emoji-uploader.hbs index 1fb6a26eac4..85ad4157bb3 100644 --- a/app/assets/javascripts/discourse/templates/components/emoji-uploader.hbs +++ b/app/assets/javascripts/discourse/templates/components/emoji-uploader.hbs @@ -1,6 +1,6 @@ {{text-field name="name" placeholderKey="admin.emoji.name" value=name}} diff --git a/app/assets/javascripts/discourse/templates/components/expand-post.hbs b/app/assets/javascripts/discourse/templates/components/expand-post.hbs index 4d3192668d1..94ba1d62907 100644 --- a/app/assets/javascripts/discourse/templates/components/expand-post.hbs +++ b/app/assets/javascripts/discourse/templates/components/expand-post.hbs @@ -1,5 +1,5 @@ {{#if item.truncated}} - {{fa-icon "chevron-down"}} + {{d-icon "chevron-down"}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/flat-button.hbs b/app/assets/javascripts/discourse/templates/components/flat-button.hbs index 41ee1dc6407..5c8be2b5eab 100644 --- a/app/assets/javascripts/discourse/templates/components/flat-button.hbs +++ b/app/assets/javascripts/discourse/templates/components/flat-button.hbs @@ -1 +1 @@ -{{fa-icon icon}} +{{d-icon icon}} diff --git a/app/assets/javascripts/discourse/templates/components/group-logs-filter.hbs b/app/assets/javascripts/discourse/templates/components/group-logs-filter.hbs index 11c1eb7b558..f9f13474c7f 100644 --- a/app/assets/javascripts/discourse/templates/components/group-logs-filter.hbs +++ b/app/assets/javascripts/discourse/templates/components/group-logs-filter.hbs @@ -1,6 +1,6 @@ {{#if value}} {{#d-button class="btn-small group-logs-filter" action="clearFilter" actionParam=type}} {{label}}: {{filterText}} - {{fa-icon "times-circle"}} + {{d-icon "times-circle"}} {{/d-button}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/group-logs-row.hbs b/app/assets/javascripts/discourse/templates/components/group-logs-row.hbs index 31d63039952..6fe9bfd858a 100644 --- a/app/assets/javascripts/discourse/templates/components/group-logs-row.hbs +++ b/app/assets/javascripts/discourse/templates/components/group-logs-row.hbs @@ -36,9 +36,9 @@
    diff --git a/app/assets/javascripts/discourse/templates/components/group-member.hbs b/app/assets/javascripts/discourse/templates/components/group-member.hbs index d476fdf033a..ddc6456b833 100644 --- a/app/assets/javascripts/discourse/templates/components/group-member.hbs +++ b/app/assets/javascripts/discourse/templates/components/group-member.hbs @@ -1 +1 @@ -{{avatar member imageSize="small"}} {{member.username}} {{#unless automatic}}{{fa-icon "times"}}{{/unless}} +{{avatar member imageSize="small"}} {{member.username}} {{#unless automatic}}{{d-icon "times"}}{{/unless}} diff --git a/app/assets/javascripts/discourse/templates/components/group-members-input.hbs b/app/assets/javascripts/discourse/templates/components/group-members-input.hbs index 9127b7096de..e4f4e0c1adb 100644 --- a/app/assets/javascripts/discourse/templates/components/group-members-input.hbs +++ b/app/assets/javascripts/discourse/templates/components/group-members-input.hbs @@ -2,9 +2,9 @@ {{#if model.members}}
    - + {{currentPage}}/{{totalPages}} - +
    {{#each model.members as |member|}} diff --git a/app/assets/javascripts/discourse/templates/components/image-uploader.hbs b/app/assets/javascripts/discourse/templates/components/image-uploader.hbs index 14f0695fd2e..5a12cff39bc 100644 --- a/app/assets/javascripts/discourse/templates/components/image-uploader.hbs +++ b/app/assets/javascripts/discourse/templates/components/image-uploader.hbs @@ -1,11 +1,11 @@
    {{#if backgroundStyle}} - + {{/if}} {{i18n 'upload_selector.uploading'}} {{uploadProgress}}%
    diff --git a/app/assets/javascripts/discourse/templates/components/ip-lookup.hbs b/app/assets/javascripts/discourse/templates/components/ip-lookup.hbs index 35d5afd0bb4..44e1b1809b9 100644 --- a/app/assets/javascripts/discourse/templates/components/ip-lookup.hbs +++ b/app/assets/javascripts/discourse/templates/components/ip-lookup.hbs @@ -1,11 +1,11 @@ {{#if ip}} {{/if}} {{#if show}}
    - {{fa-icon "times"}} + {{d-icon "times"}}

    {{i18n 'ip_lookup.title'}}

    {{#if location}} @@ -42,7 +42,7 @@ {{totalOthersWithSameIP}} {{#if other_accounts.length}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/period-chooser.hbs b/app/assets/javascripts/discourse/templates/components/period-chooser.hbs index 3defac6a02c..ce4d6066c57 100644 --- a/app/assets/javascripts/discourse/templates/components/period-chooser.hbs +++ b/app/assets/javascripts/discourse/templates/components/period-chooser.hbs @@ -1,5 +1,5 @@

    {{period-title period showDateRange=true}}

    - +
    {{#if log.prev_value}} {{#if expandDetails}} - {{fa-icon 'ellipsis-v'}} + {{d-icon 'ellipsis-v'}} {{else}} - {{fa-icon 'ellipsis-h'}} + {{d-icon 'ellipsis-h'}} {{/if}} {{/if}}