summaryrefslogtreecommitdiff
path: root/src/client/components/global/acct.vue
blob: 835476065117f172d30ba34d71e6b27aa5fd38a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<template>
<span class="mk-acct" v-once>
	<span class="name">@{{ user.username }}</span>
	<span class="host" v-if="user.host || detail || $store.state.showFullAcct">@{{ user.host || host }}</span>
</span>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode/';
import { host } from '@client/config';

export default defineComponent({
	props: {
		user: {
			type: Object,
			required: true
		},
		detail: {
			type: Boolean,
			default: false
		},
	},
	data() {
		return {
			host: toUnicode(host),
		};
	}
});
</script>

<style lang="scss" scoped>
.mk-acct {
	> .host {
		opacity: 0.5;
	}
}
</style>