mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-05 20:50:22 -06:00
chore: Clarify usage of window fields in UIWindowSessionList.js
/puter/src/UI/UIWindowSessionList.js 33:117 error 'icons' is not defined no-undef 34:41 error 'logged_in_users' is not defined no-undef 35:32 error 'logged_in_users' is not defined no-undef 134:36 error 'logged_in_users' is not defined no-undef 141:17 error 'update_auth_data' is not defined no-undef
This commit is contained in:
@@ -30,9 +30,9 @@ async function UIWindowSessionList(options){
|
||||
h += `<div style="margin:10px;">`;
|
||||
h += `<div class="loading">${i18n('signing_in')}</div>`
|
||||
h += `<div style="overflow-y: scroll; max-width: 400px; margin: 0 auto;">`;
|
||||
h += `<h1 style="text-align: center; font-size: 18px; font-weight: normal; color: #757575;"><img src="${icons['logo-white.svg']}" style="padding: 4px; background-color: blue; border-radius: 5px; width: 25px; box-sizing: border-box; margin-bottom: -6px; margin-right: 6px;">${i18n('sign_in_with_puter')}</h1>`
|
||||
for (let index = 0; index < logged_in_users.length; index++) {
|
||||
const l_user = logged_in_users[index];
|
||||
h += `<h1 style="text-align: center; font-size: 18px; font-weight: normal; color: #757575;"><img src="${window.icons['logo-white.svg']}" style="padding: 4px; background-color: blue; border-radius: 5px; width: 25px; box-sizing: border-box; margin-bottom: -6px; margin-right: 6px;">${i18n('sign_in_with_puter')}</h1>`
|
||||
for (let index = 0; index < window.logged_in_users.length; index++) {
|
||||
const l_user = window.logged_in_users[index];
|
||||
h += `<div data-uuid="${l_user.uuid}" class="session-entry">${l_user.username}</div>`;
|
||||
}
|
||||
h += `</div>`;
|
||||
@@ -131,14 +131,14 @@ async function UIWindowSessionList(options){
|
||||
let selected_uuid = $(this).attr('data-uuid');
|
||||
let selected_user;
|
||||
for (let index = 0; index < window.logged_in_users.length; index++) {
|
||||
const l_user = logged_in_users[index];
|
||||
const l_user = window.logged_in_users[index];
|
||||
if(l_user.uuid === selected_uuid){
|
||||
selected_user = l_user;
|
||||
}
|
||||
}
|
||||
|
||||
// new logged in user
|
||||
update_auth_data(selected_user.auth_token, selected_user);
|
||||
window.update_auth_data(selected_user.auth_token, selected_user);
|
||||
if(options.reload_on_success){
|
||||
// disable native browser exit confirmation
|
||||
window.onbeforeunload = null;
|
||||
|
||||
Reference in New Issue
Block a user