This was originally about hiding the Media Library from everyone but the GMs, but user state classes only seem to work for the public layout (not dashboard), so just so something useful is here, this is a list of all the user state classes, so you can target certain types of users with specific styling, but it only seems to affect the public layout (dashboard layout doesn't seem to be affected, at least in my testing so far):
I leave the original post below although it didn't quite work out the way I wanted...
ORIGINAL CONTENT: I know the topic of hiding the Media Library button from players has come up periodically, and the answer (that I have seen) has usually been to hide it entirely and just comment out that CSS when you need to access it (or bookmark the URL so you don't need the hyperlink). If you want to have it visible to GMs only by user state, this should work:
/* HIDE MEDIA LIBRARY EXCEPT GMS */
.file-docker {display:none;}
.campaign-game-master .file-docker {display: list-item;}
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
And Star-ed.
Starred? Stared? Huh...the Grammer hammer in me is confused on that one.
~Weasel0
A Parade of Black | ShadowRunHack |
Where I play with CSS code
You can't affect non public pages because you can't grant access to pages they don't already have access to. Public pages work because you can change what people with access see, even if you decide they see nothing.
Edit:You can probably also use the user state to leave the media library button, but remove the delete button based on user states.
They are among us!
XCom: Defiance - Campaign of the Month November 2016
@cgregory: I'm not sure I follow your point - the idea is to simply remove the link for people who already have it (players), not give it to non-members. What I ran into was that while everything seemed to work as expected for the public pages, the user state classes didn't seem to apply to dashboard layout views - removing the link to the Media Library based on user state worked fine on all the public pages, but all the rules were ignored/didn't apply in the dashboard view.
EDIT: Upon further testing at a non-3am time of day, I'm not convinced the user state classes were ever working at all. They are documented in the OP Advanced Styling Guide, if anyone wants to hack away at them: https://docs.google.com/document/d/1MbAEdvqqwXg3PRwbVXMvZY0ndJKsCA_lHyB57256vHM/edit?pli=1
Oh man, a way for public users to be able to see map icons would be amazing.
-bort
Campaign of the Year - 2018
@Basileus: Sorry, I thought you were trying to allow not members of a campaign to view non-public parts of a campaign, not just removing the link in the non-public parts.
If I remember correctly the main issue was that people didn't want users deleting things from the media library by accident. You can use the user states to accomplish that.They are among us!
XCom: Defiance - Campaign of the Month November 2016
Interesting, the user state does seem to work for that element. I wonder why it doesn seem to apply to the dashboard navigation items...?
Oh well, that accomplishes the same end goal (help keep players from accidentally deleting stuff).