mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-09 23:43:16 +00:00
Enforce email confirmation via GUI for deploying workers
This commit is contained in:
1 parent
ab8cdb2d57
commit
0d6423a8b1
1 file changed
+13
@@ -1145,6 +1145,19 @@ function UIItem(options){
|
||||
menu_items.push({
|
||||
html: i18n('publish_as_serverless_worker'),
|
||||
onClick: async function(){
|
||||
if(window.user.is_temp &&
|
||||
!await UIWindowSaveAccount({
|
||||
send_confirmation_code: true,
|
||||
message: 'Please create an account to proceed.',
|
||||
window_options: {
|
||||
backdrop: true,
|
||||
close_on_backdrop_click: false,
|
||||
}
|
||||
}))
|
||||
return;
|
||||
else if(!window.user.email_confirmed && !await UIWindowEmailConfirmationRequired())
|
||||
return;
|
||||
|
||||
UIWindowPublishWorker(options.uid, $(el_item).attr('data-name'), $(el_item).attr('data-path'));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user