chore: preview header only when it's already set (#1311)
Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
parent
a48524e7ad
commit
09997c2f90
@ -20,6 +20,7 @@ const relationship = $(useRelationship(account))
|
||||
|
||||
const namedFields = ref<mastodon.v1.AccountField[]>([])
|
||||
const iconFields = ref<mastodon.v1.AccountField[]>([])
|
||||
const hasHeader = $computed(() => !account.header.endsWith('/original/missing.png'))
|
||||
|
||||
function getFieldIconTitle(fieldName: string) {
|
||||
return fieldName === 'Joined' ? t('account.joined') : fieldName
|
||||
@ -85,9 +86,9 @@ const isNotifiedOnPost = $computed(() => !!relationship?.notifying)
|
||||
|
||||
<template>
|
||||
<div flex flex-col>
|
||||
<button border="b base" z-1>
|
||||
<img h-50 height="200" w-full object-cover :src="account.header" :alt="t('account.profile_description', [account.username])" @click="previewHeader">
|
||||
</button>
|
||||
<component :is="hasHeader ? 'button' : 'div'" border="b base" z-1 @click="hasHeader ? previewHeader() : undefined">
|
||||
<img h-50 height="200" w-full object-cover :src="account.header" :alt="t('account.profile_description', [account.username])">
|
||||
</component>
|
||||
<div p4 mt--18 flex flex-col gap-4>
|
||||
<div relative>
|
||||
<div flex="~ col gap-2 1">
|
||||
|
Loading…
Reference in New Issue
Block a user