From 719b9f21f00856682b7279a7e33e0cd34514552a Mon Sep 17 00:00:00 2001 From: Bastard Operator Date: Tue, 29 Dec 2020 16:13:04 +0100 Subject: [PATCH] Improved message send on chat feature + caching and UI improvements --- src/routes/_actions/compose.js | 4 ++ src/routes/_api/statuses.js | 3 - src/routes/_layout.html | 2 +- static/fedilove-no-react.js | 117 ++++++++++++++++++--------------- 4 files changed, 70 insertions(+), 56 deletions(-) diff --git a/src/routes/_actions/compose.js b/src/routes/_actions/compose.js index f7d74164..8060c390 100644 --- a/src/routes/_actions/compose.js +++ b/src/routes/_actions/compose.js @@ -103,3 +103,7 @@ export function setReplyVisibility (realm, replyVisibility) { : defaultVisibility store.setComposeData(realm, { postPrivacy: visibility }) } + +if (typeof window !== "undefined") { + window.fediloveFunctions.postStatus = postStatus; +} diff --git a/src/routes/_api/statuses.js b/src/routes/_api/statuses.js index 708d7eb2..a2409cf9 100644 --- a/src/routes/_api/statuses.js +++ b/src/routes/_api/statuses.js @@ -5,9 +5,6 @@ export async function postStatus (instanceName, accessToken, text, inReplyToId, sensitive, spoilerText, visibility, poll) { const url = `${basename(instanceName)}/api/v1/statuses` - // hack to override toots text :) - text = $('textarea#the-compose-box-input-'+inReplyToId).val(); - const body = { status: text, in_reply_to_id: inReplyToId, diff --git a/src/routes/_layout.html b/src/routes/_layout.html index 13ebc80a..358b2f84 100644 --- a/src/routes/_layout.html +++ b/src/routes/_layout.html @@ -15,7 +15,7 @@ -