From 0e134a02d70d1bcbd29bc6948dfd02cb29129352 Mon Sep 17 00:00:00 2001 From: jessopb <36554050+jessopb@users.noreply.github.com> Date: Sat, 29 Jan 2022 18:25:40 -0500 Subject: [PATCH] Miko fixes 0.52.2 a2 (#7451) * style, repost, and costinfo fixes * fix anon collection publishing * fix markdown images --- extras/lbryinc/redux/actions/cost_info.js | 4 ++-- ui/component/collectionEdit/view.jsx | 23 +++++++++++++++-------- ui/component/common/markdown-preview.jsx | 2 +- ui/component/settingContent/view.jsx | 1 + ui/scss/component/_header.scss | 6 ++---- ui/scss/component/_main.scss | 1 + 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/extras/lbryinc/redux/actions/cost_info.js b/extras/lbryinc/redux/actions/cost_info.js index ca92a364b..f63857319 100644 --- a/extras/lbryinc/redux/actions/cost_info.js +++ b/extras/lbryinc/redux/actions/cost_info.js @@ -1,12 +1,12 @@ import * as ACTIONS from 'constants/action_types'; import { Lbryio } from 'lbryinc'; -import { selectClaimsByUri } from 'redux/selectors/claims'; +import { selectClaimForUri } from 'redux/selectors/claims'; // eslint-disable-next-line import/prefer-default-export export function doFetchCostInfoForUri(uri) { return (dispatch, getState) => { const state = getState(); - const claim = selectClaimsByUri(state)[uri]; + const claim = selectClaimForUri(state, uri); if (!claim) return; diff --git a/ui/component/collectionEdit/view.jsx b/ui/component/collectionEdit/view.jsx index 54d125068..b2a08976e 100644 --- a/ui/component/collectionEdit/view.jsx +++ b/ui/component/collectionEdit/view.jsx @@ -273,12 +273,18 @@ function CollectionForm(props: Props) { // on mount, if we get a collectionChannel, set it. React.useEffect(() => { - if (hasClaim && !initialized) { - if (collectionChannel) { - setActiveChannel(collectionChannel); - setIncognito(false); - } else if (!collectionChannel && hasClaim) { - setIncognito(true); + if (!initialized) { + if (hasClaim) { + if (collectionChannel) { + setActiveChannel(collectionChannel); + setIncognito(false); + } else if (!collectionChannel && hasClaim) { + setIncognito(true); + } + } else { + if (incognito) { + setIncognito(true); + } } setInitialized(true); } @@ -287,9 +293,10 @@ function CollectionForm(props: Props) { // every time activechannel or incognito changes, set it. React.useEffect(() => { if (initialized) { - if (activeChannelId) { + if (activeChannelId && !incognito) { setParam({ channel_id: activeChannelId }); - } else if (incognito) { + } + if (incognito) { setParam({ channel_id: undefined }); } } diff --git a/ui/component/common/markdown-preview.jsx b/ui/component/common/markdown-preview.jsx index db0131d7d..23b28f4ef 100644 --- a/ui/component/common/markdown-preview.jsx +++ b/ui/component/common/markdown-preview.jsx @@ -201,7 +201,7 @@ const MarkdownPreview = (props: MarkdownProps) => { div: React.Fragment, img: (imgProps) => isStakeEnoughForPreview(stakedLevel) && !isEmote(imgProps.title, imgProps.src) ? ( - ZoomableImage + ) : ( ), diff --git a/ui/component/settingContent/view.jsx b/ui/component/settingContent/view.jsx index 14aaefd06..bce8a4a17 100644 --- a/ui/component/settingContent/view.jsx +++ b/ui/component/settingContent/view.jsx @@ -99,6 +99,7 @@ export default function SettingContent(props: Props) { } setClientSetting(SETTINGS.HIDE_REPOSTS, !hideReposts); }} + checked={hideReposts} /> diff --git a/ui/scss/component/_header.scss b/ui/scss/component/_header.scss index 17c1c2982..960223efa 100644 --- a/ui/scss/component/_header.scss +++ b/ui/scss/component/_header.scss @@ -39,7 +39,7 @@ border-bottom: none; .header__navigation { - padding: var(--spacing-xs); + padding: var(--spacing-xs) 0; } .header__navigationItem--logo { @@ -65,7 +65,7 @@ justify-content: space-between; flex: 1; height: var(--header-height); - padding: var(--spacing-s) var(--spacing-m); + padding: var(--spacing-s) 0; flex-wrap: nowrap; } @@ -156,8 +156,6 @@ } .header__navigationItem--profilePic { - margin-right: var(--spacing-s); - .channel-thumbnail { height: var(--height-button); width: var(--height-button); diff --git a/ui/scss/component/_main.scss b/ui/scss/component/_main.scss index 85ee40256..59ceb59a8 100644 --- a/ui/scss/component/_main.scss +++ b/ui/scss/component/_main.scss @@ -83,6 +83,7 @@ margin-right: auto; margin-left: auto; min-height: calc(100vh - var(--header-height)); + padding: 0 var(--spacing-m); @media (max-width: $breakpoint-small) { width: 100%;