forked from Mirrors/elk
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<{
|
||||
notification: Notification
|
||||
}>()
|
||||
|
||||
const nuxt = useNuxtApp()
|
||||
function click() {
|
||||
nuxt.$rememberAccountPosition(getAccountRoute(notification.account).fullPath)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<article flex flex-col relative>
|
||||
<template v-if="notification.type === 'follow'">
|
||||
<NuxtLink :to="getAccountRoute(notification.account)">
|
||||
<NuxtLink :to="getAccountRoute(notification.account)" @click.capture="click">
|
||||
<div
|
||||
flex items-center absolute
|
||||
ps-3 pe-4 inset-is-0
|
||||
|
|
|
@ -30,7 +30,7 @@ const reply = () => {
|
|||
focusEditor()
|
||||
}
|
||||
else {
|
||||
nuxtApp.$rememberScrollPosition(status)
|
||||
nuxtApp.$rememberStatusPosition(status)
|
||||
navigateTo({ path: getStatusRoute(status).href, state: { focusReply: true } })
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ function go(evt: MouseEvent | KeyboardEvent) {
|
|||
window.open(route.href)
|
||||
}
|
||||
else {
|
||||
useNuxtApp().$rememberStatusPosition(status)
|
||||
cacheStatus(status)
|
||||
router.push(route)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue