style(next): toggle arrow on mobile

This commit is contained in:
Elian Doran 2024-12-28 10:39:45 +02:00
parent a28dff7525
commit 12eff0fef5
No known key found for this signature in database
2 changed files with 18 additions and 9 deletions

View File

@ -170,14 +170,12 @@ class ContextMenu {
}
if (this.isMobile && "items" in item && item.items) {
// We run using a timeout to avoid the layout change during event handling, which would trigger the menu to be hidden sometimes.
setTimeout(() => {
$(e.target)
.closest(".dropdown-item")
.find("ul.dropdown-menu")
.toggleClass("show");
}, 0);
e.preventDefault();
const $item = $(e.target)
.closest(".dropdown-item");
$item.toggleClass("submenu-open");
$item.find("ul.dropdown-menu")
.toggleClass("show");
return false;
}

View File

@ -1014,7 +1014,6 @@ html body .dropdown-item.disabled {
justify-content: center;
top: 0;
right: 0;
height: 100%;
margin: unset !important;
border: unset !important;
padding: 0 4px;
@ -1023,6 +1022,18 @@ html body .dropdown-item.disabled {
color: var(--menu-item-arrow-color) !important;
}
body.desktop .dropdown-menu .dropdown-toggle::after {
height: 100%;
}
body.mobile .dropdown-menu .dropdown-toggle::after {
transform: rotate(90deg);
}
body.mobile .dropdown-menu .dropdown-item.submenu-open .dropdown-toggle::after {
transform: rotate(270deg);
}
/*
* Calendar
*/