forked from FoundKeyGang/FoundKey
🎨
This commit is contained in:
parent
a01607fd97
commit
a6a175ede1
7 changed files with 26 additions and 5 deletions
19
src/client/app/common/views/components/acct.vue
Normal file
19
src/client/app/common/views/components/acct.vue
Normal file
|
@ -0,0 +1,19 @@
|
|||
<template>
|
||||
<span class="mk-acct">
|
||||
<span class="name">@{{ user.username }}</span>
|
||||
<span class="host" v-if="user.host">@{{ user.host }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
export default Vue.extend({
|
||||
props: ['user']
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-acct
|
||||
> .host
|
||||
opacity 0.5
|
||||
</style>
|
|
@ -3,6 +3,7 @@ import Vue from 'vue';
|
|||
import signin from './signin.vue';
|
||||
import signup from './signup.vue';
|
||||
import forkit from './forkit.vue';
|
||||
import acct from './acct.vue';
|
||||
import avatar from './avatar.vue';
|
||||
import nav from './nav.vue';
|
||||
import noteHtml from './note-html';
|
||||
|
@ -29,6 +30,7 @@ import welcomeTimeline from './welcome-timeline.vue';
|
|||
Vue.component('mk-signin', signin);
|
||||
Vue.component('mk-signup', signup);
|
||||
Vue.component('mk-forkit', forkit);
|
||||
Vue.component('mk-acct', acct);
|
||||
Vue.component('mk-avatar', avatar);
|
||||
Vue.component('mk-nav', nav);
|
||||
Vue.component('mk-note-html', noteHtml);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<header>
|
||||
<div class="left">
|
||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
|
||||
<span class="username">@{{ note.user | acct }}</span>
|
||||
<span class="username"><mk-acct :user="note.user"/></span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<router-link class="time" :to="note | notePage">
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<mk-avatar class="avatar" :user="p.user"/>
|
||||
<header>
|
||||
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
||||
<span class="username">@{{ p.user | acct }}</span>
|
||||
<span class="username"><mk-acct :user="p.user"/></span>
|
||||
<router-link class="time" :to="p | notePage">
|
||||
<mk-time :time="p.createdAt"/>
|
||||
</router-link>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
|
||||
<span class="username">@{{ note.user | acct }}</span>
|
||||
<span class="username"><mk-acct :user="note.user"/></span>
|
||||
<router-link class="time" :to="note | notePage">
|
||||
<mk-time :time="note.createdAt"/>
|
||||
</router-link>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
|
||||
<span class="username">@{{ note.user | acct }}</span>
|
||||
<span class="username"><mk-acct :user="note.user"/></span>
|
||||
<div class="info">
|
||||
<span class="mobile" v-if="note.viaMobile">%fa:mobile-alt%</span>
|
||||
<router-link class="created-at" :to="note | notePage">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<header>
|
||||
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
||||
<span class="is-bot" v-if="p.user.host === null && p.user.isBot">bot</span>
|
||||
<span class="username">@{{ p.user | acct }}</span>
|
||||
<span class="username"><mk-acct :user="p.user"/></span>
|
||||
<div class="info">
|
||||
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
||||
<span class="mobile" v-if="p.viaMobile">%fa:mobile-alt%</span>
|
||||
|
|
Loading…
Reference in a new issue