mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: unsilence deprecation warning for old Font Awesome icons (#30028)
* DEV: unsilence deprecation warnings for old Font Awesome icon names * update fa-user to user font awesome icon name * update pencil-alt to pencil font awesome 6 icon name
This commit is contained in:
@@ -4,10 +4,6 @@ const DEPRECATION_WORKFLOW = [
|
|||||||
handler: "silence",
|
handler: "silence",
|
||||||
matchId: "discourse.decorate-widget.hamburger-widget-links",
|
matchId: "discourse.decorate-widget.hamburger-widget-links",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
handler: "silence",
|
|
||||||
matchId: "discourse.fontawesome-6-upgrade",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
handler: "silence",
|
handler: "silence",
|
||||||
matchId: "discourse.post-menu-widget-overrides",
|
matchId: "discourse.post-menu-widget-overrides",
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ export default class AboutPage extends Component {
|
|||||||
{{#if this.currentUser.admin}}
|
{{#if this.currentUser.admin}}
|
||||||
<p>
|
<p>
|
||||||
<LinkTo class="edit-about-page" @route="adminConfig.about">
|
<LinkTo class="edit-about-page" @route="adminConfig.about">
|
||||||
{{dIcon "pencil-alt"}}
|
{{dIcon "pencil"}}
|
||||||
<span>{{i18n "about.edit"}}</span>
|
<span>{{i18n "about.edit"}}</span>
|
||||||
</LinkTo>
|
</LinkTo>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default class PostMenuEditButton extends Component {
|
|||||||
}}
|
}}
|
||||||
...attributes
|
...attributes
|
||||||
@action={{@buttonActions.editPost}}
|
@action={{@buttonActions.editPost}}
|
||||||
@icon={{if @post.wiki "far-edit" "pencil-alt"}}
|
@icon={{if @post.wiki "far-edit" "pencil"}}
|
||||||
@label={{if this.showLabel "post.controls.edit_action"}}
|
@label={{if this.showLabel "post.controls.edit_action"}}
|
||||||
@title="post.controls.edit"
|
@title="post.controls.edit"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default {
|
|||||||
grant_count: 7,
|
grant_count: 7,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
grant_count: 30,
|
grant_count: 30,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -334,7 +334,7 @@ export default {
|
|||||||
grant_count: 7,
|
grant_count: 7,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -364,7 +364,7 @@ export default {
|
|||||||
grant_count: 30,
|
grant_count: 30,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -2462,7 +2462,7 @@ export default {
|
|||||||
grant_count: 3,
|
grant_count: 3,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -2758,7 +2758,7 @@ export default {
|
|||||||
grant_count: 3,
|
grant_count: 3,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -2837,7 +2837,7 @@ export default {
|
|||||||
grant_count: 3,
|
grant_count: 3,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -2907,7 +2907,7 @@ export default {
|
|||||||
grant_count: 3,
|
grant_count: 3,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -3195,7 +3195,7 @@ export default {
|
|||||||
grant_count: 7,
|
grant_count: 7,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -3225,7 +3225,7 @@ export default {
|
|||||||
grant_count: 30,
|
grant_count: 30,
|
||||||
allow_title: true,
|
allow_title: true,
|
||||||
multiple_grant: false,
|
multiple_grant: false,
|
||||||
icon: "fa-user",
|
icon: "user",
|
||||||
image: null,
|
image: null,
|
||||||
listable: true,
|
listable: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<%- if can_sign_up? %>
|
<%- if can_sign_up? %>
|
||||||
<a href="<%= path "/signup"%>" class='btn btn-primary btn-small sign-up-button'><%= I18n.t('sign_up') %></a>
|
<a href="<%= path "/signup"%>" class='btn btn-primary btn-small sign-up-button'><%= I18n.t('sign_up') %></a>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
<a href="<%= path "/login"%>" class='btn btn-primary btn-small login-button btn-icon-text'><%= SvgSprite.raw_svg('fa-user') %><%= I18n.t('log_in') %></a>
|
<a href="<%= path "/login"%>" class='btn btn-primary btn-small login-button btn-icon-text'><%= SvgSprite.raw_svg('user') %><%= I18n.t('log_in') %></a>
|
||||||
</span>
|
</span>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<h1 class="title"><%= @title %></h1>
|
<h1 class="title"><%= @title %></h1>
|
||||||
|
|
||||||
<%- if !@current_user %>
|
<%- if !@current_user %>
|
||||||
<a href="<%= path "/login" %>" class='btn btn-primary'><%= SvgSprite.raw_svg('fa-user') %><%= I18n.t('log_in') %></a>
|
<a href="<%= path "/login" %>" class='btn btn-primary'><%= SvgSprite.raw_svg('user') %><%= I18n.t('log_in') %></a>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
<%- if @group&.dig(:allow_membership_requests) %>
|
<%- if @group&.dig(:allow_membership_requests) %>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ SQL
|
|||||||
b.trigger = Badge::Trigger::TrustLevelChange
|
b.trigger = Badge::Trigger::TrustLevelChange
|
||||||
# allow title for tl3 and above
|
# allow title for tl3 and above
|
||||||
b.default_allow_title = id > Badge::Member
|
b.default_allow_title = id > Badge::Member
|
||||||
b.default_icon = "fa-user"
|
b.default_icon = "user"
|
||||||
b.system = true
|
b.system = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -523,8 +523,7 @@ License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL
|
|||||||
new_name = remap_from_fa5(new_name)
|
new_name = remap_from_fa5(new_name)
|
||||||
|
|
||||||
if icon_name != new_name
|
if icon_name != new_name
|
||||||
# TODO: Enable message once core and official themes/plugins are updated
|
Discourse.deprecate("The icon `#{icon_name}` is deprecated. Use `#{new_name}` instead.")
|
||||||
# Discourse.deprecate("The icon `#{icon_name}` is deprecated. Use `#{new_name}` instead.")
|
|
||||||
return new_name
|
return new_name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user