From ecaeec226c21c91124362b608030254c9ef33753 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 20 Apr 2019 09:12:42 -0700 Subject: [PATCH] feat: add option to disable open graph cards (#1161) fixes #1155 --- src/routes/_components/status/Status.html | 3 ++- src/routes/_pages/settings/general.html | 5 +++++ src/routes/_store/store.js | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/routes/_components/status/Status.html b/src/routes/_components/status/Status.html index df3013b1..9fe87571 100644 --- a/src/routes/_components/status/Status.html +++ b/src/routes/_components/status/Status.html @@ -254,7 +254,8 @@ ), spoilerShown: ({ $spoilersShown, uuid }) => !!$spoilersShown[uuid], replyShown: ({ $repliesShown, uuid }) => !!$repliesShown[uuid], - showCard: ({ originalStatus, isStatusInNotification, showMedia }) => ( + showCard: ({ originalStatus, isStatusInNotification, showMedia, $hideCards }) => ( + !$hideCards && !isStatusInNotification && !showMedia && originalStatus.card && diff --git a/src/routes/_pages/settings/general.html b/src/routes/_pages/settings/general.html index 23a3f1e3..3f0fbfea 100644 --- a/src/routes/_pages/settings/general.html +++ b/src/routes/_pages/settings/general.html @@ -32,6 +32,11 @@ bind:checked="$disableCustomScrollbars" on:change="onChange(event)"> +
+ + +
diff --git a/src/routes/_store/store.js b/src/routes/_store/store.js index b0f128c4..940438b0 100644 --- a/src/routes/_store/store.js +++ b/src/routes/_store/store.js @@ -15,6 +15,7 @@ const persistedState = { disableHotkeys: false, disableLongAriaLabels: false, disableTapOnStatus: false, + hideCards: false, largeInlineMedia: false, instanceNameInSearch: '', instanceThemes: {},