Quellcode durchsuchen

Finish function for resending verification link

tags/v0.1.0
Immanuel Onyeka vor 3 Jahren
Ursprung
Commit
2696110cc2
2 geänderte Dateien mit 19 neuen und 6 gelöschten Zeilen
  1. +18
    -6
      resources/js/main.js
  2. +1
    -0
      resources/scss/main.scss

+ 18
- 6
resources/js/main.js Datei anzeigen

@@ -33,24 +33,36 @@ function login(event) {
fetch("/login", {
method: 'POST',
headers: {'Content-Type': 'application/json',
'Accept': 'application/json',
'X-XSRF-TOKEN': token},
body: JSON.stringify({"email":
document.getElementById("login_email").value,
"password": document.getElementById("login_password").value}),
}).then(response => {
console.log(response.json())
console.log(response.ok)
console.log(response.status)
console.log(response.statusText)
if (response.ok) {

}
})
event.preventDefault();
}

//Attempt to resend the verification link
function resendLink(event) {
console.log("clicked");
fetch("/resend-verification", {
method: 'POST',
headers: {'Content-Type': 'application/json',
'Accept': 'application/json',
'X-XSRF-TOKEN': token},
}).then(response => {
if (response.ok) {
event.target.parentNode.getElementsByTagName('h3')[0].innerText =
"The link has been resent."
} else {
event.target.parentNode.getElementsByTagName('h3')[0].innerText =
`${response.status} : ${response.statusText}`
}
})
event.preventDefault();

}

function toggleNav() {


+ 1
- 0
resources/scss/main.scss Datei anzeigen

@@ -649,6 +649,7 @@ div.register-area.active {
}

.info-heading {
text-align: center;
margin-top: 3em;
margin-left: auto;
margin-right: auto;


Laden…
Abbrechen
Speichern