mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
add support for starring entries
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { t } from "@lingui/macro"
|
||||
import { Checkbox, Group } from "@mantine/core"
|
||||
import { markEntry } from "app/slices/entries"
|
||||
import { markEntry, starEntry } from "app/slices/entries"
|
||||
import { useAppDispatch } from "app/store"
|
||||
import { Entry } from "app/types"
|
||||
import { ActionButton } from "components/ActionButtton"
|
||||
import { TbExternalLink } from "react-icons/tb"
|
||||
import { TbExternalLink, TbStar, TbStarOff } from "react-icons/tb"
|
||||
|
||||
interface FeedEntryFooterProps {
|
||||
entry: Entry
|
||||
@@ -27,6 +27,11 @@ export function FeedEntryFooter(props: FeedEntryFooterProps) {
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<ActionButton
|
||||
icon={props.entry.starred ? <TbStarOff size={18} /> : <TbStar size={18} />}
|
||||
label={props.entry.starred ? t`Unstar` : t`Star`}
|
||||
onClick={() => dispatch(starEntry({ entry: props.entry, starred: !props.entry.starred }))}
|
||||
/>
|
||||
<a href={props.entry.url} target="_blank" rel="noreferrer">
|
||||
<ActionButton icon={<TbExternalLink size={18} />} label={t`Open link`} />
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user