UX: update assigns in exp user menu nav
This commit is contained in:
parent
d8a2e42f79
commit
d6821900af
|
@ -1,4 +1,6 @@
|
|||
{{#link-to "userPrivateMessages.assigned" model}}
|
||||
{{#unless this.currentUser.redesigned_user_page_nav_enabled}}
|
||||
{{#link-to "userPrivateMessages.assigned" model}}
|
||||
{{d-icon "user-plus" class="glyph"}}
|
||||
{{i18n "discourse_assign.assigned"}}
|
||||
{{/link-to}}
|
||||
{{/link-to}}
|
||||
{{/unless}}
|
|
@ -9,6 +9,10 @@ import { getOwner } from "discourse-common/lib/get-owner";
|
|||
import { htmlSafe } from "@ember/template";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import SearchAdvancedOptions from "discourse/components/search-advanced-options";
|
||||
import MessagesGroupsDropdown from "discourse/components/user-nav/messages-groups-dropdown";
|
||||
import UserPrivateMessages from "discourse/controllers/user-private-messages";
|
||||
import { computed } from "@ember/object";
|
||||
|
||||
import TopicButtonAction, {
|
||||
addBulkButton,
|
||||
} from "discourse/controllers/topic-bulk-actions";
|
||||
|
@ -945,6 +949,25 @@ export default {
|
|||
});
|
||||
}
|
||||
|
||||
MessagesGroupsDropdown.reopen({
|
||||
groupsWithMessages: computed(function () {
|
||||
return this._super("groupsWithMessages").concat([
|
||||
{
|
||||
name: I18n.t("discourse_assign.assigned"),
|
||||
url: `/u/${this.user.username}/messages/assigned`,
|
||||
},
|
||||
]);
|
||||
}),
|
||||
});
|
||||
|
||||
UserPrivateMessages.reopen({
|
||||
customFilter: computed("router.currentRouteName", function () {
|
||||
return this.router.currentRouteName === "userPrivateMessages.assigned"
|
||||
? I18n.t("discourse_assign.assigned")
|
||||
: null;
|
||||
}),
|
||||
});
|
||||
|
||||
withPluginApi("0.13.0", (api) => includeIsAssignedOnTopic(api));
|
||||
withPluginApi("0.11.0", (api) => initialize(api));
|
||||
withPluginApi("0.8.28", (api) => registerTopicFooterButtons(api));
|
||||
|
|
Loading…
Reference in New Issue