refactor: remove CommonMetaWrapper

zio/stable
patak 2022-12-13 16:03:58 +01:00
parent 965b96c630
commit 119b3039c0
3 changed files with 8 additions and 13 deletions

View File

@ -1,5 +0,0 @@
<template>
<div flex="~" gap-1 items-center>
<slot />
</div>
</template>

View File

@ -44,33 +44,33 @@ const { notification } = defineProps<{
<template v-else-if="notification.type === 'favourite'"> <template v-else-if="notification.type === 'favourite'">
<StatusCard :status="notification.status!" :faded="true"> <StatusCard :status="notification.status!" :faded="true">
<template #meta> <template #meta>
<CommonMetaWrapper> <div flex="~" gap-1 items-center>
<div i-ri:heart-fill text-xl mr-1 color-red /> <div i-ri:heart-fill text-xl mr-1 color-red />
<AccountInlineInfo text-primary font-bold :account="notification.account" mr1 /> <AccountInlineInfo text-primary font-bold :account="notification.account" mr1 />
</CommonMetaWrapper> </div>
</template> </template>
</StatusCard> </StatusCard>
</template> </template>
<template v-else-if="notification.type === 'reblog'"> <template v-else-if="notification.type === 'reblog'">
<StatusCard :status="notification.status!" :faded="true"> <StatusCard :status="notification.status!" :faded="true">
<template #meta> <template #meta>
<CommonMetaWrapper> <div flex="~" gap-1 items-center>
<div i-ri:repeat-fill text-xl mr-1 color-green /> <div i-ri:repeat-fill text-xl mr-1 color-green />
<AccountInlineInfo text-primary font-bold :account="notification.account" mr1 /> <AccountInlineInfo text-primary font-bold :account="notification.account" mr1 />
</CommonMetaWrapper> </div>
</template> </template>
</StatusCard> </StatusCard>
</template> </template>
<template v-else-if="notification.type === 'update'"> <template v-else-if="notification.type === 'update'">
<StatusCard :status="notification.status!" :faded="true"> <StatusCard :status="notification.status!" :faded="true">
<template #meta> <template #meta>
<CommonMetaWrapper z-1> <div flex="~" gap-1 items-center>
<div i-ri:edit-2-fill text-xl mr-1 text-secondary /> <div i-ri:edit-2-fill text-xl mr-1 text-secondary />
<AccountInlineInfo :account="notification.account" mr1 /> <AccountInlineInfo :account="notification.account" mr1 />
<span ws-nowrap> <span ws-nowrap>
{{ $t('notification.update_status') }} {{ $t('notification.update_status') }}
</span> </span>
</CommonMetaWrapper> </div>
</template> </template>
</StatusCard> </StatusCard>
</template> </template>

View File

@ -64,10 +64,10 @@ const showRebloggedByAvatarOnAvatar = rebloggedBy && avatarOnAvatar && reblogged
<div v-if="filter?.filterAction !== 'hide'" :id="`status-${status.id}`" ref="el" relative flex flex-col gap-2 px-4 pt-3 pb-4 transition-100 :class="{ 'hover:bg-active': hover }" tabindex="0" focus:outline-none focus-visible:ring="2 primary" @click="onclick" @keydown.enter="onclick"> <div v-if="filter?.filterAction !== 'hide'" :id="`status-${status.id}`" ref="el" relative flex flex-col gap-2 px-4 pt-3 pb-4 transition-100 :class="{ 'hover:bg-active': hover }" tabindex="0" focus:outline-none focus-visible:ring="2 primary" @click="onclick" @keydown.enter="onclick">
<div flex justify-between pb1> <div flex justify-between pb1>
<slot name="meta"> <slot name="meta">
<CommonMetaWrapper v-if="rebloggedBy" text-secondary text-sm ws-nowrap> <div v-if="rebloggedBy" text-secondary text-sm ws-nowrap flex="~" gap-1 items-center>
<div i-ri:repeat-fill mr-1 text-primary /> <div i-ri:repeat-fill mr-1 text-primary />
<AccountInlineInfo font-bold :account="rebloggedBy" :avatar="!avatarOnAvatar" /> <AccountInlineInfo font-bold :account="rebloggedBy" :avatar="!avatarOnAvatar" />
</CommonMetaWrapper> </div>
<div v-else /> <div v-else />
</slot> </slot>
<StatusReplyingTo v-if="showReplyTo" :status="status" :class="faded ? 'text-secondary-light' : ''" /> <StatusReplyingTo v-if="showReplyTo" :status="status" :class="faded ? 'text-secondary-light' : ''" />