mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
chore: Clarify usage of window fields in UIWindowDesktopBGSettings.js
/puter/src/UI/UIWindowDesktopBGSettings.js 168:26 error 'api_origin' is not defined no-undef 178:52 error 'auth_token' is not defined no-undef 182:29 error 'logout' is not defined no-undef 188:24 error Empty block statement no-empty
This commit is contained in:
parent
dea3bc1a7f
commit
93e13cdb06
@ -165,7 +165,7 @@ async function UIWindowDesktopBGSettings(options){
|
|||||||
// /set-desktop-bg
|
// /set-desktop-bg
|
||||||
try{
|
try{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: api_origin + "/set-desktop-bg",
|
url: window.api_origin + "/set-desktop-bg",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
url: window.desktop_bg_url,
|
url: window.desktop_bg_url,
|
||||||
@ -175,17 +175,18 @@ async function UIWindowDesktopBGSettings(options){
|
|||||||
async: true,
|
async: true,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": "Bearer "+auth_token
|
"Authorization": "Bearer "+window.auth_token
|
||||||
},
|
},
|
||||||
statusCode: {
|
statusCode: {
|
||||||
401: function () {
|
401: function () {
|
||||||
logout();
|
window.logout();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
$(el_window).close();
|
$(el_window).close();
|
||||||
resolve(true);
|
resolve(true);
|
||||||
}catch(err){
|
}catch(err){
|
||||||
|
// Ignore
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user