mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Update initgui.js
This commit is contained in:
parent
27ec2d7f1c
commit
61961b565e
@ -228,20 +228,33 @@ window.initgui = async function(options){
|
|||||||
"method": "POST",
|
"method": "POST",
|
||||||
}).then(response => response.json())
|
}).then(response => response.json())
|
||||||
.then(async data => {
|
.then(async data => {
|
||||||
|
// Show register screen
|
||||||
if(data.email && data.email !== window.user.email){
|
if(data.email && data.email !== window.user.email){
|
||||||
await UIWindowLogin({
|
await UIWindowSignup({
|
||||||
reload_on_success: true,
|
reload_on_success: true,
|
||||||
send_confirmation_code: false,
|
send_confirmation_code: false,
|
||||||
window_options:{
|
window_options:{
|
||||||
has_head: false
|
has_head: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}
|
||||||
UIAlert({
|
// Show email confirmation screen
|
||||||
type: 'success',
|
else if(data.email && data.email === window.user.email && !window.user.email_confirmed){
|
||||||
message: 'You are authorized to view this link.'
|
// todo show email confirmation window
|
||||||
|
await UIWindowEmailConfirmationRequired({
|
||||||
|
stay_on_top: true,
|
||||||
|
has_head: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// show shared item
|
||||||
|
UIWindow({
|
||||||
|
path: data.path,
|
||||||
|
title: path.basename(data.path),
|
||||||
|
icon: await item_icon({is_dir: data.is_dir, path: data.path}),
|
||||||
|
is_dir: data.is_dir,
|
||||||
|
app: 'explorer',
|
||||||
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user