1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-27 13:08:23 +09:00
misskey/src/client/app/common/views/components/acct.vue

27 lines
596 B
Vue
Raw Normal View History

2018-05-18 14:31:30 +09:00
<template>
<span class="mk-acct">
<span class="name">@{{ user.username }}</span>
<span class="host" :class="{ fade: $store.state.settings.contrastedAcct }" v-if="user.host || detail || $store.state.settings.showFullAcct">@{{ user.host || host }}</span>
2018-05-18 14:31:30 +09:00
</span>
</template>
<script lang="ts">
import Vue from 'vue';
2018-09-06 03:21:11 +09:00
import { host } from '../../../config';
2018-11-11 12:35:30 +09:00
import { toUnicode } from 'punycode';
2018-05-18 14:31:30 +09:00
export default Vue.extend({
2018-09-06 03:21:11 +09:00
props: ['user', 'detail'],
data() {
return {
2018-11-11 12:35:30 +09:00
host: toUnicode(host)
2018-09-06 03:21:11 +09:00
};
}
2018-05-18 14:31:30 +09:00
});
</script>
<style lang="stylus" scoped>
.mk-acct
> .host.fade
2018-05-18 14:31:30 +09:00
opacity 0.5
</style>