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

30 lines
896 B
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
2023-05-19 04:58:09 +00:00
<MkCondensedLine v-if="defaultStore.state.enableCondensedLineForAcct" :minScale="2 / 3">
2023-01-09 20:17:54 +00:00
<span>@{{ user.username }}</span>
2023-04-01 04:42:40 +00:00
<span v-if="user.host || detail || defaultStore.state.showFullAcct" style="opacity: 0.5;">@{{ user.host || host }}</span>
</MkCondensedLine>
<span v-else>
<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/';
2023-09-19 07:37:43 +00:00
import { host as hostRaw } from '@/config.js';
import { defaultStore } from '@/store.js';
2022-01-07 06:02:25 +00:00
defineProps<{
user: Misskey.entities.UserDetailed;
2022-01-07 06:02:25 +00:00
detail?: boolean;
}>();
const host = toUnicode(hostRaw);
</script>