mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-16 18:57:09 +00:00
send event after toolbar is ready and after account is saved
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
This commit is contained in:
1 parent
b56f5c5998
commit
ae9f5efed0
2 files changed
+5
No files matched your search
@@ -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