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 f1c3c09ffd5..03c2240d5cb 100644 --- a/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 +++ b/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 @@ -1,6 +1,14 @@ import { h } from 'virtual-dom'; let _renderers = []; +const REPLACEMENTS = { + 'd-tracking': 'circle', + 'd-muted': 'times-circle', + 'd-regular': 'circle-o', + 'd-watching': 'exclamation-circle', + 'd-watching-first': 'dot-circle-o' +}; + export function renderIcon(renderType, id, params) { for (let i=0; i<_renderers.length; i++) { let renderer = _renderers[i]; @@ -44,6 +52,8 @@ registerIconRenderer({ name: 'font-awesome', string(id, params) { + id = REPLACEMENTS[id] || id; + let tagName = params.tagName || 'i'; let html = `<${tagName} class='${faClasses(id, params)}'`; if (params.title) { html += ` title='${I18n.t(params.title)}'`; } @@ -56,6 +66,8 @@ registerIconRenderer({ }, node(id, params) { + id = REPLACEMENTS[id] || id; + let tagName = params.tagName || 'i'; const properties = { diff --git a/app/assets/javascripts/discourse/controllers/topic-bulk-actions.js.es6 b/app/assets/javascripts/discourse/controllers/topic-bulk-actions.js.es6 index ef7d23eba78..4b2a19d457e 100644 --- a/app/assets/javascripts/discourse/controllers/topic-bulk-actions.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic-bulk-actions.js.es6 @@ -25,7 +25,7 @@ function addBulkButton(action, key, opts) { addBulkButton('showChangeCategory', 'change_category', {icon: 'pencil'}); addBulkButton('closeTopics', 'close_topics', {icon: 'lock'}); addBulkButton('archiveTopics', 'archive_topics', {icon: 'folder'}); -addBulkButton('showNotificationLevel', 'notification_level', {icon: 'circle-o'}); +addBulkButton('showNotificationLevel', 'notification_level', {icon: 'd-regular'}); addBulkButton('resetRead', 'reset_read', {icon: 'backward'}); addBulkButton('unlistTopics', 'unlist_topics', { icon: 'eye-slash', diff --git a/app/assets/javascripts/discourse/lib/notification-levels.js.es6 b/app/assets/javascripts/discourse/lib/notification-levels.js.es6 index 6d744790e26..adeae1bcaa1 100644 --- a/app/assets/javascripts/discourse/lib/notification-levels.js.es6 +++ b/app/assets/javascripts/discourse/lib/notification-levels.js.es6 @@ -9,15 +9,15 @@ export const NotificationLevels = { WATCHING_FIRST_POST, WATCHING, TRACKING, REG export function buttonDetails(level) { switch(level) { case WATCHING_FIRST_POST: - return { id: WATCHING_FIRST_POST, key: 'watching_first_post', icon: 'dot-circle-o' }; + return { id: WATCHING_FIRST_POST, key: 'watching_first_post', icon: 'd-watching-first' }; case WATCHING: - return { id: WATCHING, key: 'watching', icon: 'exclamation-circle' }; + return { id: WATCHING, key: 'watching', icon: 'd-watching' }; case TRACKING: - return { id: TRACKING, key: 'tracking', icon: 'circle' }; + return { id: TRACKING, key: 'tracking', icon: 'd-tracking' }; case MUTED: - return { id: MUTED, key: 'muted', icon: 'times-circle' }; + return { id: MUTED, key: 'muted', icon: 'd-muted' }; default: - return { id: REGULAR, key: 'regular', icon: 'circle-o' }; + return { id: REGULAR, key: 'regular', icon: 'd-regular' }; } } diff --git a/app/assets/javascripts/discourse/templates/preferences/categories.hbs b/app/assets/javascripts/discourse/templates/preferences/categories.hbs index 856feedcf7d..27a07fef118 100644 --- a/app/assets/javascripts/discourse/templates/preferences/categories.hbs +++ b/app/assets/javascripts/discourse/templates/preferences/categories.hbs @@ -3,7 +3,7 @@ <label class="control-label">{{i18n 'user.categories_settings'}}</label> <div class="controls category-controls"> - <label>{{d-icon "exclamation-circle" class="icon watching"}} {{i18n 'user.watched_categories'}}</label> + <label>{{d-icon "d-watching" class="icon watching"}} {{i18n 'user.watched_categories'}}</label> {{category-selector categories=model.watchedCategories blacklist=selectedCategories}} </div> <div class="instructions">{{i18n 'user.watched_categories_instructions'}}</div> @@ -12,7 +12,7 @@ </div> <div class="controls category-controls"> - <label>{{d-icon "circle" class="icon tracking"}} {{i18n 'user.tracked_categories'}}</label> + <label>{{d-icon "d-tracking" class="icon tracking"}} {{i18n 'user.tracked_categories'}}</label> {{category-selector categories=model.trackedCategories blacklist=selectedCategories}} </div> <div class="instructions">{{i18n 'user.tracked_categories_instructions'}}</div> @@ -21,13 +21,13 @@ </div> <div class="controls category-controls"> - <label>{{d-icon "dot-circle-o" class="icon watching-first-post"}} {{i18n 'user.watched_first_post_categories'}}</label> + <label>{{d-icon "d-watching-first" class="icon watching-first-post"}} {{i18n 'user.watched_first_post_categories'}}</label> {{category-selector categories=model.watchedFirstPostCategories}} </div> <div class="instructions">{{i18n 'user.watched_first_post_categories_instructions'}}</div> <div class="controls category-controls"> - <label>{{d-icon "times-circle" class="icon muted"}} {{i18n 'user.muted_categories'}}</label> + <label>{{d-icon "d-muted" class="icon muted"}} {{i18n 'user.muted_categories'}}</label> {{category-selector categories=model.mutedCategories blacklist=selectedCategories}} </div> <div class="instructions">{{i18n 'user.muted_categories_instructions'}}</div> diff --git a/app/assets/javascripts/discourse/templates/preferences/notifications.hbs b/app/assets/javascripts/discourse/templates/preferences/notifications.hbs index c9cf37ac4d1..0ddeefe9986 100644 --- a/app/assets/javascripts/discourse/templates/preferences/notifications.hbs +++ b/app/assets/javascripts/discourse/templates/preferences/notifications.hbs @@ -29,7 +29,7 @@ <div class="control-group muting"> <label class="control-label">{{i18n 'user.users'}}</label> <div class="controls category-controls"> - <label>{{d-icon "times-circle" class="muted icon"}} {{i18n 'user.muted_users'}}</label> + <label>{{d-icon "d-muted" class="muted icon"}} {{i18n 'user.muted_users'}}</label> {{user-selector excludeCurrentUser=true usernames=model.muted_usernames class="user-selector"}} </div> <div class="instructions">{{i18n 'user.muted_users_instructions'}}</div> diff --git a/app/assets/javascripts/discourse/templates/preferences/tags.hbs b/app/assets/javascripts/discourse/templates/preferences/tags.hbs index 390429833ff..1c24147a2f6 100644 --- a/app/assets/javascripts/discourse/templates/preferences/tags.hbs +++ b/app/assets/javascripts/discourse/templates/preferences/tags.hbs @@ -4,25 +4,25 @@ <label class="control-label">{{i18n 'user.tag_settings'}}</label> <div class="controls tag-controls"> - <label>{{d-icon "exclamation-circle" class="icon watching"}} {{i18n 'user.watched_tags'}}</label> + <label>{{d-icon "d-watching" class="icon watching"}} {{i18n 'user.watched_tags'}}</label> {{tag-chooser tags=model.watched_tags blacklist=selectedTags allowCreate=false placeholder="" everyTag="true" unlimitedTagCount="true"}} </div> <div class="instructions">{{i18n 'user.watched_tags_instructions'}}</div> <div class="controls tag-controls"> - <label>{{d-icon "circle" class="icon tracking"}} {{i18n 'user.tracked_tags'}}</label> + <label>{{d-icon "d-regular" class="icon tracking"}} {{i18n 'user.tracked_tags'}}</label> {{tag-chooser tags=model.tracked_tags blacklist=selectedTags allowCreate=false placeholder="" everyTag="true" unlimitedTagCount="true"}} </div> <div class="instructions">{{i18n 'user.tracked_tags_instructions'}}</div> <div class="controls tag-controls"> - <label>{{d-icon "dot-circle-o" class="icon watching-first-post"}} {{i18n 'user.watched_first_post_tags'}}</label> + <label>{{d-icon "d-watching-first" class="icon watching-first-post"}} {{i18n 'user.watched_first_post_tags'}}</label> {{tag-chooser tags=model.watching_first_post_tags blacklist=selectedTags allowCreate=false placeholder="" everyTag="true" unlimitedTagCount="true"}} </div> <div class="instructions">{{i18n 'user.watched_first_post_tags_instructions'}}</div> <div class="controls tag-controls"> - <label>{{d-icon "times-circle" class="icon muted"}} {{i18n 'user.muted_tags'}}</label> + <label>{{d-icon "d-muted" class="icon muted"}} {{i18n 'user.muted_tags'}}</label> {{tag-chooser tags=model.muted_tags blacklist=selectedTags allowCreate=false placeholder="" everyTag="true" unlimitedTagCount="true"}} </div> <div class="instructions">{{i18n 'user.muted_tags_instructions'}}</div>