feabila
(Felipe)
13. November 2020 um 14:57
1
Hi you all!
I’m styling Follow Plugin 👨 , then I started considering changes over
button[aria-label="Follow"] or button[aria-label="Following"]
Do you know if there is some way to change icon by Css, so this way, it would be possible to change from “user-plus” (to follow) to “user-check” (following)
Hope you guys can help me!
Best Regards,
Felipe
EDIT(SOLUTION):
Yooo! I manipulated over user object reference
{{follow-toggle icon=(if user.following 'user-check' 'user-plus') user=user}}
Thank you all!!
3 „Gefällt mir“
merefield
(Robert)
13. November 2020 um 15:43
4
@feabila , that’s a great idea.
So great in fact, I’ve gone ahead and committed at least part of that to the repo:
https://github.com/paviliondev/discourse-follow/commit/2609657fc4e155ea1d1f6ddb74ac2600a46eeaa0
Nice one!
Actually, I’ll keep it functionally the way you propose, but I’ll simplify and rely on the existing Computed Property:
https://github.com/paviliondev/discourse-follow/commit/6bcdebb40fea0233ac4b46548ccc720bc263c08c
Please take a look if you are interested in the alternative implementation.
Cheers!
3 „Gefällt mir“