From 162413862c7561207964a685b9ab2ff392cb8582 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 15 Dec 2016 16:23:03 +1100 Subject: [PATCH] FEATURE: add `staff` class to HTML body for staff --- .../javascripts/discourse/components/site-header.js.es6 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/discourse/components/site-header.js.es6 b/app/assets/javascripts/discourse/components/site-header.js.es6 index bf66453c67f..9285f5355b8 100644 --- a/app/assets/javascripts/discourse/components/site-header.js.es6 +++ b/app/assets/javascripts/discourse/components/site-header.js.es6 @@ -47,6 +47,12 @@ const SiteHeaderComponent = MountWidget.extend(Docking, { this.queueRerender(); }, + willRender() { + if (this.get('currentUser.staff')) { + $('body').addClass('staff'); + } + }, + didInsertElement() { this._super(); $(window).on('resize.discourse-menu-panel', () => this.afterRender());