smon/static/js/problems.mjs

33 lines
910 B
JavaScript
Raw Permalink Normal View History

2024-05-01 20:01:43 +02:00
export class UI {
constructor() {
const showAcked = localStorage.getItem('show_acknowledged')
if (showAcked == 'true') {
document.getElementById('show-acked').checked = true
const list = document.getElementById('acknowledged-list')
list.classList.remove('hidden')
}
}
toggleAcknowledged(evt) {
const list = document.getElementById('acknowledged-list')
if (evt.target.checked) {
list.classList.remove('hidden')
localStorage.setItem('show_acknowledged', true)
} else {
list.classList.add('hidden')
localStorage.setItem('show_acknowledged', false)
}
}
2024-05-28 12:56:35 +02:00
displayList() {
document.querySelector('.display-list').classList.remove('hidden')
document.querySelector('.display-areas').classList.add('hidden')
}
displayAreas() {
document.querySelector('.display-list').classList.add('hidden')
document.querySelector('.display-areas').classList.remove('hidden')
}
2024-05-01 20:01:43 +02:00
}