How to add css as per the login?

Hi there, I want to add some css to another html code written in template node according to the person who is logged in. I have my login code in another template node and other html codes in different template node. I am not getting how to apply those css properties after login

Assuming that your Dashboard nodes are up to date, you can pass msg.className to a dashboard widget to change the widget class and so apply custom CSS.

You might get some tips from this post where widgets' appearance is changed by clicking buttons.

Won't the css apply to all logged in users, not just this one?

Do you mean different users logged in simultaneously? It probably will do yes since Node-Red is essentially single user.

I don't know how @Nisha records someone as logged in, maybe s/he is addressing this problem.
I know there are efforts going on to adapt NR to multi-user situations.

I have UI application in which I want to add multiple user login so, I have multiple flows for every UI page and I want some content to be hidden for "user" login and everything to be shown on "admin" login. In my case, I have side menu and on that i want to hide 2 tabs for normal user and those tabs to be shown when admin is logged in. And for this I have flow for login and other flows for every page. How can I add hide and show property of css based on the login user?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.