2018-06-08 06:57:02 -05:00
|
|
|
<template>
|
|
|
|
<header class="bvonvjxbwzaiskogyhbwgyxvcgserpmu">
|
|
|
|
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle == 'smart'"/>
|
2018-12-05 19:02:04 -06:00
|
|
|
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">
|
|
|
|
<misskey-flavored-markdown :text="note.user.name || note.user.username" :shouldBreak="false" :plainText="true" :custom-emojis="note.user.emojis"/>
|
|
|
|
</router-link>
|
2018-06-08 06:57:02 -05:00
|
|
|
<span class="is-admin" v-if="note.user.isAdmin">admin</span>
|
|
|
|
<span class="is-bot" v-if="note.user.isBot">bot</span>
|
|
|
|
<span class="is-cat" v-if="note.user.isCat">cat</span>
|
|
|
|
<span class="username"><mk-acct :user="note.user"/></span>
|
2018-11-08 12:44:35 -06:00
|
|
|
<span class="is-verified" v-if="note.user.isVerified" :title="$t('@.verified-user')"><fa icon="star"/></span>
|
2018-06-08 06:57:02 -05:00
|
|
|
<div class="info">
|
2018-11-09 06:10:21 -06:00
|
|
|
<span class="app" v-if="note.app && !mini && $store.state.settings.showVia">via <b>{{ note.app.name }}</b></span>
|
2018-11-05 10:40:11 -06:00
|
|
|
<span class="mobile" v-if="note.viaMobile"><fa icon="mobile-alt"/></span>
|
2018-06-08 06:57:02 -05:00
|
|
|
<router-link class="created-at" :to="note | notePage">
|
|
|
|
<mk-time :time="note.createdAt"/>
|
|
|
|
</router-link>
|
|
|
|
<span class="visibility" v-if="note.visibility != 'public'">
|
2018-11-15 14:53:17 -06:00
|
|
|
<fa v-if="note.visibility == 'home'" icon="home"/>
|
|
|
|
<fa v-if="note.visibility == 'followers'" icon="unlock"/>
|
|
|
|
<fa v-if="note.visibility == 'specified'" icon="envelope"/>
|
|
|
|
<fa v-if="note.visibility == 'private'" icon="lock"/>
|
2018-11-15 14:47:29 -06:00
|
|
|
</span>
|
2018-11-15 14:53:17 -06:00
|
|
|
<span class="localOnly" v-if="note.localOnly == true"><fa icon="heart"/></span>
|
2018-06-08 06:57:02 -05:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-11-08 12:44:35 -06:00
|
|
|
import i18n from '../../../i18n';
|
2018-06-08 06:57:02 -05:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-11-08 12:44:35 -06:00
|
|
|
i18n: i18n(),
|
2018-06-08 06:57:02 -05:00
|
|
|
props: {
|
|
|
|
note: {
|
|
|
|
type: Object,
|
|
|
|
required: true
|
2018-06-08 07:17:48 -05:00
|
|
|
},
|
|
|
|
mini: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false
|
2018-06-08 06:57:02 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-09-26 12:18:54 -05:00
|
|
|
.bvonvjxbwzaiskogyhbwgyxvcgserpmu
|
2018-06-08 06:57:02 -05:00
|
|
|
display flex
|
|
|
|
align-items baseline
|
|
|
|
white-space nowrap
|
|
|
|
|
|
|
|
> .avatar
|
|
|
|
flex-shrink 0
|
|
|
|
margin-right 8px
|
|
|
|
width 20px
|
|
|
|
height 20px
|
|
|
|
border-radius 100%
|
|
|
|
|
|
|
|
> .name
|
|
|
|
display block
|
|
|
|
margin 0 .5em 0 0
|
|
|
|
padding 0
|
|
|
|
overflow hidden
|
2018-09-26 12:18:54 -05:00
|
|
|
color var(--noteHeaderName)
|
2018-06-08 06:57:02 -05:00
|
|
|
font-size 1em
|
|
|
|
font-weight bold
|
|
|
|
text-decoration none
|
|
|
|
text-overflow ellipsis
|
|
|
|
|
|
|
|
&:hover
|
|
|
|
text-decoration underline
|
|
|
|
|
|
|
|
> .is-admin
|
|
|
|
> .is-bot
|
|
|
|
> .is-cat
|
2018-06-21 07:19:54 -05:00
|
|
|
flex-shrink 0
|
2018-06-08 06:57:02 -05:00
|
|
|
align-self center
|
|
|
|
margin 0 .5em 0 0
|
|
|
|
padding 1px 6px
|
2018-06-08 07:50:31 -05:00
|
|
|
font-size 80%
|
2018-09-26 12:18:54 -05:00
|
|
|
color var(--noteHeaderBadgeFg)
|
|
|
|
background var(--noteHeaderBadgeBg)
|
2018-06-08 06:57:02 -05:00
|
|
|
border-radius 3px
|
|
|
|
|
|
|
|
&.is-admin
|
2018-09-26 12:18:54 -05:00
|
|
|
background var(--noteHeaderAdminBg)
|
|
|
|
color var(--noteHeaderAdminFg)
|
2018-06-08 06:57:02 -05:00
|
|
|
|
|
|
|
> .username
|
|
|
|
margin 0 .5em 0 0
|
|
|
|
overflow hidden
|
|
|
|
text-overflow ellipsis
|
2018-09-26 12:18:54 -05:00
|
|
|
color var(--noteHeaderAcct)
|
2018-06-22 06:55:19 -05:00
|
|
|
flex-shrink 2147483647
|
2018-06-08 06:57:02 -05:00
|
|
|
|
2018-10-30 21:29:03 -05:00
|
|
|
> .is-verified
|
|
|
|
margin 0 .5em 0 0
|
|
|
|
color #4dabf7
|
|
|
|
|
2018-06-08 06:57:02 -05:00
|
|
|
> .info
|
|
|
|
margin-left auto
|
|
|
|
font-size 0.9em
|
|
|
|
|
|
|
|
> *
|
2018-09-26 12:18:54 -05:00
|
|
|
color var(--noteHeaderInfo)
|
2018-06-08 06:57:02 -05:00
|
|
|
|
|
|
|
> .mobile
|
|
|
|
margin-right 8px
|
|
|
|
|
|
|
|
> .app
|
|
|
|
margin-right 8px
|
|
|
|
padding-right 8px
|
2018-09-26 10:54:37 -05:00
|
|
|
border-right solid 1px var(--faceDivider)
|
2018-06-08 06:57:02 -05:00
|
|
|
|
|
|
|
> .visibility
|
|
|
|
margin-left 8px
|
|
|
|
|
2018-11-15 14:47:29 -06:00
|
|
|
> .localOnly
|
|
|
|
margin-left 4px
|
|
|
|
|
2018-06-08 06:57:02 -05:00
|
|
|
</style>
|