FEATURE: add "Votes" option to category topic list settings (#232)
This commit is contained in:
parent
ba733585c8
commit
8d21b18ea4
|
@ -65,5 +65,19 @@ export default {
|
|||
api.addSearchSuggestion("order:votes");
|
||||
}
|
||||
});
|
||||
|
||||
withPluginApi("2.1.0", (api) => {
|
||||
api.registerValueTransformer(
|
||||
"category-available-views",
|
||||
({ value, context }) => {
|
||||
if (context.customFields.enable_topic_voting) {
|
||||
value.push({
|
||||
name: i18n("filters.votes.title"),
|
||||
value: "votes",
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue