Miko fixes 0.52.2 a2 (#7451)
* style, repost, and costinfo fixes * fix anon collection publishing * fix markdown images
This commit is contained in:
parent
acbf262641
commit
0e134a02d7
6 changed files with 22 additions and 15 deletions
|
@ -1,12 +1,12 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
import { Lbryio } from 'lbryinc';
|
import { Lbryio } from 'lbryinc';
|
||||||
import { selectClaimsByUri } from 'redux/selectors/claims';
|
import { selectClaimForUri } from 'redux/selectors/claims';
|
||||||
|
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
export function doFetchCostInfoForUri(uri) {
|
export function doFetchCostInfoForUri(uri) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const claim = selectClaimsByUri(state)[uri];
|
const claim = selectClaimForUri(state, uri);
|
||||||
|
|
||||||
if (!claim) return;
|
if (!claim) return;
|
||||||
|
|
||||||
|
|
|
@ -273,12 +273,18 @@ function CollectionForm(props: Props) {
|
||||||
|
|
||||||
// on mount, if we get a collectionChannel, set it.
|
// on mount, if we get a collectionChannel, set it.
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (hasClaim && !initialized) {
|
if (!initialized) {
|
||||||
if (collectionChannel) {
|
if (hasClaim) {
|
||||||
setActiveChannel(collectionChannel);
|
if (collectionChannel) {
|
||||||
setIncognito(false);
|
setActiveChannel(collectionChannel);
|
||||||
} else if (!collectionChannel && hasClaim) {
|
setIncognito(false);
|
||||||
setIncognito(true);
|
} else if (!collectionChannel && hasClaim) {
|
||||||
|
setIncognito(true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (incognito) {
|
||||||
|
setIncognito(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setInitialized(true);
|
setInitialized(true);
|
||||||
}
|
}
|
||||||
|
@ -287,9 +293,10 @@ function CollectionForm(props: Props) {
|
||||||
// every time activechannel or incognito changes, set it.
|
// every time activechannel or incognito changes, set it.
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
if (activeChannelId) {
|
if (activeChannelId && !incognito) {
|
||||||
setParam({ channel_id: activeChannelId });
|
setParam({ channel_id: activeChannelId });
|
||||||
} else if (incognito) {
|
}
|
||||||
|
if (incognito) {
|
||||||
setParam({ channel_id: undefined });
|
setParam({ channel_id: undefined });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,7 +201,7 @@ const MarkdownPreview = (props: MarkdownProps) => {
|
||||||
div: React.Fragment,
|
div: React.Fragment,
|
||||||
img: (imgProps) =>
|
img: (imgProps) =>
|
||||||
isStakeEnoughForPreview(stakedLevel) && !isEmote(imgProps.title, imgProps.src) ? (
|
isStakeEnoughForPreview(stakedLevel) && !isEmote(imgProps.title, imgProps.src) ? (
|
||||||
ZoomableImage
|
<ZoomableImage {...imgProps} />
|
||||||
) : (
|
) : (
|
||||||
<SimpleImageLink src={imgProps.src} alt={imgProps.alt} title={imgProps.title} />
|
<SimpleImageLink src={imgProps.src} alt={imgProps.alt} title={imgProps.title} />
|
||||||
),
|
),
|
||||||
|
|
|
@ -99,6 +99,7 @@ export default function SettingContent(props: Props) {
|
||||||
}
|
}
|
||||||
setClientSetting(SETTINGS.HIDE_REPOSTS, !hideReposts);
|
setClientSetting(SETTINGS.HIDE_REPOSTS, !hideReposts);
|
||||||
}}
|
}}
|
||||||
|
checked={hideReposts}
|
||||||
/>
|
/>
|
||||||
</SettingsRow>
|
</SettingsRow>
|
||||||
<SettingsRow title={__('Show mature content')} subtitle={__(HELP.SHOW_MATURE)}>
|
<SettingsRow title={__('Show mature content')} subtitle={__(HELP.SHOW_MATURE)}>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
|
|
||||||
.header__navigation {
|
.header__navigation {
|
||||||
padding: var(--spacing-xs);
|
padding: var(--spacing-xs) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__navigationItem--logo {
|
.header__navigationItem--logo {
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: var(--header-height);
|
height: var(--header-height);
|
||||||
padding: var(--spacing-s) var(--spacing-m);
|
padding: var(--spacing-s) 0;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,8 +156,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__navigationItem--profilePic {
|
.header__navigationItem--profilePic {
|
||||||
margin-right: var(--spacing-s);
|
|
||||||
|
|
||||||
.channel-thumbnail {
|
.channel-thumbnail {
|
||||||
height: var(--height-button);
|
height: var(--height-button);
|
||||||
width: var(--height-button);
|
width: var(--height-button);
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
min-height: calc(100vh - var(--header-height));
|
min-height: calc(100vh - var(--header-height));
|
||||||
|
padding: 0 var(--spacing-m);
|
||||||
|
|
||||||
@media (max-width: $breakpoint-small) {
|
@media (max-width: $breakpoint-small) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
Loading…
Reference in a new issue