misskey/packages/frontend/src/components/global/MkAcct.vue

26 lines
614 B
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
2024-09-28 00:52:40 +00:00
<span>
<span>@{{ user.username }}</span>
<span v-if="user.host || detail || defaultStore.state.showFullAcct" style="opacity: 0.5;">@{{ user.host || host }}</span>
</span>
</template>
2022-01-07 06:02:25 +00:00
<script lang="ts" setup>
import * as Misskey from 'misskey-js';
import { toUnicode } from 'punycode.js';
import { host as hostRaw } from '@@/js/config.js';
2023-09-19 07:37:43 +00:00
import { defaultStore } from '@/store.js';
2022-01-07 06:02:25 +00:00
defineProps<{
user: Misskey.entities.UserLite;
2022-01-07 06:02:25 +00:00
detail?: boolean;
}>();
const host = toUnicode(hostRaw);
</script>