2020-01-29 20:37:25 +01:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<span class="mk-acct">
|
|
|
|
<span class="name">@{{ user.username }}</span>
|
|
|
|
<span
|
|
|
|
v-if="user.host || detail || $store.state.showFullAcct"
|
|
|
|
class="host"
|
|
|
|
>@{{ user.host || host }}</span
|
|
|
|
>
|
|
|
|
</span>
|
2020-01-29 20:37:25 +01:00
|
|
|
</template>
|
|
|
|
|
2022-01-07 07:02:25 +01:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 02:01:42 +02:00
|
|
|
import * as misskey from "calckey-js";
|
|
|
|
import { toUnicode } from "punycode/";
|
|
|
|
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>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.mk-acct {
|
|
|
|
> .host {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|