Merge pull request #3191 from omnivore-app/hide-auto-add-to-library

hide auto add to library button on web because we are only releasing following features on iOS for now
This commit is contained in:
Hongbo Wu 2023-12-01 13:41:10 +08:00 committed by GitHub
commit f09f60d0bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
import { useRouter } from 'next/router'
import { FloppyDisk, Pencil, XCircle } from 'phosphor-react'
import { useMemo, useState } from 'react'
import CheckboxComponent from '../../../components/elements/Checkbox'
import { FormInput } from '../../../components/elements/FormElements'
import { HStack, SpanBox } from '../../../components/elements/LayoutPrimitives'
import { ConfirmationModal } from '../../../components/patterns/ConfirmationModal'
@ -199,14 +198,7 @@ export default function Rss(): JSX.Element {
console.log('onDelete triggered: ', subscription.id)
setOnDeleteId(subscription.id)
}}
// onEdit={() => {
// setOnEditStatus(
// subscription.status == 'ACTIVE' ? 'UNSUBSCRIBED' : 'ACTIVE'
// )
// setOnPauseId(subscription.id)
// }}
deleteTitle="Unsubscribe"
// editTitle={subscription.status === 'ACTIVE' ? 'Pause' : 'Resume'}
sublineElement={
<SpanBox
css={{
@ -222,54 +214,36 @@ export default function Rss(): JSX.Element {
}`}
</SpanBox>
}
// onClick={() => {
// router.push(`/home?q=in:inbox rss:"${subscription.url}"`)
// }}
extraElement={
<HStack
distribution="start"
alignment="center"
css={{
padding: '0 5px',
}}
>
<CheckboxComponent
checked={!!subscription.autoAddToLibrary}
setChecked={async (checked) => {
await updateSubscriptionMutation({
id: subscription.id,
autoAddToLibrary: checked,
})
revalidate()
}}
/>
<SpanBox
css={{
padding: '0 5px',
fontSize: '12px',
}}
>
Auto add to library
</SpanBox>
</HStack>
// onChange={() => {
// setOnEditStatus(
// subscription.status == 'ACTIVE'
// ? 'UNSUBSCRIBED'
// : 'ACTIVE'
// )
// setOnPauseId(subscription.id)
// }}
}
onClick={() => {
router.push(`/home?q=in:inbox rss:"${subscription.url}"`)
}}
// extraElement={
// <SpanBox
// <HStack
// distribution="start"
// alignment="center"
// css={{
// fontSize: '12px',
// padding: '0 5px',
// }}
// >
// {subscription.status === 'ACTIVE' ? 'Active' : 'Paused'}
// </SpanBox>
// <CheckboxComponent
// checked={!!subscription.autoAddToLibrary}
// setChecked={async (checked) => {
// await updateSubscriptionMutation({
// id: subscription.id,
// autoAddToLibrary: checked,
// })
// revalidate()
// }}
// />
// <SpanBox
// css={{
// padding: '0 5px',
// fontSize: '12px',
// }}
// >
// Auto add to library
// </SpanBox>
// </HStack>
// }
/>
)