fix: status card styles (#415)
parent
0ef44cdf50
commit
965b96c630
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div flex="~" gap-1 items-center absolute top-0 left-0 py-3 px-4>
|
<div flex="~" gap-1 items-center>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -12,12 +12,15 @@ const withAccounts = $computed(() =>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<article v-if="conversation.lastStatus" flex flex-col gap-2>
|
<article v-if="conversation.lastStatus" flex flex-col gap-2>
|
||||||
<div absolute flex gap-2 text-sm text-secondary font-bold left-3 px2 pt2>
|
<StatusCard v-if="conversation.lastStatus" :status="conversation.lastStatus" :actions="false">
|
||||||
|
<template #meta>
|
||||||
|
<div flex gap-2 text-sm text-secondary font-bold>
|
||||||
<p mr-1>
|
<p mr-1>
|
||||||
{{ $t('conversation.with') }}
|
{{ $t('conversation.with') }}
|
||||||
</p>
|
</p>
|
||||||
<AccountAvatar v-for="account in withAccounts" :key="account.id" h-5 w-5 :account="account" />
|
<AccountAvatar v-for="account in withAccounts" :key="account.id" h-5 w-5 :account="account" />
|
||||||
</div>
|
</div>
|
||||||
<StatusCard v-if="conversation.lastStatus" :decorated="true" :status="conversation.lastStatus" :actions="false" />
|
</template>
|
||||||
|
</StatusCard>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -42,20 +42,28 @@ const { notification } = defineProps<{
|
||||||
<AccountCard :account="notification.account" />
|
<AccountCard :account="notification.account" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="notification.type === 'favourite'">
|
<template v-else-if="notification.type === 'favourite'">
|
||||||
<CommonMetaWrapper z-1>
|
<StatusCard :status="notification.status!" :faded="true">
|
||||||
|
<template #meta>
|
||||||
|
<CommonMetaWrapper>
|
||||||
<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>
|
</CommonMetaWrapper>
|
||||||
<StatusCard op50 hover:op100 :status="notification.status!" :decorated="true" />
|
</template>
|
||||||
|
</StatusCard>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="notification.type === 'reblog'">
|
<template v-else-if="notification.type === 'reblog'">
|
||||||
<CommonMetaWrapper z-1>
|
<StatusCard :status="notification.status!" :faded="true">
|
||||||
|
<template #meta>
|
||||||
|
<CommonMetaWrapper>
|
||||||
<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>
|
</CommonMetaWrapper>
|
||||||
<StatusCard op50 hover:op100 :status="notification.status!" :decorated="true" />
|
</template>
|
||||||
|
</StatusCard>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="notification.type === 'update'">
|
<template v-else-if="notification.type === 'update'">
|
||||||
|
<StatusCard :status="notification.status!" :faded="true">
|
||||||
|
<template #meta>
|
||||||
<CommonMetaWrapper z-1>
|
<CommonMetaWrapper z-1>
|
||||||
<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 />
|
||||||
|
@ -63,7 +71,8 @@ const { notification } = defineProps<{
|
||||||
{{ $t('notification.update_status') }}
|
{{ $t('notification.update_status') }}
|
||||||
</span>
|
</span>
|
||||||
</CommonMetaWrapper>
|
</CommonMetaWrapper>
|
||||||
<StatusCard :status="notification.status!" :decorated="true" />
|
</template>
|
||||||
|
</StatusCard>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="notification.type === 'mention' || notification.type === 'poll' || notification.type === 'status'">
|
<template v-else-if="notification.type === 'mention' || notification.type === 'poll' || notification.type === 'status'">
|
||||||
<StatusCard :status="notification.status!" />
|
<StatusCard :status="notification.status!" />
|
||||||
|
|
|
@ -8,14 +8,17 @@ const { group } = defineProps<{
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<article flex flex-col relative>
|
<article flex flex-col relative>
|
||||||
<div flex flex-col class="-mb-12" py-3>
|
<StatusCard :status="group.status!" :faded="true">
|
||||||
<div v-for="like of group.likes" :key="like.account.id" flex px-3 py-1>
|
<template #meta>
|
||||||
|
<div flex flex-col gap-2>
|
||||||
|
<div v-for="like of group.likes" :key="like.account.id" flex>
|
||||||
<div v-if="like.reblog" i-ri:repeat-fill text-xl mr-2 color-green />
|
<div v-if="like.reblog" i-ri:repeat-fill text-xl mr-2 color-green />
|
||||||
<div v-if="like.favourite && !like.reblog" i-ri:heart-fill text-xl mr-2 color-red />
|
<div v-if="like.favourite && !like.reblog" i-ri:heart-fill text-xl mr-2 color-red />
|
||||||
<AccountInlineInfo text-primary font-bold :account="like.account" mr2 />
|
<AccountInlineInfo text-primary font-bold :account="like.account" mr2 />
|
||||||
<div v-if="like.favourite && like.reblog" i-ri:heart-fill text-xl mr-2 color-red />
|
<div v-if="like.favourite && like.reblog" i-ri:heart-fill text-xl mr-2 color-red />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<StatusCard op50 hover:op100 :status="group.status!" :decorated="true" />
|
</template>
|
||||||
|
</StatusCard>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -7,7 +7,7 @@ const props = withDefaults(
|
||||||
actions?: boolean
|
actions?: boolean
|
||||||
context?: FilterContext
|
context?: FilterContext
|
||||||
hover?: boolean
|
hover?: boolean
|
||||||
decorated?: boolean
|
faded?: boolean
|
||||||
showReplyTo?: boolean
|
showReplyTo?: boolean
|
||||||
}>(),
|
}>(),
|
||||||
{ actions: true, showReplyTo: true },
|
{ actions: true, showReplyTo: true },
|
||||||
|
@ -62,13 +62,17 @@ const showRebloggedByAvatarOnAvatar = rebloggedBy && avatarOnAvatar && reblogged
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<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">
|
||||||
<StatusReplyingTo v-if="showReplyTo" :status="status" />
|
<div flex justify-between pb1>
|
||||||
|
<slot name="meta">
|
||||||
<CommonMetaWrapper v-if="rebloggedBy" text-secondary text-sm ws-nowrap>
|
<CommonMetaWrapper v-if="rebloggedBy" text-secondary text-sm ws-nowrap>
|
||||||
<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>
|
</CommonMetaWrapper>
|
||||||
<div v-if="decorated || rebloggedBy || (showReplyTo && status.inReplyToAccountId)" h-6 />
|
<div v-else />
|
||||||
<div flex gap-4>
|
</slot>
|
||||||
|
<StatusReplyingTo v-if="showReplyTo" :status="status" :class="faded ? 'text-secondary-light' : ''" />
|
||||||
|
</div>
|
||||||
|
<div flex gap-4 :class="faded ? 'text-secondary' : ''">
|
||||||
<div relative>
|
<div relative>
|
||||||
<AccountHoverWrapper :account="status.account" :class="showRebloggedByAvatarOnAvatar ? 'mt-4' : 'mt-1'">
|
<AccountHoverWrapper :account="status.account" :class="showRebloggedByAvatarOnAvatar ? 'mt-4' : 'mt-1'">
|
||||||
<NuxtLink :to="getAccountRoute(status.account)" rounded-full>
|
<NuxtLink :to="getAccountRoute(status.account)" rounded-full>
|
||||||
|
|
|
@ -9,7 +9,7 @@ const account = useAccountById(status.inReplyToAccountId)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="status.inReplyToAccountId" absolute top-0 right-0 px-4 py-3 flex="~ wrap" gap-1>
|
<div v-if="status.inReplyToAccountId" flex="~ wrap" gap-1>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-if="status.inReplyToId"
|
v-if="status.inReplyToId"
|
||||||
flex="~" items-center font-bold text-sm text-secondary gap-1
|
flex="~" items-center font-bold text-sm text-secondary gap-1
|
||||||
|
|
Loading…
Reference in New Issue