diff options
| author | Daniel Kilimnik <mail@kilimnik.de> | 2025-03-25 18:46:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-25 19:46:43 +0200 |
| commit | a8effa2efa0bc41173bf086742bbe615ee733091 (patch) | |
| tree | 86133f163db3c88d9455be7250bca8f3f4a526c0 /web | |
| parent | 89d3aece041c85ebe5a1ad4e620388af5227cbb0 (diff) | |
Save and server thumbnails locally (#88)
Fixes #83
Fixes #86
Fixes #87
Diffstat (limited to 'web')
| -rw-r--r-- | web/src/index.js | 5 |
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) } |
