File tree Expand file tree Collapse file tree 2 files changed +21
-15
lines changed Expand file tree Collapse file tree 2 files changed +21
-15
lines changed Original file line number Diff line number Diff line change 8989 { { raw "topic-list-header-column" sortable= 'true' number = 'true' order = 'posts' forceName = 'Replies' } }
9090</ script >
9191
92- < script >
93-
94- ( function ( ) {
95- var TopicListItemView = require ( 'discourse/components/topic-list-item' ) . default ;
96- TopicListItemView . reopen ( {
97- showCategory : function ( ) {
98- return ! this . get ( 'controller.hideCategory' ) &&
99- this . get ( 'topic.creator' ) &&
100- this . get ( 'topic.category.name' ) !== 'uncategorized' ;
101- } . property ( )
102- } ) ;
103- } ) ( ) ;
104-
105- </ script >
106-
10792< script type ="text/x-handlebars " data-template-name ="components/latest-topic-list-item ">
10893<!--
10994< div class = 'topic-poster' >
Original file line number Diff line number Diff line change 1+ import { withPluginApi } from "discourse/lib/plugin-api" ;
2+ import discourseComputed from "discourse-common/utils/decorators" ;
3+
4+ function initializePlugin ( api ) {
5+ api . modifyClass ( "component:topic-list-item" , {
6+ pluginId : "acescentral" ,
7+
8+ @discourseComputed ( 'hideCategory' , 'topic.category.name' )
9+ showCategory ( hideCategory , categoryName ) {
10+ return ! hideCategory && categoryName !== 'uncategorized' ;
11+ }
12+ } ) ;
13+ }
14+
15+ export default {
16+ name : "acescentral" ,
17+
18+ initialize ( ) {
19+ withPluginApi ( "1.24.0" , initializePlugin ) ;
20+ } ,
21+ } ;
You can’t perform that action at this time.
0 commit comments