File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
javascripts/discourse/components Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11import Component from " @glimmer/component" ;
22import { action } from " @ember/object" ;
3+ import { service } from " @ember/service" ;
34import DButton from " discourse/components/d-button" ;
45
56export default class OneTrustPrefButton extends Component {
7+ @service sidebarState;
8+
9+ get shouldRender () {
10+ return this .sidebarState .currentPanelKey !== " admin" ;
11+ }
12+
613 @action
714 oneTrustTrigger () {
815 if (window .OneTrust ) {
@@ -14,10 +21,12 @@ export default class OneTrustPrefButton extends Component {
1421 }
1522
1623 <template >
17- <DButton
18- @ action ={{this .oneTrustTrigger }}
19- @ label ={{themePrefix " one_trust.button" }}
20- class =" btn-flat onetrust-pref"
21- />
24+ {{#if this . shouldRender }}
25+ <DButton
26+ @ action ={{this .oneTrustTrigger }}
27+ @ label ={{themePrefix " one_trust.button" }}
28+ class =" btn-flat onetrust-pref"
29+ />
30+ {{/if }}
2231 </template >
2332}
You can’t perform that action at this time.
0 commit comments