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

28 lines
560 B
Vue
Raw Normal View History

<template>
<span class="mk-acct">
<span class="name">@{{ user.username }}</span>
2021-11-19 19:36:12 +09:00
<span v-if="user.host || detail || $store.state.showFullAcct" class="host">@{{ user.host || host }}</span>
</span>
</template>
2022-01-07 15:02:25 +09:00
<script lang="ts" setup>
import * as misskey from 'misskey-js';
import { toUnicode } from 'punycode/';
2022-01-07 15:02:25 +09:00
import { host as hostRaw } from '@/config';
2022-01-07 15:02:25 +09:00
defineProps<{
user: misskey.entities.UserDetailed;
detail?: boolean;
}>();
const host = toUnicode(hostRaw);
</script>
<style lang="scss" scoped>
.mk-acct {
> .host {
opacity: 0.5;
}
}
</style>