Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-pain-bache committed Nov 2, 2024
1 parent a8c5bd0 commit a9823a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/homePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ export async function renderHomePage (request, env, proxySettings, isPassSet) {
const errorMessage = await response.text();
console.error(errorMessage, response.status);
alert('⚠️ An error occured, Please try again!\\n⛔ ' + errorMessage);
return;
}
alert('✅ Panel settings reset to default successfully! 😎');
window.location.reload(true);
Expand Down Expand Up @@ -1239,6 +1240,7 @@ export async function renderHomePage (request, env, proxySettings, isPassSet) {
const errorMessage = await response.text();
console.error(errorMessage, response.status);
alert('⚠️ An error occured, Please try again!\\n⛔ ' + errorMessage);
return;
}
${isWarpPlus
? `alert('✅ Warp configs upgraded to PLUS successfully! 😎');`
Expand Down Expand Up @@ -1449,7 +1451,10 @@ export async function renderHomePage (request, env, proxySettings, isPassSet) {
credentials: 'same-origin'
});
if (!response.ok) console.error('Failed to log out:', response.status);
if (!response.ok) {
console.error('Failed to log out:', response.status);
return;
}
window.location.href = '/login';
} catch (error) {
console.error('Error:', error);
Expand Down
1 change: 1 addition & 0 deletions src/pages/loginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export async function renderLoginPage (request, env) {
passwordError.textContent = '⚠️ Wrong Password!';
const errorMessage = await response.text();
console.error('Login failed:', errorMessage);
return;
}
window.location.href = '/panel';
} catch (error) {
Expand Down

0 comments on commit a9823a2

Please sign in to comment.