Some fixes around drafts, and set the app icon.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4598 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
2ce5bc73d5
commit
da1d686705
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "📦",
|
||||
"previous": "&1C4JMrg9rjeS6OxHYblN7v1vNAEfDXkyRPDmnHhzPQo=.sha256"
|
||||
"emoji": "📝",
|
||||
"previous": "&CsLn1jrN7+Zztpnb3Br1yMwvmef9yQ6c090M+eT8d80=.sha256"
|
||||
}
|
@ -35,6 +35,12 @@ class TfCollectionElement extends LitElement {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (content.type !== this.type ||
|
||||
(this.parent && content.parent !== this.parent)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
content.draft = false;
|
||||
}
|
||||
if (content?.key) {
|
||||
if (content?.tombstone) {
|
||||
@ -93,8 +99,9 @@ class TfCollectionElement extends LitElement {
|
||||
if (this.visible &&
|
||||
this.visible.indexOf(message.author) != -1 &&
|
||||
JSON.parse(message.content).type == this.type) {
|
||||
let self = this;
|
||||
this.process_message(message).then(function() {
|
||||
this.collections = [...Object.values(this.by_id)];
|
||||
self.collections = [...Object.values(self.by_id)];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class TfWikiDocElement extends LitElement {
|
||||
<div style="display: inline-flex; flex-direction: row">
|
||||
<button ?disabled=${!this.whoami || this.is_editing} @click=${() => self.is_editing = true}>Edit</button>
|
||||
<button ?disabled=${this.blob == this.blob_original} @click=${this.on_save_draft}>Save Draft</button>
|
||||
<button ?disabled=${this.blob == this.blob_original} @click=${this.on_publish}>Publish</button>
|
||||
<button ?disabled=${this.blob == this.blob_original && !this.value?.draft} @click=${this.on_publish}>Publish</button>
|
||||
<button ?disabled=${!this.is_editing} @click=${this.on_discard}>Discard</button>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: row">
|
||||
|
Loading…
Reference in New Issue
Block a user