Refactor: Rebuilt Masthead User Dropdown for Cleaner Structure and Modern Behavior (#7398)

* Update default3.handlebars

* Update default3.handlebars

* Update style-bootstrap.css

* Update translate.json

* Improve user dropdown menu visibility and control

Refactored user dropdown menu items in default3.handlebars to add unique IDs and a new 'mobile-menu-item' class for better visibility control. Added logic to conditionally show/hide menu items based on UI mode and feature flags, including forced Modern UI and night mode. Updated CSS to remove unnecessary border styling. updated webserver.js to set a feature flag when Modern UI is forced.

* Adjust desktop breakpoint and submenu animation logic

Changed desktop breakpoint from 1025px to 769px in both CSS and JS to better align with responsive design. Submenu animation now respects the user's reduced motion preference, disabling transitions when 'prefers-reduced-motion' is enabled.

* Improve masthead layout and text overflow handling

* Refine mobile menu item visibility logic

Updated the logic for showing/hiding mobile menu items based on uiMode. Now, only menu items without 'users-menu-item', 'files-menu-item', or 'server-menu-item' classes are shown when uiMode is not 2 or 3.

* Update style-bootstrap.css

* Comment out toggleModernUIMenuItem line

Comment out the toggleModernUIMenuItem visibility check.

* Update translate.json
This commit is contained in:
TheDevRyan
2025-11-17 11:46:46 +00:00
committed by GitHub
parent 6103d94e2c
commit 53f108fe7b
4 changed files with 3952 additions and 3610 deletions

View File

@@ -3393,6 +3393,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
if (domain.devicesearchbargroupname === true) { features2 += 0x10000000; } // Search bar will find by group name too
if (((typeof domain.passwordrequirements != 'object') || (domain.passwordrequirements.duo2factor != false)) && (typeof domain.duo2factor == 'object') && (typeof domain.duo2factor.integrationkey == 'string') && (typeof domain.duo2factor.secretkey == 'string') && (typeof domain.duo2factor.apihostname == 'string')) { features2 += 0x20000000; } // using Duo for 2FA is allowed
if (domain.showmodernuitoggle == true) { features2 += 0x40000000; } // Indicates that the new UI should be shown
if (domain.sitestyle === 3) { features2 |= 0x80000000; } // Indicates that Modern UI is forced (siteStyle = 3)
return { features: features, features2: features2 };
}