feature/refactor: smartfeeds to reduce the client complexity
This commit is contained in:
parent
46090d944a
commit
f6cd05beac
19 changed files with 782 additions and 800 deletions
|
|
@ -2,7 +2,7 @@
|
|||
document.addEventListener("topics_updated", ({ detail: { topics } }) => {
|
||||
const topic_list = document.getElementById("topic-list");
|
||||
topic_list.innerHTML = "";
|
||||
for (const topic of topics) {
|
||||
for (const topic of topics.sort((lhs, rhs) => lhs.name.localeCompare(rhs.name))) {
|
||||
topic_list.insertAdjacentHTML(
|
||||
"beforeend",
|
||||
`<li id="topic-selector-${topic.id}" class="topic" data-topic-selector-for="${topic.id}"><a href="#/topic/${topic.id}/chat">${topic.name}</a></li>`,
|
||||
|
|
@ -87,10 +87,6 @@
|
|||
|
||||
const invite_code = await invite_code_response.json();
|
||||
|
||||
console.dir({
|
||||
invite_code,
|
||||
});
|
||||
|
||||
invite_popover.innerHTML = `
|
||||
<div>
|
||||
<div class="icon close" onclick="clear_invite_popup()"></div>
|
||||
|
|
@ -608,7 +604,7 @@
|
|||
);
|
||||
|
||||
new_topic_name_input.value = "";
|
||||
window.location.hash = `/topic/${new_topic.id}`;
|
||||
window.location.hash = `/topic/${new_topic.id}/chat`;
|
||||
topic_create_form.style["height"] = "0";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue