fix rss, add icon
This commit is contained in:
parent
5e97fdfa0d
commit
22d9495b8d
4 changed files with 24 additions and 6 deletions
|
@ -358,10 +358,10 @@ function ClaimMenuList(props: Props) {
|
||||||
|
|
||||||
<hr className="menu__separator" />
|
<hr className="menu__separator" />
|
||||||
|
|
||||||
{isChannelPage && (
|
{isChannelPage && IS_WEB && (
|
||||||
<MenuItem className="comment__menu-option" onSelect={handleCopyRssLink}>
|
<MenuItem className="comment__menu-option" onSelect={handleCopyRssLink}>
|
||||||
<div className="menu__link">
|
<div className="menu__link">
|
||||||
<Icon aria-hidden icon={ICONS.SHARE} />
|
<Icon aria-hidden icon={ICONS.RSS} />
|
||||||
{__('Copy RSS URL')}
|
{__('Copy RSS URL')}
|
||||||
</div>
|
</div>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
|
@ -2299,4 +2299,21 @@ export const icons = {
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
),
|
),
|
||||||
|
[ICONS.RSS]: (props: CustomProps) => (
|
||||||
|
<svg
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width={props.size || '18'}
|
||||||
|
height={props.size || '18'}
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
strokeWidth="2"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
stroke="currentColor"
|
||||||
|
fill="none"
|
||||||
|
>
|
||||||
|
<g>
|
||||||
|
<path d="M.75 19.497a3.75 3.75 0 107.5 0 3.75 3.75 0 10-7.5 0zM.75 8.844a11.328 11.328 0 0114.4 14.4M.75 1.113a18.777 18.777 0 0122.139 22.123" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
|
@ -161,3 +161,4 @@ export const LIVESTREAM_MONOCHROME = 'LivestreamMono';
|
||||||
export const STACK = 'stack';
|
export const STACK = 'stack';
|
||||||
export const TIME = 'time';
|
export const TIME = 'time';
|
||||||
export const GLOBE = 'globe';
|
export const GLOBE = 'globe';
|
||||||
|
export const RSS = 'rss';
|
||||||
|
|
|
@ -46,11 +46,11 @@ async function getFeed(channelClaim) {
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
title: title + ' on ' + SITE_NAME,
|
title: title + ' on ' + SITE_NAME,
|
||||||
description: value ? replaceLineFeeds(value.description) : '',
|
description: value && value.description ? replaceLineFeeds(value.description) : '',
|
||||||
link: `${URL}/${channelClaim.name}:${channelClaim.claim_id}`,
|
link: `${URL}/${channelClaim.name}:${channelClaim.claim_id}`,
|
||||||
favicon: URL + '/public/favicon.png',
|
favicon: URL + '/public/favicon.png',
|
||||||
generator: SITE_NAME + ' RSS Feed',
|
generator: SITE_NAME + ' RSS Feed',
|
||||||
image: value ? value.thumbnail.url : '',
|
image: value && value.thumbnail ? value.thumbnail.url : '',
|
||||||
author: {
|
author: {
|
||||||
name: channelClaim.name,
|
name: channelClaim.name,
|
||||||
link: URL + '/' + channelClaim.name + ':' + channelClaim.claim_id,
|
link: URL + '/' + channelClaim.name + ':' + channelClaim.claim_id,
|
||||||
|
@ -69,8 +69,8 @@ async function getFeed(channelClaim) {
|
||||||
guid: c.claim_id,
|
guid: c.claim_id,
|
||||||
id: c.claim_id,
|
id: c.claim_id,
|
||||||
title: value ? value.title : c.name,
|
title: value ? value.title : c.name,
|
||||||
description: value ? replaceLineFeeds(value.description) : '',
|
description: value && value.description ? replaceLineFeeds(value.description) : '',
|
||||||
image: value ? value.thumbnail.url : '',
|
image: value && value.thumbnail ? value.thumbnail.url : '',
|
||||||
link: URL + '/' + c.name + ':' + c.claim_id,
|
link: URL + '/' + c.name + ':' + c.claim_id,
|
||||||
date: new Date(meta ? meta.creation_timestamp * 1000 : null),
|
date: new Date(meta ? meta.creation_timestamp * 1000 : null),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue