Skip to content

Commit

Permalink
send event after toolbar is ready and after account is saved
Browse files Browse the repository at this point in the history
  • Loading branch information
jelveh committed Feb 28, 2025
1 parent b56f5c5 commit ae9f5ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/src/UI/UIDesktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,9 @@ async function UIDesktop(options){
// prepend toolbar to desktop
$(ht).insertBefore(el_desktop);

// send event
window.dispatchEvent(new CustomEvent('toolbar:ready'));

// notification container
$('body').append(`<div class="notification-container"><div class="notifications-close-all">${i18n('close_all')}</div></div>`);

Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/UI/UIWindowSaveAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ async function UIWindowSaveAccount(options){
"Authorization": "Bearer "+window.auth_token
},
success: async function (data){
window.dispatchEvent(new CustomEvent('account-saved', { detail: { data: data} }));

window.update_auth_data(data.token, data.user)

//close this window
Expand Down

0 comments on commit ae9f5ef

Please sign in to comment.