Merge pull request #36471 from iamejaaz/sidebar-title-tooltip

fix(navbar): remove extra navbar on impersonate
This commit is contained in:
Ejaaz Khan 2026-01-29 16:15:57 +05:30 committed by GitHub
commit fff55a7f26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 17 deletions

View file

@ -1,4 +1,4 @@
<div class="page-head flex {% if frappe.boot.read_only || frappe.boot.user.impersonated_by %}show-navbar{% endif %}">
<div class="page-head flex">
<div class="container">
<div class="row flex-nowrap align-center page-head-content justify-between">
<div class="page-title">
@ -39,6 +39,17 @@
{% endif %}
<div class="flex col page-actions justify-content-end {% if frappe.is_mobile() %} pl-0 {% endif %}">
<!-- buttons -->
{% if (frappe.boot.read_only) { %}
<span class="mr-3 indicator-pill yellow no-indicator-dot read-only-banner" title="{%= __(" Your site is undergoing
maintenance or being updated.") %}">
{%= __("Read Only Mode") %}
</span>
{% } %}
{% if (frappe.boot.user.impersonated_by) { %}
<span class="mr-3 indicator-pill red no-indicator-dot" title="{%= __(" You are impersonating as another user.") %}">
{%= __("Impersonating {0}", [frappe.boot.user.name]) %}
</span>
{% } %}
<div class="filters flex"></div>
<div class="custom-actions hide hidden-xs hidden-md"></div>
<div class="standard-actions flex">
@ -72,17 +83,6 @@
</div>
<button class="btn btn-primary btn-sm hide primary-action"></button>
</div>
{% if (frappe.boot.read_only) { %}
<span class="ml-3 indicator-pill yellow no-indicator-dot read-only-banner" title="{%= __(" Your site is undergoing
maintenance or being updated.") %}">
{%= __("Read Only Mode") %}
</span>
{% } %}
{% if (frappe.boot.user.impersonated_by) { %}
<span class="ml-3 indicator-pill red no-indicator-dot" title="{%= __(" You are impersonating as another user.") %}">
{%= __("Impersonating {0}", [frappe.boot.user.name]) %}
</span>
{% } %}
</div>
</div>
</div>

View file

@ -67,8 +67,6 @@ frappe.ui.Page = class Page {
(frappe.boot.read_only || frappe.boot.user.impersonated_by)
) {
$(".page-head").css("top", "-15px");
} else if (frappe.boot.read_only || frappe.boot.user.impersonated_by) {
$(".page-head").css("top", "var(--navbar-height)");
}
last_scroll = current_scroll;
}, 500)

View file

@ -111,9 +111,6 @@ body[data-route^="Form"] {
border-bottom: 1px solid var(--border-color);
transition: 0.5s top;
top: 0;
&.show-navbar {
top: var(--navbar-height);
}
.page-head-content {
height: var(--page-head-height);