mirror of
https://github.com/HeyPuter/puter.git
synced 2025-12-30 17:50:00 -06:00
send event after toolbar is ready and after account is saved
This commit is contained in:
@@ -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>`);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user