[nodebb-plugin-cards] Show cards when hovering over user links!
-
@meetdilip No probs.
-
@trevor very nice! If see any improvements you can make to the default card, feel free to do so
I've renamed the plugin to
nodebb-plugin-cards
(who knows what it'll extend to, amirite?) and published the latest version with the latest fixes.
To upgrade you first have to remove the old plugin, and install the new one:npm uninstall nodebb-plugin-mentions-cards npm install nodebb-plugin-cards
Be sure to first disable it in the ACP!
For the people with custom cards, template has been changed to
cards/profile
. -
@julian but... how? That should prevent that from happening, right? It also should be impossible to happen in the split second between the AJAX call finishing and you navigating away because the
currentCard
variable is set after it has finished... -
@baris @julian alright this should fix it in theory: https://github.com/Schamper/nodebb-plugin-cards/commit/007f3a65d3c9943d5623ca55056552e64b0f082a
I've published a new version because why not See if you can reproduce it now.
-
@Schamper said:
@baris @julian alright this should fix it in theory: https://github.com/Schamper/nodebb-plugin-cards/commit/007f3a65d3c9943d5623ca55056552e64b0f082a
I've published a new version because why not See if you can reproduce it now.
Great, you've destroyed my progress loader.
-
you sure it wasn't this commit instead?
-
@psychobunny thanks, how did I miss this?? WTF.
-
@baris userslugs with a
-
in them, right? Just looked at the regex and realised that\w
doesn't include that character... Must've overlooked that.So what are all the allowed characters in a userslug? Maybe it's best to make a overkill regex like
\/user\/[^/]+$
? -
This might be useful to you: https://github.com/NodeBB/NodeBB/blob/master/public/src/utils.js#L104-L105
You could just call this from
utils
, to save you the trouble