initial load messages

main
jerl 2023-05-29 18:28:04 -07:00
parent 5e6ce1a210
commit 767c040634
2 changed files with 3792 additions and 223 deletions

View File

@ -49,7 +49,6 @@ function addThread(thread) {
btn.onclick = () => {
chooseThread(thread);
loadMessages();
document.getElementById("loadmore").classList.remove("hidden");
if (!thread.permissions.post) {
document.getElementById("msginput").classList.add("hidden");
} else {
@ -154,7 +153,10 @@ window.onload = () => {
document.getElementById("messages").prepend(el);
}
}
if (!msg.more) document.getElementById("loadmore").classList.add("hidden");
if (!msg.more)
document.getElementById("loadmore").classList.add("hidden");
else
document.getElementById("loadmore").classList.remove("hidden");
});
window.socket.on("authenticate", (msg) => {
if (msg.success) {
@ -175,6 +177,7 @@ window.onload = () => {
else return emitter.call(window.socket, type);
};
window.socket.emit("list_threads", {});
loadMessages();
} else {
document.getElementById("register").classList.remove("hidden");
}

3566
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff