FoundKey/packages/client/src/components/global/acct.vue

29 lines
607 B
Vue
Raw Normal View History

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