File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ function UITaskbarItem(options){
30
30
options . open_windows_count = options . open_windows_count ?? 0 ;
31
31
options . lock_keep_in_taskbar = options . lock_keep_in_taskbar ?? false ;
32
32
options . append_to_taskbar = options . append_to_taskbar ?? true ;
33
+ options . before_trash = options . before_trash ?? false ;
34
+
33
35
const element_id = window . global_element_id ++ ;
34
36
35
37
h += `<div class = "taskbar-item ${ options . sortable ? 'taskbar-item-sortable' : '' } disable-user-select"
@@ -57,10 +59,15 @@ function UITaskbarItem(options){
57
59
h += `<span class="active-taskbar-indicator"></span>` ;
58
60
h += `</div>` ;
59
61
60
- if ( options . append_to_taskbar )
61
- $ ( '.taskbar' ) . append ( h ) ;
62
- else
62
+ if ( options . append_to_taskbar ) {
63
+ if ( options . before_trash ) {
64
+ $ ( '.taskbar-item[data-app="trash"]' ) . before ( h ) ;
65
+ } else {
66
+ $ ( '.taskbar' ) . append ( h ) ;
67
+ }
68
+ } else {
63
69
$ ( 'body' ) . prepend ( h ) ;
70
+ }
64
71
65
72
const el_taskbar_item = document . querySelector ( `#taskbar-item-${ tray_item_id } ` ) ;
66
73
Original file line number Diff line number Diff line change @@ -478,6 +478,7 @@ async function UIWindow(options) {
478
478
name : options . title ,
479
479
app : options . app ,
480
480
open_windows_count : 1 ,
481
+ before_trash : true ,
481
482
onClick : function ( ) {
482
483
let open_window_count = parseInt ( $ ( `.taskbar-item[data-app="${ options . app } "]` ) . attr ( 'data-open-windows' ) ) ;
483
484
if ( open_window_count === 0 ) {
You can’t perform that action at this time.
0 commit comments