chore: include notification card + accounts

This commit is contained in:
userquin 2023-01-07 18:30:56 +01:00
parent b6eed6b46b
commit 5893cf1a6e
3 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -30,7 +30,7 @@ const reply = () => {
focusEditor()
}
else {
nuxtApp.$rememberScrollPosition(status)
nuxtApp.$rememberStatusPosition(status)
navigateTo({ path: getStatusRoute(status).href, state: { focusReply: true } })
}
}

View file

@ -52,6 +52,7 @@ function go(evt: MouseEvent | KeyboardEvent) {
window.open(route.href)
}
else {
useNuxtApp().$rememberStatusPosition(status)
cacheStatus(status)
router.push(route)
}