feat: support displaying video

This commit is contained in:
Anthony Fu 2022-11-21 21:38:10 +08:00
parent 757a93c2a2
commit eb3f0655eb
3 changed files with 24 additions and 3 deletions

View file

@ -24,7 +24,7 @@ const router = useRouter()
function go(e: MouseEvent) {
const path = e.composedPath() as HTMLElement[]
const el = path.find(el => ['A', 'BUTTON', 'P'].includes(el.tagName?.toUpperCase()))
const el = path.find(el => ['A', 'BUTTON', 'P', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase()))
if (!el || el.tagName.toUpperCase() === 'P')
router.push(`/@${status.account.acct}/${status.id}`)
}