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 ()=>{
|
return ()=>{
|
||||||
let x = util.$("mainarea_injectparent");
|
let x = util.$("mainarea_injectparent");
|
||||||
if (x) {
|
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);
|
self.setAttribute("data-currentadapter", adapter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,17 +15,19 @@ export class ThreadSummaryElement extends HTMLElement {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
this.innerHTML = "<div class='thread_summary'><div class='thread_author'></div><div class='thread_text'></div><div class='thread_metadata'></div></div>"
|
||||||
|
|
||||||
connectedCallback() {
|
|
||||||
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
|
// adapter shouldn't change, just set it here
|
||||||
this._adapter = this.getAttribute("data-adapter") ?? "";
|
this._adapter = this.getAttribute("data-adapter") ?? "";
|
||||||
this.addEventListener("click", this.viewThread(this), false);
|
this.addEventListener("click", this.viewThread(this), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connectedCallback() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
attributeChangedCallback(attr: string, prev: string, next: string) {
|
attributeChangedCallback(attr: string, prev: string, next: string) {
|
||||||
|
|
||||||
const datastore = AdapterState._instance.data.get(this._adapter);
|
const datastore = AdapterState._instance.data.get(this._adapter);
|
||||||
if (!datastore) {
|
if (!datastore) {
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +46,7 @@ export class ThreadSummaryElement extends HTMLElement {
|
||||||
if (threadText) {
|
if (threadText) {
|
||||||
threadText.innerHTML = this._msg.content;
|
threadText.innerHTML = this._msg.content;
|
||||||
}
|
}
|
||||||
|
this.setAttribute("data-author", this._msg.author);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue