mirror of
https://github.com/discourse/discourse.git
synced 2025-02-26 08:57:58 +08:00
FIX: do not add personal message link in user menu if they are disabled
This commit is contained in:
parent
66e0bdc053
commit
29ee467a04
@ -29,7 +29,7 @@ createWidgetFrom(QuickAccessPanel, "quick-access-profile", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_getDefaultItems() {
|
_getDefaultItems() {
|
||||||
return [
|
let defaultItems = [
|
||||||
{
|
{
|
||||||
icon: "user",
|
icon: "user",
|
||||||
href: `${this.attrs.path}/summary`,
|
href: `${this.attrs.path}/summary`,
|
||||||
@ -39,12 +39,16 @@ createWidgetFrom(QuickAccessPanel, "quick-access-profile", {
|
|||||||
icon: "stream",
|
icon: "stream",
|
||||||
href: `${this.attrs.path}/activity`,
|
href: `${this.attrs.path}/activity`,
|
||||||
content: I18n.t("user.activity_stream")
|
content: I18n.t("user.activity_stream")
|
||||||
},
|
}
|
||||||
{
|
];
|
||||||
|
if (this.siteSettings.enable_personal_messages) {
|
||||||
|
defaultItems.push({
|
||||||
icon: "envelope",
|
icon: "envelope",
|
||||||
href: `${this.attrs.path}/messages`,
|
href: `${this.attrs.path}/messages`,
|
||||||
content: I18n.t("user.private_messages")
|
content: I18n.t("user.private_messages")
|
||||||
},
|
});
|
||||||
|
}
|
||||||
|
defaultItems.push(
|
||||||
{
|
{
|
||||||
icon: "pencil",
|
icon: "pencil",
|
||||||
href: `${this.attrs.path}/activity/drafts`,
|
href: `${this.attrs.path}/activity/drafts`,
|
||||||
@ -55,7 +59,8 @@ createWidgetFrom(QuickAccessPanel, "quick-access-profile", {
|
|||||||
href: `${this.attrs.path}/preferences`,
|
href: `${this.attrs.path}/preferences`,
|
||||||
content: I18n.t("user.preferences")
|
content: I18n.t("user.preferences")
|
||||||
}
|
}
|
||||||
];
|
);
|
||||||
|
return defaultItems;
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleAnonymousButton() {
|
_toggleAnonymousButton() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user