diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f57ede3f..825c4439a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed ### Fixed +- Fix post-editor preview mode _community pr!_ ([#7532](https://github.com/lbryio/lbry-desktop/pull/7532)) ## [0.52.6] - [2022-04-04] diff --git a/ui/component/common/markdown-preview.jsx b/ui/component/common/markdown-preview.jsx index 90edcc161..246edfc58 100644 --- a/ui/component/common/markdown-preview.jsx +++ b/ui/component/common/markdown-preview.jsx @@ -33,6 +33,7 @@ type SimpleTextProps = { type SimpleLinkProps = { href?: string, title?: string, + embed?: boolean, children?: React.Node, }; @@ -66,7 +67,7 @@ const SimpleText = (props: SimpleTextProps) => { // **************************************************************************** const SimpleLink = (props: SimpleLinkProps) => { - const { title, children, href } = props; + const { title, children, href, embed } = props; if (!href) { return children || null; @@ -82,13 +83,13 @@ const SimpleLink = (props: SimpleLinkProps) => { const [uri, search] = href.split('?'); const urlParams = new URLSearchParams(search); - const embed = urlParams.get('embed'); + const embedParam = urlParams.get('embed'); - if (embed) { + if (embed || embedParam) { // Decode this since users might just copy it from the url bar const decodedUri = decodeURI(uri); return ( -
+
{decodedUri}
); @@ -195,7 +196,11 @@ export default React.memo(function MarkdownPreview(props: Markdow // Workaraund of remarkOptions.Fragment div: React.Fragment, img: (imgProps) => - isStakeEnoughForPreview(stakedLevel) && !isEmote(imgProps.title, imgProps.src) ? ( + noDataStore ? ( +
+ +
+ ) : isStakeEnoughForPreview(stakedLevel) && !isEmote(imgProps.title, imgProps.src) ? ( ) : ( diff --git a/ui/scss/component/_embed-player.scss b/ui/scss/component/_embed-player.scss index 59ee8119f..5c37fc9a6 100644 --- a/ui/scss/component/_embed-player.scss +++ b/ui/scss/component/_embed-player.scss @@ -38,8 +38,7 @@ } } -.embed__inline-button-preview { - @extend .embed__inline-button; +.embed__inline-button--preview { background-color: var(--color-editor-inline-code-bg); width: 50%; }