mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:42:16 +08:00
DEV: Allow overriding sidebar icon for "My Posts"
This sidebar link uses the "user" icon by default. For themes/plugins that may want to override only this icon, we need to add a unique name here so it that it can be replaced for this use case specifically.
This commit is contained in:
parent
5098338a96
commit
3ddd099836
|
@ -51,6 +51,7 @@ export const REPLACEMENTS = {
|
|||
"notification.reaction": "bell",
|
||||
"notification.votes_released": "plus",
|
||||
"notification.chat_quoted": "quote-right",
|
||||
"sidebar.my_posts": "user",
|
||||
};
|
||||
|
||||
export function replaceIcon(source, destination) {
|
||||
|
|
|
@ -98,11 +98,11 @@ export default class MyPostsSectionLink extends BaseSectionLink {
|
|||
return this.draftCount > 0;
|
||||
}
|
||||
|
||||
get defaultPrefixValue() {
|
||||
get prefixValue() {
|
||||
if (this._hasDraft && this.currentUser?.new_new_view_enabled) {
|
||||
return "pencil-alt";
|
||||
}
|
||||
return "user";
|
||||
return "sidebar.my_posts";
|
||||
}
|
||||
|
||||
get suffixCSSClass() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user