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,9 +15,6 @@ export class ThreadSummaryElement extends HTMLElement {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
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
|
// adapter shouldn't change, just set it here
|
||||||
|
@ -25,7 +22,12 @@ export class ThreadSummaryElement extends HTMLElement {
|
||||||
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