Heliosurge
(Dan DeMontmorency)
11.Август.2024 01:48:44
4
Вот тема, где один из участников создал компонент, но при моей попытке его использовать он не работал. Я также попытался написать DeV в личку, но, возможно, он уже ушел.
Finally got around to knocking this together as, https://github.com/Umbrella-CAST/discourse-umbrella-groupswitchdisplay Super simple, just removes the targeted DIV from the DOM based on is the current user in a group name “foobar” or not in the group via “!foobar”. That lets me have a simple toggle display of content like the below image.
Of course, if the component is disabled, then all of the content shows (since sans component the DOM doesn’t get trimmed down.) But this is good enough for w…