chore: include notification card + accounts
This commit is contained in:
parent
b6eed6b46b
commit
5893cf1a6e
3 changed files with 8 additions and 2 deletions
|
|
@ -4,12 +4,17 @@ import type { Notification } from 'masto'
|
||||||
const { notification } = defineProps<{
|
const { notification } = defineProps<{
|
||||||
notification: Notification
|
notification: Notification
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const nuxt = useNuxtApp()
|
||||||
|
function click() {
|
||||||
|
nuxt.$rememberAccountPosition(getAccountRoute(notification.account).fullPath)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<article flex flex-col relative>
|
<article flex flex-col relative>
|
||||||
<template v-if="notification.type === 'follow'">
|
<template v-if="notification.type === 'follow'">
|
||||||
<NuxtLink :to="getAccountRoute(notification.account)">
|
<NuxtLink :to="getAccountRoute(notification.account)" @click.capture="click">
|
||||||
<div
|
<div
|
||||||
flex items-center absolute
|
flex items-center absolute
|
||||||
ps-3 pe-4 inset-is-0
|
ps-3 pe-4 inset-is-0
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ const reply = () => {
|
||||||
focusEditor()
|
focusEditor()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nuxtApp.$rememberScrollPosition(status)
|
nuxtApp.$rememberStatusPosition(status)
|
||||||
navigateTo({ path: getStatusRoute(status).href, state: { focusReply: true } })
|
navigateTo({ path: getStatusRoute(status).href, state: { focusReply: true } })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ function go(evt: MouseEvent | KeyboardEvent) {
|
||||||
window.open(route.href)
|
window.open(route.href)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
useNuxtApp().$rememberStatusPosition(status)
|
||||||
cacheStatus(status)
|
cacheStatus(status)
|
||||||
router.push(route)
|
router.push(route)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue