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

26 lines
833 B
Vue
Raw Normal View History

<template>
2023-05-07 12:08:43 +02:00
<MkCondensedLine v-if="defaultStore.state.enableCondensedLineForAcct" :min-scale="2 / 3">
2023-01-09 21:17:54 +01:00
<span>@{{ user.username }}</span>
2023-04-01 06:42:40 +02:00
<span v-if="user.host || detail || defaultStore.state.showFullAcct" style="opacity: 0.5;">@{{ user.host || host }}</span>
</MkCondensedLine>
<span v-else>
<span>@{{ user.username }}</span>
<span v-if="user.host || detail || defaultStore.state.showFullAcct" style="opacity: 0.5;">@{{ 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/';
import MkCondensedLine from './MkCondensedLine.vue';
2022-01-07 07:02:25 +01:00
import { host as hostRaw } from '@/config';
2023-04-01 06:42:40 +02:00
import { defaultStore } from '@/store';
2022-01-07 07:02:25 +01:00
defineProps<{
user: misskey.entities.UserDetailed;
detail?: boolean;
}>();
const host = toUnicode(hostRaw);
</script>