send event after toolbar is ready and after account is saved

This commit is contained in:
jelveh
2025-02-28 10:28:40 -08:00
parent b56f5c5998
commit ae9f5efed0
2 changed files with 5 additions and 0 deletions

View File

@@ -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>`);

View File

@@ -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