mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Hide experimental user navigation changes when disabled (#18327)
Followup to b066955838
This commit is contained in:
parent
da47e448ac
commit
7a622f22bc
@ -198,6 +198,17 @@ export default Controller.extend(CanCheckEmails, {
|
||||
this.toggleProperty("displayUserNav");
|
||||
},
|
||||
|
||||
get displayTopLevelAdminButton() {
|
||||
if (!this.currentUser?.staff) {
|
||||
return false;
|
||||
}
|
||||
if (this.currentUser?.redesigned_user_page_nav_enabled) {
|
||||
return this.site.desktopView;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
collapseProfile() {
|
||||
this.set("forceExpand", false);
|
||||
|
@ -66,7 +66,7 @@
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if (and this.site.desktopView this.currentUser.staff)}}
|
||||
{{#if this.displayTopLevelAdminButton}}
|
||||
<li><a href={{this.model.adminPath}} class="btn btn-default">{{d-icon "wrench"}}<span class="d-button-label">{{i18n "admin.user.show_admin_profile"}}</span></a></li>
|
||||
{{/if}}
|
||||
|
||||
@ -78,7 +78,7 @@
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if this.site.mobileView}}
|
||||
{{#if (and this.site.mobileView this.currentUser.redesigned_user_page_nav_enabled)}}
|
||||
<li>
|
||||
<DButton @class="btn-default toggle-mobile-user-menu" @action={{this.toggleUserNav}} @icon="bars" @label="hamburger_menu" />
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user