From 8c6a701d6f16c22b8001bbca3d5e0e69d9039bf8 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 22 Aug 2019 09:09:21 -0700 Subject: [PATCH] fix: ensure "disable blurhash" setting is honored (#1422) * fix: ensure "disable blurhash" setting is honored fixes #1421 * remove play button for audio/video --- package.json | 3 +- src/routes/_components/NonAutoplayGifv.html | 2 +- src/routes/_components/status/Media.html | 25 ++++--- .../_components/status/MediaAttachments.html | 6 +- .../status/StatusMediaAttachments.html | 66 ++++--------------- src/routes/_utils/blurhash.js | 1 - .../_utils/convertCssPropertyToDataUrl.js | 22 +++++++ 7 files changed, 57 insertions(+), 68 deletions(-) create mode 100644 src/routes/_utils/convertCssPropertyToDataUrl.js diff --git a/package.json b/package.json index 6e8ab0de..b3df248f 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,8 @@ "MessageChannel", "ImageData", "OffscreenCanvas", - "postMessage" + "postMessage", + "getComputedStyle" ], "ignore": [ "dist", diff --git a/src/routes/_components/NonAutoplayGifv.html b/src/routes/_components/NonAutoplayGifv.html index 722cf716..69571019 100644 --- a/src/routes/_components/NonAutoplayGifv.html +++ b/src/routes/_components/NonAutoplayGifv.html @@ -17,7 +17,7 @@ alt={label || ''} title={label || ''} src={staticSrc} - blurhash={blurhash} + {blurhash} fallback={oneTransparentPixel} {width} {height} diff --git a/src/routes/_components/status/Media.html b/src/routes/_components/status/Media.html index 12a49efd..440c809d 100644 --- a/src/routes/_components/status/Media.html +++ b/src/routes/_components/status/Media.html @@ -1,4 +1,4 @@ -{#if (type === 'video' && !blurhash) || type === 'audio'} +{#if !blurhash && (type === 'video' || type === 'audio')}