mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-09 22:51:29 -06:00
Add chevron rotation for user menu toggle
This commit is contained in:
@@ -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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user