DEV: Add icon aliases (#26300)
This commit is contained in:
parent
61bd7d5d11
commit
af22154d80
|
@ -51,6 +51,9 @@ export const REPLACEMENTS = {
|
|||
"notification.reaction": "bell",
|
||||
"notification.votes_released": "plus",
|
||||
"notification.chat_quoted": "quote-right",
|
||||
"user_menu.replies": "reply",
|
||||
"user_menu.drafts": "pencil-alt",
|
||||
"sidebar.all_categories": "list",
|
||||
};
|
||||
|
||||
export function replaceIcon(source, destination) {
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
@content={{i18n "sidebar.all_categories"}}
|
||||
@route="discovery.categories"
|
||||
@prefixType="icon"
|
||||
@prefixValue="list"
|
||||
@prefixValue="sidebar.all_categories"
|
||||
/>
|
|
@ -36,7 +36,7 @@ const CORE_TOP_TABS = [
|
|||
|
||||
class extends UserMenuTab {
|
||||
id = "replies";
|
||||
icon = "reply";
|
||||
icon = "user_menu.replies";
|
||||
panelComponent = UserMenuRepliesNotificationsList;
|
||||
notificationTypes = [
|
||||
"mentioned",
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
<li class="drafts">
|
||||
<LinkTo @route="userActivity.drafts" @model={{this.currentUser}}>
|
||||
{{d-icon "pencil-alt"}}
|
||||
{{d-icon "user_menu.drafts"}}
|
||||
<span class="item-label">
|
||||
{{#if this.currentUser.draft_count}}
|
||||
{{i18n "drafts.label_with_count" count=this.currentUser.draft_count}}
|
||||
|
|
|
@ -502,18 +502,18 @@ acceptance("User menu", function (needs) {
|
|||
"invites link not shown when the user can't invite"
|
||||
);
|
||||
|
||||
const dratsLink = query("#quick-access-profile ul li.drafts a");
|
||||
const draftsLink = query("#quick-access-profile ul li.drafts a");
|
||||
assert.ok(
|
||||
dratsLink.href.endsWith("/u/eviltrout/activity/drafts"),
|
||||
draftsLink.href.endsWith("/u/eviltrout/activity/drafts"),
|
||||
"has a link to the drafts page of the user"
|
||||
);
|
||||
assert.strictEqual(
|
||||
dratsLink.textContent.trim(),
|
||||
draftsLink.textContent.trim(),
|
||||
I18n.t("drafts.label_with_count", { count: 13 }),
|
||||
"drafts link has the right label with count of the user's drafts"
|
||||
);
|
||||
assert.ok(
|
||||
dratsLink.querySelector(".d-icon-pencil-alt"),
|
||||
draftsLink.querySelector(".d-icon-user_menu\\.drafts"),
|
||||
"drafts link has the right icon"
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue