From d12b39963b6eed2774186c2a9e4eb80325838088 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 11 Feb 2018 22:59:33 -0800 Subject: [PATCH] fix layout issue with blocked media --- routes/_components/status/Media.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routes/_components/status/Media.html b/routes/_components/status/Media.html index f5f907a1..5d3416d6 100644 --- a/routes/_components/status/Media.html +++ b/routes/_components/status/Media.html @@ -51,7 +51,7 @@ on:imgLoad="set({imageLoaded: true})" on:imgLoadError="set({imageError: true})" alt="{{media.description || ''}}" - src="{{media.preview_url}}" + src="{{imageError ? oneTransparentPixel : media.preview_url}}" width="{{inlineWidth}}" height="{{inlineHeight}}" /> @@ -152,6 +152,9 @@ showImageDialog(media.preview_url, media.url, media.type, width, height, media.description) } }, + data: () => ({ + oneTransparentPixel: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' + }), events: { imgLoad, imgLoadError,