mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 19:49:16 +01:00
build: ✨ Add explanations for which apps can be used, add link to registration page in sidebar
This commit is contained in:
parent
a45c04258e
commit
c29cae2955
5 changed files with 98 additions and 37 deletions
|
|
@ -94,39 +94,53 @@ const props = defineProps<{
|
|||
|
||||
const skeleton = computed(() => !props.account);
|
||||
|
||||
const formattedJoin = computed(() => Intl.DateTimeFormat("en-US", {
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
}).format(new Date(props.account?.created_at ?? 0)));
|
||||
const formattedJoin = computed(() =>
|
||||
Intl.DateTimeFormat("en-US", {
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
}).format(new Date(props.account?.created_at ?? 0)),
|
||||
);
|
||||
|
||||
const parsedNote = ref("");
|
||||
const parsedFields: Ref<{
|
||||
name: string;
|
||||
value: string;
|
||||
}[]> = ref([]);
|
||||
const parsedFields: Ref<
|
||||
{
|
||||
name: string;
|
||||
value: string;
|
||||
}[]
|
||||
> = ref([]);
|
||||
|
||||
watch(skeleton, async () => {
|
||||
if (skeleton.value) return;
|
||||
parsedNote.value = (await useParsedContent(
|
||||
props.account?.note ?? "",
|
||||
props.account?.emojis ?? [],
|
||||
[],
|
||||
)).value;
|
||||
parsedFields.value = await Promise.all(
|
||||
props.account?.fields.map(async (field) => ({
|
||||
name: await (await useParsedContent(
|
||||
field.name,
|
||||
watch(
|
||||
skeleton,
|
||||
async () => {
|
||||
if (skeleton.value) return;
|
||||
parsedNote.value = (
|
||||
await useParsedContent(
|
||||
props.account?.note ?? "",
|
||||
props.account?.emojis ?? [],
|
||||
[]
|
||||
)).value,
|
||||
value: await (await useParsedContent(
|
||||
field.value,
|
||||
props.account?.emojis ?? [],
|
||||
[]
|
||||
)).value,
|
||||
})) ?? [],
|
||||
);
|
||||
}, {
|
||||
immediate: true,
|
||||
});
|
||||
[],
|
||||
)
|
||||
).value;
|
||||
parsedFields.value = await Promise.all(
|
||||
props.account?.fields.map(async (field) => ({
|
||||
name: await (
|
||||
await useParsedContent(
|
||||
field.name,
|
||||
props.account?.emojis ?? [],
|
||||
[],
|
||||
)
|
||||
).value,
|
||||
value: await (
|
||||
await useParsedContent(
|
||||
field.value,
|
||||
props.account?.emojis ?? [],
|
||||
[],
|
||||
)
|
||||
).value,
|
||||
})) ?? [],
|
||||
);
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
},
|
||||
);
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue