forked from Adleraci/adlerka.top
Fix login
This commit is contained in:
parent
9db95d6e1f
commit
554d2d93cb
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
function doAccountAction(requestData, successMessage, failureMessage, silent=false) {
|
function doAccountAction(requestData, successMessage, failureMessage, silent=false) {
|
||||||
return fetch('/account', {
|
return fetch('/account', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -125,6 +126,12 @@ function navigateTo(site, page){
|
|||||||
data.append("site", site);
|
data.append("site", site);
|
||||||
data.append("page", page);
|
data.append("page", page);
|
||||||
doPageAction(data);
|
doPageAction(data);
|
||||||
|
pageData.currentSite = site;
|
||||||
|
pageData.currentPage = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
function softReload(){
|
||||||
|
navigateTo(pageData.currentSite, pageData.currentPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshNavbar(){
|
function refreshNavbar(){
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
const email = document.getElementById("login_email").value;
|
const email = document.getElementById("login_email").value;
|
||||||
const password = document.getElementById("login_password").value;
|
const password = document.getElementById("login_password").value;
|
||||||
doLogin(email, password);
|
doLogin(email, password);
|
||||||
|
refreshNavbar();
|
||||||
|
softReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function doLogin(email, password) {
|
function doLogin(email, password) {
|
||||||
|
Loading…
Reference in New Issue
Block a user