Fixed socials order and prefix spacing.

This commit is contained in:
DebaucheryLibrarian 2024-11-04 02:46:31 +01:00
parent 4fba6ff71e
commit cb759e7a09
2 changed files with 3 additions and 4 deletions

View File

@ -326,8 +326,7 @@
:class="`icon-social icon-${social.platform} icon-generic`"
/>
<template v-if="social.platform">{{ env.socials.prefix[social.platform] || env.socials.prefix.default }}</template>
{{ social.handle }}
<template v-if="social.platform">{{ env.socials.prefix[social.platform] || env.socials.prefix.default }}</template>{{ social.handle }}
</a>
</ul>
</div>

View File

@ -55,7 +55,7 @@ const keyMap = {
isCircumcised: 'circumcised',
};
const socialsOrder = ['onlyfans', 'twitter'];
const socialsOrder = ['onlyfans', 'twitter', null];
export function curateActor(actor, context = {}) {
return {
@ -121,7 +121,7 @@ export function curateActor(actor, context = {}) {
url: social.url,
platform: social.platform,
handle: social.handle,
})).toSorted((socialA, socialB) => socialsOrder.indexOf(socialB.platform) - socialsOrder.indexOf(socialA.platform)),
})).toSorted((socialA, socialB) => socialsOrder.indexOf(socialA.platform) - socialsOrder.indexOf(socialB.platform)),
profiles: context.profiles?.map((profile) => ({
id: profile.id,
description: profile.description,