feat(preferences): option to hide account hover card (#1431)

This commit is contained in:
wheat 2023-01-24 15:46:33 -05:00 committed by GitHub
parent 4e97c31caf
commit 46a8472001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 1 deletions

View file

@ -8,13 +8,15 @@ const props = defineProps<{
}>()
const account = props.account || (props.handle ? useAccountByHandle(props.handle!) : undefined)
const userSettings = useUserSettings()
defineOptions({
inheritAttrs: false,
})
</script>
<template>
<VMenu v-if="!disabled && account" placement="bottom-start" :delay="{ show: 500, hide: 100 }" v-bind="$attrs" :close-on-content-click="false">
<VMenu v-if="!disabled && account && !getPreferences(userSettings, 'hideAccountHoverCard')" placement="bottom-start" :delay="{ show: 500, hide: 100 }" v-bind="$attrs" :close-on-content-click="false">
<slot />
<template #popper>
<AccountHoverCard v-if="account" :account="account" />