aboutsummaryrefslogtreecommitdiffstats
path: root/web/src
diff options
context:
space:
mode:
authorDaniel Kilimnik <mail@kilimnik.de>2025-03-25 18:46:43 +0100
committerGitHub <noreply@github.com>2025-03-25 19:46:43 +0200
commita8effa2efa0bc41173bf086742bbe615ee733091 (patch)
tree86133f163db3c88d9455be7250bca8f3f4a526c0 /web/src
parent89d3aece041c85ebe5a1ad4e620388af5227cbb0 (diff)
Save and server thumbnails locally (#88)
Fixes #83 Fixes #86 Fixes #87
Diffstat (limited to 'web/src')
-rw-r--r--web/src/index.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/web/src/index.js b/web/src/index.js
index 273ad7e..9f545b8 100644
--- a/web/src/index.js
+++ b/web/src/index.js
@@ -29,10 +29,8 @@ const params = new URLSearchParams(document.location.search)
if (params.has('config')) {
INDEX = params.get("config")
}
-// This is updated from packs/index.json
-let HOMESERVER_URL = "https://matrix-client.matrix.org"
-const makeThumbnailURL = mxc => `${HOMESERVER_URL}/_matrix/media/v3/thumbnail/${mxc.slice(6)}?height=128&width=128&method=scale`
+const makeThumbnailURL = mxc => `${PACKS_BASE_URL}/thumbnails/${mxc.split("/").slice(-1)[0]}`
// We need to detect iOS webkit because it has a bug related to scrolling non-fixed divs
// This is also used to fix scrolling to sections on Element iOS
@@ -165,7 +163,6 @@ class App extends Component {
return
}
const indexData = await indexRes.json()
- HOMESERVER_URL = indexData.homeserver_url || HOMESERVER_URL
if (indexData.giphy_api_key !== undefined) {
setGiphyAPIKey(indexData.giphy_api_key, indexData.giphy_mxc_prefix)
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage