Init -- well, everything.

This commit is contained in:
oitsjustjose 2020-07-03 21:55:53 -05:00
commit 4645561d33
9 changed files with 352 additions and 0 deletions

View 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()
}