fix(front): actor label centered

This commit is contained in:
ArneBo 2025-01-19 17:19:06 +01:00
parent 4022f6a620
commit e920babef6
2 changed files with 23 additions and 7 deletions

View File

@ -21,11 +21,11 @@ const defaultAvatarStyle = computed(() => ({ backgroundColor: `#${actorColor.val
:src="actor.icon.urls.medium_square_crop"
class="ui avatar circular image"
>
<span
<i
v-else
:style="defaultAvatarStyle"
class="ui avatar circular label"
>{{ actor.preferred_username?.[0] || "" }}</span>
>{{ actor.preferred_username?.[0] || "" }}</i>
</template>
<style lang="scss">
@ -37,5 +37,6 @@ const defaultAvatarStyle = computed(() => ({ backgroundColor: `#${actorColor.val
&.label {
align-content: center;
}
}
</style>

View File

@ -60,10 +60,25 @@ const url = computed(() => {
secondary
round
>
<actor-avatar
v-if="avatar"
:actor="actor"
/>
<slot>{{ repr }}</slot>
<span class="center">
<actor-avatar
v-if="avatar"
:actor="actor"
/>
<slot>{{ repr }}</slot>
</span>
</Link>
</template>
<style lang="scss" scoped>
a.username {
span.center {
display: flex;
align-items: center;
}
i.label {
padding: 4px 8px;
margin-right: 8px;
}
}
</style>