File tree 3 files changed +19
-6
lines changed
3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,26 @@ async function UIWindowLoginInProgress(options){
23
23
return new Promise ( async ( resolve ) => {
24
24
options = options ?? { } ;
25
25
26
- let h = '' ;
26
+ // get the profile picture of the user
27
+ let profile_pic
28
+
29
+ if ( options . user_info ?. username ) {
30
+ profile_pic = await get_profile_picture ( options . user_info ?. username ) ;
31
+ }
32
+
33
+ if ( ! profile_pic ) {
34
+ profile_pic = window . icons [ 'profile.svg' ]
35
+ }
36
+
37
+ let h = '' ;
27
38
h += `<div class="login-progress">` ;
39
+ h += `<div class="profile-pic" style="background-color: #cecece; background-image: url('${ profile_pic } '); width: 70px; height: 70px; background-position: center; background-size: cover; border-radius: 50px; margin-bottom: 15px; margin-top: 40px;"></div>` ;
28
40
h += `<h1 style="text-align: center;
29
- font-size: 20px ;
41
+ font-size: 17px ;
30
42
padding: 10px;
31
- font-weight: 300; margin: -10px 10px 20px 10px;">Logging in as <strong>${ options . user_info . email === null ? options . user_info . username : options . user_info . email } </strong></h1>` ;
43
+ font-weight: 300; margin: -10px 10px 4px 10px;">Logging in as <strong>${ options . user_info . email === null ? options . user_info . username : options . user_info . email } </strong></h1>` ;
32
44
// spinner
33
- h += `<svg style="float:left; margin-right: 7px;" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"><title>circle anim</title><g fill="#212121" class="nc-icon-wrapper"><g class="nc-loop-circle-24-icon-f"><path d="M12 24a12 12 0 1 1 12-12 12.013 12.013 0 0 1-12 12zm0-22a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2z" fill="#212121" opacity=".4"></path><path d="M24 12h-2A10.011 10.011 0 0 0 12 2V0a12.013 12.013 0 0 1 12 12z" data-color="color-2"></path></g><style>.nc-loop-circle-24-icon-f{--animation-duration:0.5s;transform-origin:12px 12px;animation:nc-loop-circle-anim var(--animation-duration) infinite linear}@keyframes nc-loop-circle-anim{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}</style></g></svg>` ;
45
+ h += `<svg style="float:left; margin-right: 7px; margin-bottom: 30px; " xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"><title>circle anim</title><g fill="#212121" class="nc-icon-wrapper"><g class="nc-loop-circle-24-icon-f"><path d="M12 24a12 12 0 1 1 12-12 12.013 12.013 0 0 1-12 12zm0-22a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2z" fill="#212121" opacity=".4"></path><path d="M24 12h-2A10.011 10.011 0 0 0 12 2V0a12.013 12.013 0 0 1 12 12z" data-color="color-2"></path></g><style>.nc-loop-circle-24-icon-f{--animation-duration:0.5s;transform-origin:12px 12px;animation:nc-loop-circle-anim var(--animation-duration) infinite linear}@keyframes nc-loop-circle-anim{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}</style></g></svg>` ;
34
46
35
47
h += `</div>` ;
36
48
Original file line number Diff line number Diff line change @@ -3187,7 +3187,6 @@ fieldset[name=number-code] {
3187
3187
}
3188
3188
3189
3189
.login-progress {
3190
- height : 200px ;
3191
3190
display : flex;
3192
3191
flex-direction : column;
3193
3192
justify-content : center;
@@ -4455,7 +4454,7 @@ fieldset[name=number-code] {
4455
4454
4456
4455
}
4457
4456
4458
- .device-phone .window .window-qr , .device-phone .window .window-progress {
4457
+ .device-phone .window .window-qr , .device-phone .window .window-progress , . device-phone . window . window-login-progress {
4459
4458
left : 50% !important ;
4460
4459
transform : translate (-50% ) !important ;
4461
4460
height : initial !important ;
Original file line number Diff line number Diff line change @@ -393,6 +393,8 @@ window.initgui = async function(options){
393
393
else if ( window . url_query_params . has ( 'auth_token' ) ) {
394
394
let query_param_auth_token = window . url_query_params . get ( 'auth_token' ) ;
395
395
396
+ puter . setAuthToken ( query_param_auth_token ) ;
397
+
396
398
try {
397
399
whoami = await puter . os . user ( ) ;
398
400
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments