magnetar/fe_calckey/frontend/client/src/components/global/MkUserName.vue

32 lines
620 B
Vue

<template>
<Mfm
:class="$style.root"
:text="magTransUsername(user)"
:plain="true"
:nowrap="nowrap"
:custom-emojis="user.emojis"
/>
</template>
<script lang="ts" setup>
import * as misskey from "calckey-js";
import { packed } from "magnetar-common";
import { magTransUsername } from "@/scripts-mag/mag-util";
const props = withDefaults(
defineProps<{
user: packed.PackUserBase | misskey.entities.User;
nowrap?: boolean;
}>(),
{
nowrap: true,
}
);
</script>
<style lang="scss" module>
.root {
unicode-bidi: isolate;
}
</style>