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

28 lines
553 B
Vue
Raw Normal View History

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