mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Merge branch 'master' of gitlab.com:MrFry/mrfrys-node-server into master
This commit is contained in:
commit
c846d2591e
3 changed files with 89 additions and 19 deletions
|
@ -65,6 +65,9 @@
|
|||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.disabledButton {
|
||||
background-color: #999999;
|
||||
}
|
||||
.ircLinkContainer {
|
||||
display: flex;
|
||||
justify-content: flex-end
|
||||
|
@ -90,6 +93,7 @@
|
|||
<div class='title'>
|
||||
Frylabs
|
||||
</div>
|
||||
<div id='text' class='text'></div>
|
||||
<div id='feedback'>
|
||||
<textarea placeholder='Feedback' id='feedbackTextArea'></textarea>
|
||||
<div class='ircLinkContainer' >
|
||||
|
@ -162,17 +166,22 @@
|
|||
document.getElementById('text').innerText = 'Ha szeretnél választ kapni akkor kérdésed mellé írd be e-mailed, vagy kattints a lenti "IRC" linkre. Jelszót meglévő felhasználóktól kérj! E-mail esetén válasz spam-be is érkezhet!'
|
||||
}
|
||||
function HandleResp (resp) {
|
||||
document.getElementById('sendButton').innerText = 'Login'
|
||||
const button = document.getElementById('sendButton')
|
||||
button.innerText = 'Login'
|
||||
const textNode = document.getElementById('text')
|
||||
if (resp.result === 'success') {
|
||||
location.reload()
|
||||
textNode.innerText = resp.msg
|
||||
} else {
|
||||
textNode.innerText = resp.msg
|
||||
button.disabled = false
|
||||
button.classList.remove('disabledButton')
|
||||
}
|
||||
}
|
||||
async function Login(button) {
|
||||
button.innerText = '...'
|
||||
button.classList.add('disabledButton')
|
||||
button.disabled = true
|
||||
const rawResponse = await fetch('<%= devel? 'http' : 'https' %>://api.frylabs.net/login', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue