Install this theme component
This Theme Component adds a button to the site header to enable the Developer Tools . When Dev Tools are not enabled, the button is the normal bug icon. When it is enabled, it is at the bug-slash icon.
Before enabling:
After enabling:
The button should remain at its respective state even when the page is closed, as it uses localStorage.
8 Likes
Heliosurge
(Dan DeMontmorency)
February 7, 2025, 6:29am
2
On my instance it seems to show for non admin users. Could this be adjusted for admin only?
It is also showing on the right of profile. Guessing maybe due to f-nav theme component
1 Like
Yep, new setting admin_only has been added. I got some of it from here .
I’ve specified it to be before the search button already. Probably a component affecting this.
2 Likes
Heliosurge
(Dan DeMontmorency)
February 7, 2025, 7:39pm
4
Thank you very kindly
The TC that will be affecting is very likely
It moves the search and chat a a few other goodies to a bottom bar. Not a big deal. As the Dev bar when active is a bit busy compared to the old TC plugin outlets in mobile.
1 Like
Pushed a quick fix to add a setting (logged_in_only) to show the button to logged in users. It’s true by default.
2 Likes
For some reason, I don’t see the button after installing this component, everytime this happens it seems I’ve missed something little
I have the Custom Header Links component installed but I disabled it and the Dev Tools Button still didn’t appear
I reloaded the page several times and even logged out and back in (since I have it set to admin only)
latest Discourse just updated
I noticed this the last time as well. I think the icon is the same colour as the header, for some reason. IIRC it’s there, upon inspection.
It’s odd. IIRC if you enable then disable it, the button appears again. I’ll see what I can do.
2 Likes
@Andrew_Rowe I’ve pushed a fix. Try it and tell me if it works now, thanks!
2 Likes
Yup… it works now!!! Had to update the component. Thanks Nate
2 Likes
I will be updating this soon to make it into a gjs file instead of a js/hbs one.
3 Likes
I’ve just merged in a PR that fixes the logic related to the admin_only setting. The setting should now function properly. Somehow I missed this bug for quite a while.
main ← fix-setting-logic
merged 11:20AM - 25 Aug 25 UTC
This PR fixes the logic of the setting `admin_only`, which did not work previous… ly.
RGJ
(Richard - Communiteq)
January 2, 2026, 3:26pm
13
I see this tc throws errors when one is not logged in because of a wrong order of expressions
if (settings.admin_only && currentUser.admin && currentUser !== null) {
evaluates currentUser.admin even if currentUser is null. It should be
if (settings.admin_only && currentUser && currentUser.admin) {
3 Likes