Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Dec 15, 2024
1 parent 5857825 commit e967d95
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 12 deletions.
2 changes: 1 addition & 1 deletion assets/css/easyadmin-theme/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ a.user-menu-wrapper .user-details:hover {
inline-size: 2em;
text-align: center;
}
.user-menu-wrapper .user-avatar .icon {
.user-menu-wrapper .dropdown-user-details .user-avatar .icon {
display: block;
}

Expand Down
22 changes: 22 additions & 0 deletions public/app.4f38be1d.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/entrypoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"entrypoints": {
"app": {
"css": [
"/app.4db32b24.css"
"/app.4f38be1d.css"
],
"js": [
"/app.1ecd6d7a.js"
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app.css": "app.4db32b24.css",
"app.css": "app.4f38be1d.css",
"app.js": "app.1ecd6d7a.js",
"form.js": "form.bcec6c2a.js",
"page-layout.js": "page-layout.3347892e.js",
Expand Down
8 changes: 0 additions & 8 deletions src/Twig/Component/ActionMenu.php

This file was deleted.

4 changes: 4 additions & 0 deletions templates/components/ActionMenu.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{# ActionMenu is a component to create dropdowns of related actions.
It defines several sub-components (Overlay, ActionList, etc.)
Inspired by https://primer.style/components/action-menu
#}
<div {{ attributes.defaults({class: 'dropdown'}) }}>
<twig:block name="content"></twig:block>
</div>
16 changes: 15 additions & 1 deletion templates/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,21 @@
{% endblock responsive_header_logo %}
</div>

{{ user_menu_dropdown }}
<twig:ea:ActionMenu class="ms-auto user-menu-wrapper {{ is_granted(impersonator_permission) ? 'user-is-impersonated' }}">
<twig:ea:ActionMenu:Button class="user-details" data-bs-offset="0,5" withoutDropdownToggleMarker>
{# to make the site design consistent, always display the user avatar in responsive header
and hide the user name (because there's no space left) regardless of the user config #}
{% if ea.userMenu.avatarDisplayed %}
{{ user_menu_avatar }}
{% else %}
<twig:ea:Icon class="user-avatar" name="{{ ea.user is not null ? 'internal:user' : 'internal:user-xmark' }}" />
{% endif %}
</twig:ea:ActionMenu:Button>
<twig:ea:ActionMenu:Overlay>
{{ user_menu_dropdown }}
</twig:ea:ActionMenu:Overlay>
</twig:ea:ActionMenu>

{{ settings_dropdown }}
{% endblock responsive_header %}
</div>
Expand Down

0 comments on commit e967d95

Please sign in to comment.