Fixed actor edit avatar zoom selecting avatar, showing media date.

This commit is contained in:
2026-06-28 06:18:38 +02:00
parent 7ae2bb7635
commit b3af993236
2 changed files with 16 additions and 1 deletions

View File

@@ -19,10 +19,16 @@
>{{ avatar.sharpness.toFixed(2) }}</span>
</span>
<span
:title="`Added ${format(avatar.createdAt, 'yyyy-MM-dd')}, may not reflect photo age`"
class="avatar-date"
>{{ format(avatar.createdAt, '\'\'yy-MM') }}</span>
<a
:href="getPath(avatar)"
target="_blank"
class="avatar-zoom"
@click.stop
>
<Icon
icon="search"
@@ -32,6 +38,7 @@
</template>
<script setup>
import { format } from 'date-fns';
import getPath from '#/src/get-path.js';
defineProps({
@@ -89,7 +96,8 @@ defineProps({
}
.avatar-meta,
.avatar-credit {
.avatar-credit,
.avatar-date {
position: absolute;
z-index: 10;
box-sizing: border-box;
@@ -112,4 +120,10 @@ defineProps({
bottom: .75rem;
left: 0;
}
.avatar-date {
position: absolute;
top: 0;
left: 0;
}
</style>

View File

@@ -32,5 +32,6 @@ export function curateMedia(media, context = {}) {
type: context.type || null,
sfw: curateMedia(media.sfw_media),
isRestricted: context.isRestricted,
createdAt: media.created_at,
};
}