Show a tree of wikis and docs in the wiki app.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4674 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -278,12 +278,24 @@ class TfCollectionsAppElement extends LitElement {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
${this.wiki_doc && this.wiki_doc.parent === this.wiki?.id ? html`
|
||||
<tf-wiki-doc
|
||||
whoami=${this.whoami}
|
||||
.wiki=${this.wiki}
|
||||
.value=${this.wiki_doc}></tf-wiki-doc>
|
||||
` : undefined}
|
||||
<div style="display: flex; flex-direction: row">
|
||||
<div style="flex: 0 0">
|
||||
${Object.values(this.wikis || {}).map(wiki => html`
|
||||
<div style="white-space: nowrap" @click=${() => self.on_wiki_changed({detail: {value: wiki}})}>${wiki.name}</div>
|
||||
<ul>
|
||||
${Object.values(self.wiki_docs || {}).filter(doc => doc.parent === wiki?.id).map(doc => html`
|
||||
<li style="white-space: nowrap" @click=${() => self.on_wiki_doc_changed({detail: {value: doc}})}>${doc.name}</li>
|
||||
`)}
|
||||
</ul>
|
||||
`)}
|
||||
</div>
|
||||
${this.wiki_doc && this.wiki_doc.parent === this.wiki?.id ? html`
|
||||
<tf-wiki-doc
|
||||
whoami=${this.whoami}
|
||||
.wiki=${this.wiki}
|
||||
.value=${this.wiki_doc}></tf-wiki-doc>
|
||||
` : undefined}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user