mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
replace old client with new client from commafeed-ui repository
This commit is contained in:
35
commafeed-client/src/components/content/FeedEntryFooter.tsx
Normal file
35
commafeed-client/src/components/content/FeedEntryFooter.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { t } from "@lingui/macro"
|
||||
import { Checkbox, Group } from "@mantine/core"
|
||||
import { markEntry } 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"
|
||||
|
||||
interface FeedEntryFooterProps {
|
||||
entry: Entry
|
||||
}
|
||||
|
||||
export function FeedEntryFooter(props: FeedEntryFooterProps) {
|
||||
const dispatch = useAppDispatch()
|
||||
const readStatusCheckboxClicked = () => dispatch(markEntry({ entry: props.entry, read: !props.entry.read }))
|
||||
|
||||
return (
|
||||
<Group>
|
||||
{props.entry.markable && (
|
||||
<Checkbox
|
||||
label={t`Keep unread`}
|
||||
checked={!props.entry.read}
|
||||
onChange={readStatusCheckboxClicked}
|
||||
styles={{
|
||||
label: { cursor: "pointer" },
|
||||
input: { cursor: "pointer" },
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<a href={props.entry.url} target="_blank" rel="noreferrer">
|
||||
<ActionButton icon={<TbExternalLink size={18} />} label={t`Open link`} />
|
||||
</a>
|
||||
</Group>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user