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