tabbar-element, thread-summary-element: small fixes
This commit is contained in:
parent
89135d0399
commit
67ec0e1809
2 changed files with 8 additions and 5 deletions
|
@ -75,7 +75,7 @@ export class TabBarElement extends HTMLElement {
|
|||
return ()=>{
|
||||
let x = util.$("mainarea_injectparent");
|
||||
if (x) {
|
||||
x.innerHTML = `<underbbs-adapter id="adapter_${adapter}" data-name="${adapter}"></underbbs-adapter>`;
|
||||
x.innerHTML = `<underbbs-adapter id="adapter_${adapter}" data-name="${adapter}" data-view=""></underbbs-adapter>`;
|
||||
self.setAttribute("data-currentadapter", adapter);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,17 +15,19 @@ export class ThreadSummaryElement extends HTMLElement {
|
|||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
this.innerHTML = "<div class='thread_summary'><div class='thread_author'></div><div class='thread_text'></div><div class='thread_metadata'></div></div>"
|
||||
this.innerHTML = "<div class='thread_summary'><div class='thread_author'></div><div class='thread_text'></div><div class='thread_metadata'></div></div>"
|
||||
|
||||
// adapter shouldn't change, just set it here
|
||||
this._adapter = this.getAttribute("data-adapter") ?? "";
|
||||
this.addEventListener("click", this.viewThread(this), false);
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
|
||||
}
|
||||
|
||||
attributeChangedCallback(attr: string, prev: string, next: string) {
|
||||
|
||||
const datastore = AdapterState._instance.data.get(this._adapter);
|
||||
if (!datastore) {
|
||||
return;
|
||||
|
@ -44,6 +46,7 @@ export class ThreadSummaryElement extends HTMLElement {
|
|||
if (threadText) {
|
||||
threadText.innerHTML = this._msg.content;
|
||||
}
|
||||
this.setAttribute("data-author", this._msg.author);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue