Add chevron rotation for user menu toggle

This commit is contained in:
jelveh
2025-12-09 22:28:37 -08:00
parent de67d25baf
commit 00f3699335
2 changed files with 14 additions and 1 deletions

View File

@@ -146,6 +146,7 @@ async function UIDashboard (options) {
// User options button click handler
$el_window.on('click', '.dashboard-user-btn', function (e) {
const $btn = $(this);
const $chevron = $btn.find('.dashboard-user-chevron');
const pos = this.getBoundingClientRect();
// Don't open if already open
@@ -153,6 +154,9 @@ async function UIDashboard (options) {
return;
}
// Rotate chevron to point upwards
$chevron.addClass('open');
let items = [];
// Save Session (if temp user)
@@ -275,7 +279,11 @@ async function UIDashboard (options) {
top: pos.top - 8,
left: pos.left
},
items: menuItems
items: menuItems,
onClose: () => {
// Rotate chevron back to point downwards
$chevron.removeClass('open');
}
});
});

View File

@@ -5626,6 +5626,11 @@ html.dark-mode .usage-table-show-less:hover {
height: 16px;
color: #888;
flex-shrink: 0;
transition: transform 0.1s ease;
}
.dashboard-user-chevron.open {
transform: rotate(180deg);
}
.dashboard-content {