feat(asset): link to assets on notification cards. (#451)

* feat(asset): link to assets on notification cards.

* Update packages/webui/components/notification-card.tsx

Co-authored-by: Yiling-J <njjyl723@gmail.com>

---------

Co-authored-by: Yiling-J <njjyl723@gmail.com>
This commit is contained in:
2026-10-06 22:14:11 +08:00
committed by GitHub
co-authored by Yiling-J
parent 2e5ff281a8
commit f870ca9b49
@@ -136,13 +136,19 @@ export const NotificationCard = ({ notification }: NotificationCardProps) => {
const hasPreview = asset?.preview && (asset.proxyType === 'image' || asset.proxyType === 'video')
const handleClick = () => {
const handleClick = () => {
if (kanbanTask?.id && team?.id) {
navigate({
to: '/teams/$teamId/kanban',
params: { teamId: team.id },
search: { taskId: kanbanTask.id },
})
}else if(project?.id && asset?.id){
//TODO: Perhaps it should be marked as read too when redirecting to it.
navigate({
to: '/projects/$projectId/files/$fileId',
params: { projectId: project.id, fileId: asset.id },
})
}
}