mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
show placeholder while favicon is loading
This commit is contained in:
@@ -30,7 +30,7 @@ export function FeedEntryHeader(props: FeedEntryHeaderProps) {
|
|||||||
<Box className={classes.headerText}>{props.entry.title}</Box>
|
<Box className={classes.headerText}>{props.entry.title}</Box>
|
||||||
<Box className={classes.headerSubtext}>
|
<Box className={classes.headerSubtext}>
|
||||||
<Box mr={6}>
|
<Box mr={6}>
|
||||||
<Image src={props.entry.iconUrl} alt="feed icon" width={18} height={18} />
|
<Image withPlaceholder src={props.entry.iconUrl} alt="feed icon" width={18} height={18} />
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text color="dimmed">{props.entry.feedName}</Text>
|
<Text color="dimmed">{props.entry.feedName}</Text>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export function TreeNode(props: TreeNodeProps) {
|
|||||||
return (
|
return (
|
||||||
<Box py={1} pl={props.level * 20} className={classes.node} onClick={(e: React.MouseEvent) => props.onClick(e, props.id)}>
|
<Box py={1} pl={props.level * 20} className={classes.node} onClick={(e: React.MouseEvent) => props.onClick(e, props.id)}>
|
||||||
<Box mr={6} onClick={(e: React.MouseEvent) => props.onIconClick && props.onIconClick(e, props.id)}>
|
<Box mr={6} onClick={(e: React.MouseEvent) => props.onIconClick && props.onIconClick(e, props.id)}>
|
||||||
{typeof props.icon === "string" ? <Image src={props.icon} alt="" width={18} height={18} /> : props.icon}
|
{typeof props.icon === "string" ? <Image withPlaceholder src={props.icon} alt="" width={18} height={18} /> : props.icon}
|
||||||
</Box>
|
</Box>
|
||||||
<Box className={classes.nodeText}>{props.name}</Box>
|
<Box className={classes.nodeText}>{props.name}</Box>
|
||||||
{!props.expanded && (
|
{!props.expanded && (
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function TreeSearch(props: TreeSearchProps) {
|
|||||||
.sort((f1, f2) => f1.name.localeCompare(f2.name))
|
.sort((f1, f2) => f1.name.localeCompare(f2.name))
|
||||||
.map(f => ({
|
.map(f => ({
|
||||||
title: f.name,
|
title: f.name,
|
||||||
icon: <Image src={f.iconUrl} alt="" width={18} height={18} />,
|
icon: <Image withPlaceholder src={f.iconUrl} alt="" width={18} height={18} />,
|
||||||
onTrigger: () => dispatch(redirectToFeed(f.id)),
|
onTrigger: () => dispatch(redirectToFeed(f.id)),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user