diff --git a/apps/wiki.json b/apps/wiki.json index 11a3dee8..abd17ed7 100644 --- a/apps/wiki.json +++ b/apps/wiki.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "📝", - "previous": "&OpEjJ6ZLsIabI1SOzLymRGKlwy2Q6YUI+I3JW5cR7nA=.sha256" + "previous": "&IJPpdyG/+rYiBwT0loE38hisCHZ2T/i7lpA3a2+wBgA=.sha256" } \ No newline at end of file diff --git a/apps/wiki/tf-collections-app.js b/apps/wiki/tf-collections-app.js index 90f20ae0..d8605374 100644 --- a/apps/wiki/tf-collections-app.js +++ b/apps/wiki/tf-collections-app.js @@ -1,4 +1,4 @@ -import {LitElement, html} from './lit-all.min.js'; +import {LitElement, html, keyed} from './lit-all.min.js'; import * as tfrpc from '/static/tfrpc.js'; class TfCollectionsAppElement extends LitElement { @@ -50,7 +50,6 @@ class TfCollectionsAppElement extends LitElement { } async read_wiki_docs() { - console.log('read_wiki_docs', this.wiki?.id); if (!this.wiki?.id) { return; } @@ -91,11 +90,9 @@ class TfCollectionsAppElement extends LitElement { update_wiki_doc() { let want_wiki_doc = this.hash_wiki_doc(); - console.log('looking for', want_wiki_doc); for (let wiki_doc of Object.values(this.wiki_docs ?? {})) { if (wiki_doc.name === want_wiki_doc) { this.wiki_doc = wiki_doc; - console.log('setting', wiki_doc.name); } } } @@ -119,6 +116,7 @@ class TfCollectionsAppElement extends LitElement { async on_wiki_changed(event) { this.wiki = event.detail.value; this.wiki_doc = undefined; + this.wiki_docs = undefined; this.update_hash(); this.read_wiki_docs(); } @@ -157,10 +155,10 @@ class TfCollectionsAppElement extends LitElement { .collection=${this.wikis} selected_id=${this.wiki?.id} @change=${this.on_wiki_changed}> - + @change=${this.on_wiki_doc_changed}>`)} ${this.wiki_doc && this.wiki_doc.parent === this.wiki?.id ? html`