frontend/components/notes/reblog-header.vue

24 lines
810 B
Vue
Raw Normal View History

<template>
2024-12-02 17:25:27 +01:00
<NuxtLink :href="urlAsPath" class="rounded border hover:bg-muted duration-100 text-sm flex flex-row items-center gap-2 px-2 py-1 mb-4">
<Repeat class="size-4 text-primary" />
<Avatar class="size-6 border" :src="avatar" :name="displayName" />
<span class="font-semibold" v-render-emojis="emojis">{{ displayName }}</span>
{{ m.large_vivid_horse_catch() }}
2024-11-30 16:39:02 +01:00
</NuxtLink>
</template>
<script lang="ts" setup>
import type { Emoji } from "@versia/client/types";
import { Repeat } from "lucide-vue-next";
import * as m from "~/paraglide/messages.js";
import Avatar from "../profiles/avatar.vue";
2024-12-02 17:25:27 +01:00
const { url } = defineProps<{
avatar: string;
displayName: string;
emojis: Emoji[];
2024-11-30 16:39:02 +01:00
url: string;
}>();
2024-12-02 17:25:27 +01:00
const urlAsPath = new URL(url).pathname;
</script>