Init -- well, everything.
This commit is contained in:
parent
0b2fa17341
commit
4645561d33
9 changed files with 352 additions and 0 deletions
21
src/public/Custom/js/login.js
Normal file
21
src/public/Custom/js/login.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
window.addEventListener('load', () => {
|
||||
const queries = new URLSearchParams(location.search)
|
||||
if (queries.has('error')) {
|
||||
makeNotification('Failed to Log In', `
|
||||
Failed to log you in! Confirm that your username and
|
||||
password are correct or contact your administration
|
||||
if you do not have an account.
|
||||
`)
|
||||
}
|
||||
|
||||
history.replaceState(null, '', location.href.replace('?error', ''))
|
||||
})
|
||||
|
||||
const makeNotification = (title, contents) => {
|
||||
const modal = document.getElementById('notification')
|
||||
|
||||
modal.querySelector('.modal-title').innerHTML = title
|
||||
modal.querySelector('.modal-body').innerHTML = contents
|
||||
|
||||
new bootstrap.Modal(modal).show()
|
||||
}
|
||||
Loading…
Reference in a new issue