2020-01-29 20:37:25 +01:00
|
|
|
<template>
|
2021-04-13 09:00:40 +02:00
|
|
|
<span class="mk-acct">
|
2020-01-29 20:37:25 +01:00
|
|
|
<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>
|
2020-01-29 20:37:25 +01:00
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
|
2022-01-07 07:02:25 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import * as misskey from 'misskey-js';
|
2021-04-04 06:00:39 +02:00
|
|
|
import { toUnicode } from 'punycode/';
|
2022-01-07 07:02:25 +01:00
|
|
|
import { host as hostRaw } from '@/config';
|
2020-01-29 20:37:25 +01:00
|
|
|
|
2022-01-07 07:02:25 +01:00
|
|
|
defineProps<{
|
|
|
|
user: misskey.entities.UserDetailed;
|
|
|
|
detail?: boolean;
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const host = toUnicode(hostRaw);
|
2020-01-29 20:37:25 +01:00
|
|
|
</script>
|
|
|
|
|
2022-12-27 10:29:39 +01:00
|
|
|
<style lang="scss" scoped>
|
2020-01-29 20:37:25 +01:00
|
|
|
.mk-acct {
|
|
|
|
> .host {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|