mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Rename deprecated icons, allow custom icons in badges
- adds a migration renaming FA4 icon names in badges - allows all icons to be used in badges (previously was limited to icons prefixed with fa-) - renames remaining FA 4.7 icons equivalents
This commit is contained in:
@@ -5,7 +5,7 @@ import { bufferedRender } from "discourse-common/lib/buffered-render";
|
||||
export default Ember.Component.extend(
|
||||
bufferedRender({
|
||||
classes: ["text-muted", "text-danger", "text-successful", "text-muted"],
|
||||
icons: ["circle-o", "times-circle", "circle", "circle"],
|
||||
icons: ["far-circle", "times-circle", "circle", "circle"],
|
||||
|
||||
@computed("deliveryStatuses", "model.last_delivery_status")
|
||||
status(deliveryStatuses, lastDeliveryStatus) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<button {{action "save"}} disabled={{model.disableSave}} class='btn btn-primary'>{{i18n 'admin.customize.save'}}</button>
|
||||
{{/unless}}
|
||||
<button {{action "copy" model}} class='btn btn-default'>{{d-icon "copy"}} {{i18n 'admin.customize.copy'}}</button>
|
||||
<button {{action "copyToClipboard" model}} class='btn btn-default'>{{d-icon "clipboard"}} {{i18n 'admin.customize.copy_to_clipboard'}}</button>
|
||||
<button {{action "copyToClipboard" model}} class='btn btn-default'>{{d-icon "far-clipboard"}} {{i18n 'admin.customize.copy_to_clipboard'}}</button>
|
||||
{{#if model.theme_id}}
|
||||
{{i18n "admin.customize.theme_owner"}}
|
||||
{{#link-to "adminCustomizeThemes.show" model.theme_id}}{{model.theme_name}}{{/link-to}}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<td class='description'>{{webHook.description}}</td>
|
||||
<td class='controls'>
|
||||
{{#link-to 'adminWebHooks.show' webHook tagName='button' classNames='btn btn-default no-text'}}{{d-icon 'far-edit'}}{{/link-to}}
|
||||
{{d-button class="destroy btn-danger" action=(action "destroy") actionParam=webHook icon="remove"}}
|
||||
{{d-button class="destroy btn-danger" action=(action "destroy") actionParam=webHook icon="times"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
||||
@@ -6,7 +6,7 @@ export default htmlHelper(function({ icon, image }) {
|
||||
return `<img src='${image}'>`;
|
||||
}
|
||||
|
||||
if (Ember.isEmpty(icon) || icon.indexOf("fa-") < 0) {
|
||||
if (Ember.isEmpty(icon)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@ export const SAVE_LABELS = {
|
||||
|
||||
export const SAVE_ICONS = {
|
||||
[EDIT]: "pencil-alt",
|
||||
[EDIT_SHARED_DRAFT]: "clipboard",
|
||||
[EDIT_SHARED_DRAFT]: "far-clipboard",
|
||||
[REPLY]: "reply",
|
||||
[CREATE_TOPIC]: "plus",
|
||||
[PRIVATE_MESSAGE]: "envelope",
|
||||
[CREATE_SHARED_DRAFT]: "clipboard"
|
||||
[CREATE_SHARED_DRAFT]: "far-clipboard"
|
||||
};
|
||||
|
||||
const Composer = RestModel.extend({
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
args=(hash model=model)}}
|
||||
|
||||
<section class='about stats'>
|
||||
<h3>{{d-icon "bar-chart"}} {{i18n 'about.stats'}}</h3>
|
||||
<h3>{{d-icon "far-chart-bar"}} {{i18n 'about.stats'}}</h3>
|
||||
|
||||
<table class='table'>
|
||||
<tr>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
action=(action "publish")
|
||||
label="shared_drafts.publish"
|
||||
class="btn-primary publish-shared-draft"
|
||||
icon="clipboard"}}
|
||||
icon="far-clipboard"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -107,14 +107,14 @@ export function buildManageButtons(attrs, currentUser, siteSettings) {
|
||||
contents.push({
|
||||
action: "toggleWiki",
|
||||
label: "post.controls.unwiki",
|
||||
icon: "pencil-square-o",
|
||||
icon: "far-edit",
|
||||
className: "btn-default wiki wikied"
|
||||
});
|
||||
} else {
|
||||
contents.push({
|
||||
action: "toggleWiki",
|
||||
label: "post.controls.wiki",
|
||||
icon: "pencil-square-o",
|
||||
icon: "far-edit",
|
||||
className: "btn-default wiki"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export default createWidget("post-edits-indicator", {
|
||||
let title;
|
||||
|
||||
if (attrs.wiki) {
|
||||
icon = "pencil-square-o";
|
||||
icon = "far-edit";
|
||||
className = `${className || ""} wiki`.trim();
|
||||
|
||||
if (attrs.version > 1) {
|
||||
|
||||
@@ -178,7 +178,7 @@ registerButton("wiki-edit", attrs => {
|
||||
action: "editPost",
|
||||
className: "edit create",
|
||||
title: "post.controls.edit",
|
||||
icon: "pencil-square-o",
|
||||
icon: "far-edit",
|
||||
alwaysShowYours: true
|
||||
};
|
||||
if (!attrs.mobileView) {
|
||||
|
||||
@@ -67,7 +67,7 @@ export default DropdownSelectBoxComponent.extend({
|
||||
content.title = I18n.t("composer.composer_actions.edit");
|
||||
break;
|
||||
case CREATE_SHARED_DRAFT:
|
||||
content.icon = "clipboard";
|
||||
content.icon = "far-clipboard";
|
||||
content.title = I18n.t("composer.composer_actions.draft");
|
||||
break;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ export default DropdownSelectBoxComponent.extend({
|
||||
items.push({
|
||||
name: I18n.t("composer.composer_actions.shared_draft.label"),
|
||||
description: I18n.t("composer.composer_actions.shared_draft.desc"),
|
||||
icon: "clipboard",
|
||||
icon: "far-clipboard",
|
||||
id: "shared_draft"
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user