Skip to content

Commit ae9f5ef

Browse files
committed
send event after toolbar is ready and after account is saved
1 parent b56f5c5 commit ae9f5ef

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/gui/src/UI/UIDesktop.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,9 @@ async function UIDesktop(options){
11451145
// prepend toolbar to desktop
11461146
$(ht).insertBefore(el_desktop);
11471147

1148+
// send event
1149+
window.dispatchEvent(new CustomEvent('toolbar:ready'));
1150+
11481151
// notification container
11491152
$('body').append(`<div class="notification-container"><div class="notifications-close-all">${i18n('close_all')}</div></div>`);
11501153

src/gui/src/UI/UIWindowSaveAccount.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ async function UIWindowSaveAccount(options){
152152
"Authorization": "Bearer "+window.auth_token
153153
},
154154
success: async function (data){
155+
window.dispatchEvent(new CustomEvent('account-saved', { detail: { data: data} }));
156+
155157
window.update_auth_data(data.token, data.user)
156158

157159
//close this window

0 commit comments

Comments
 (0)