mirror of
https://github.com/HeyPuter/puter.git
synced 2026-02-20 21:48:37 -06:00
Added "Toggling apps to minimize once it clicked" #944 feature
This commit is contained in:
@@ -73,8 +73,16 @@ function UITaskbarItem(options){
|
||||
return;
|
||||
|
||||
if(options.onClick === undefined || options.onClick(el_taskbar_item) === false){
|
||||
const clicked_window = $(`.window[data-app="${options.app}"]`)
|
||||
|
||||
// hide window, unless there's more than one in app group
|
||||
if (clicked_window.hasClass("window-active") && clicked_window.length < 2) {
|
||||
clicked_window.hideWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
// re-show each window in this app group
|
||||
$(`.window[data-app="${options.app}"]`).showWindow();
|
||||
clicked_window.showWindow();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user