Compare commits
2 Commits
574292b798
...
85b46336b1
Author | SHA1 | Date | |
---|---|---|---|
85b46336b1 | |||
590afa7b01 |
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🐌",
|
"emoji": "🐌",
|
||||||
"previous": "&z0N6jlqflRd4+grj16K/IdllNVLQrPLbr7aKVs/21mE=.sha256"
|
"previous": "&TqpkOAi38Oi6gW6guh95KIvWY2M/vjBE8NLLNHK+M00=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -76,15 +76,9 @@ class TfComposeElement extends LitElement {
|
|||||||
let preview = this.renderRoot.getElementById('preview');
|
let preview = this.renderRoot.getElementById('preview');
|
||||||
preview.innerHTML = this.process_text(edit.innerText);
|
preview.innerHTML = this.process_text(edit.innerText);
|
||||||
let content_warning = this.renderRoot.getElementById('content_warning');
|
let content_warning = this.renderRoot.getElementById('content_warning');
|
||||||
let content_warning_preview = this.renderRoot.getElementById(
|
|
||||||
'content_warning_preview'
|
|
||||||
);
|
|
||||||
if (content_warning && content_warning_preview) {
|
|
||||||
content_warning_preview.innerText = content_warning.value;
|
|
||||||
}
|
|
||||||
let draft = this.get_draft();
|
let draft = this.get_draft();
|
||||||
draft.text = edit.innerText;
|
draft.text = edit.innerText;
|
||||||
draft.content_warning = content_warning?.innerText;
|
draft.content_warning = content_warning?.value;
|
||||||
setTimeout(() => this.notify(draft), 0);
|
setTimeout(() => this.notify(draft), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,12 +215,8 @@ class TfComposeElement extends LitElement {
|
|||||||
console.log('encrypted as', message);
|
console.log('encrypted as', message);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await tfrpc.rpc.appendMessage(this.whoami, message).then(function () {
|
await tfrpc.rpc.appendMessage(this.whoami, message);
|
||||||
edit.innerText = '';
|
self.notify(undefined);
|
||||||
self.input();
|
|
||||||
self.notify(undefined);
|
|
||||||
self.requestUpdate();
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
alert(error.message);
|
alert(error.message);
|
||||||
}
|
}
|
||||||
@ -459,7 +449,7 @@ class TfComposeElement extends LitElement {
|
|||||||
<input type="checkbox" class="w3-check w3-theme-d1" id="cw" @change=${() => self.set_content_warning(undefined)} checked="checked"></input>
|
<input type="checkbox" class="w3-check w3-theme-d1" id="cw" @change=${() => self.set_content_warning(undefined)} checked="checked"></input>
|
||||||
<label for="cw">CW</label>
|
<label for="cw">CW</label>
|
||||||
</p>
|
</p>
|
||||||
<input type="text" class="w3-input w3-border w3-theme-d1" id="content_warning" placeholder="Enter a content warning here." @input=${this.input} @change=${this.change} value=${draft.content_warning}></input>
|
<input type="text" class="w3-input w3-border w3-theme-d1" id="content_warning" placeholder="Enter a content warning here." @input=${self.input} value=${draft.content_warning}></input>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user