refactor: extract check self account
parent
b6c916517c
commit
11fc2572d5
|
@ -8,7 +8,7 @@ const { account, command, context, ...props } = defineProps<{
|
|||
command?: boolean
|
||||
}>()
|
||||
|
||||
const isSelf = $computed(() => currentUser.value?.account.id === account.id)
|
||||
const isSelf = useSelfAccount(() => account)
|
||||
const enable = $computed(() => !isSelf && currentUser.value)
|
||||
const relationship = $computed(() => props.relationship || useRelationship(account).value)
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ watchEffect(() => {
|
|||
iconFields.value = icons
|
||||
})
|
||||
|
||||
const isSelf = $computed(() => currentUser.value?.account.id === account.id)
|
||||
const isSelf = useSelfAccount(() => account)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -7,7 +7,7 @@ const { account } = defineProps<{
|
|||
}>()
|
||||
let relationship = $(useRelationship(account))
|
||||
|
||||
const isSelf = $computed(() => currentUser.value?.account.id === account.id)
|
||||
const isSelf = $(useSelfAccount(() => account))
|
||||
|
||||
const masto = useMasto()
|
||||
const toggleMute = async () => {
|
||||
|
|
Loading…
Reference in New Issue