feat: add nsfw toggle to post editor
This commit is contained in:
parent
544d65972a
commit
5df33837ab
11 changed files with 94 additions and 88 deletions
23
src/components/Note/NsfwNote.tsx
Normal file
23
src/components/Note/NsfwNote.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { Button } from '@/components/ui/button'
|
||||
import { Eye } from 'lucide-react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export default function NsfwNote({ show }: { show: () => void }) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2 items-center text-muted-foreground font-medium my-4">
|
||||
<div>{t('🔞 NSFW 🔞')}</div>
|
||||
<Button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
show()
|
||||
}}
|
||||
variant="outline"
|
||||
>
|
||||
<Eye />
|
||||
{t('Temporarily display this note')}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue