yumechi-no-kuni/src/client/app/common/views/components/acct.vue

32 lines
724 B
Vue
Raw Normal View History

2018-05-18 00:31:30 -05:00
<template>
2019-02-27 21:14:24 -06:00
<span class="mk-acct" v-once>
2018-05-18 00:31:30 -05:00
<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>
2019-01-05 04:59:10 -06:00
<fa v-if="user.isLocked == true" class="locked" icon="lock" fixed-width/>
2018-05-18 00:31:30 -05:00
</span>
</template>
<script lang="ts">
import Vue from 'vue';
2018-09-05 13:21:11 -05:00
import { host } from '../../../config';
2018-11-10 21:35:30 -06:00
import { toUnicode } from 'punycode';
2018-05-18 00:31:30 -05:00
export default Vue.extend({
2018-09-05 13:21:11 -05:00
props: ['user', 'detail'],
data() {
return {
2018-11-10 21:35:30 -06:00
host: toUnicode(host)
2018-09-05 13:21:11 -05:00
};
}
2018-05-18 00:31:30 -05:00
});
</script>
<style lang="stylus" scoped>
.mk-acct
> .host.fade
2018-05-18 00:31:30 -05:00
opacity 0.5
2019-01-05 04:59:10 -06:00
> .locked
opacity 0.8
margin-left 0.5em
2018-05-18 00:31:30 -05:00
</style>