DEV: Use component references for user menu (#456)
See 9b41700f87 for context.
Passing a reference works before and after that change, so there is no need to introduce a discourse-compatibility entry.
			
			
This commit is contained in:
		
							parent
							
								
									7562925e0d
								
							
						
					
					
						commit
						996c5ea493
					
				|  | @ -1,3 +0,0 @@ | |||
| import templateOnly from "@ember/component/template-only"; | ||||
| // TODO: colocate this component's template
 | ||||
| export default templateOnly(); | ||||
|  | @ -6,6 +6,7 @@ import Notification from "discourse/models/notification"; | |||
| import I18n from "I18n"; | ||||
| import showModal from "discourse/lib/show-modal"; | ||||
| import Topic from "discourse/models/topic"; | ||||
| import UserMenuAssignsListEmptyState from "./assigns-list-empty-state"; | ||||
| 
 | ||||
| export default class UserMenuAssignNotificationsList extends UserMenuNotificationsList { | ||||
|   get dismissTypes() { | ||||
|  | @ -33,7 +34,7 @@ export default class UserMenuAssignNotificationsList extends UserMenuNotificatio | |||
|   } | ||||
| 
 | ||||
|   get emptyStateComponent() { | ||||
|     return "user-menu/assigns-list-empty-state"; | ||||
|     return UserMenuAssignsListEmptyState; | ||||
|   } | ||||
| 
 | ||||
|   async fetchItems() { | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| import { withPluginApi } from "discourse/lib/plugin-api"; | ||||
| import UserMenuAssignNotificationsList from "../components/user-menu/assigns-list"; | ||||
| 
 | ||||
| export default { | ||||
|   name: "assign-user-menu", | ||||
|  | @ -17,26 +18,15 @@ export default { | |||
|         } | ||||
|         api.registerUserMenuTab((UserMenuTab) => { | ||||
|           return class extends UserMenuTab { | ||||
|             get id() { | ||||
|               return "assign-list"; | ||||
|             } | ||||
| 
 | ||||
|             get panelComponent() { | ||||
|               return "user-menu/assigns-list"; | ||||
|             } | ||||
| 
 | ||||
|             get icon() { | ||||
|               return "user-plus"; | ||||
|             } | ||||
|             id = "assign-list"; | ||||
|             panelComponent = UserMenuAssignNotificationsList; | ||||
|             icon = "user-plus"; | ||||
|             notificationTypes = ["assigned"]; | ||||
| 
 | ||||
|             get count() { | ||||
|               return this.getUnreadCountForType("assigned"); | ||||
|             } | ||||
| 
 | ||||
|             get notificationTypes() { | ||||
|               return ["assigned"]; | ||||
|             } | ||||
| 
 | ||||
|             get linkWhenActive() { | ||||
|               return `${this.currentUser.path}/activity/assigned`; | ||||
|             } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue