2020-01-29 19:37:25 +00:00
|
|
|
<template>
|
|
|
|
<header class="kkwtjztg">
|
|
|
|
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">
|
|
|
|
<mk-user-name :user="note.user"/>
|
|
|
|
</router-link>
|
|
|
|
<span class="is-bot" v-if="note.user.isBot">bot</span>
|
|
|
|
<span class="username"><mk-acct :user="note.user"/></span>
|
2020-01-30 20:09:52 +00:00
|
|
|
<span class="admin" v-if="note.user.isAdmin"><fa :icon="faBookmark"/></span>
|
|
|
|
<span class="moderator" v-if="!note.user.isAdmin && note.user.isModerator"><fa :icon="farBookmark"/></span>
|
2020-01-29 19:37:25 +00:00
|
|
|
<div class="info">
|
|
|
|
<span class="mobile" v-if="note.viaMobile"><fa :icon="faMobileAlt"/></span>
|
|
|
|
<router-link class="created-at" :to="note | notePage">
|
|
|
|
<mk-time :time="note.createdAt"/>
|
|
|
|
</router-link>
|
|
|
|
<span class="visibility" v-if="note.visibility != 'public'">
|
|
|
|
<fa v-if="note.visibility == 'home'" :icon="faHome"/>
|
|
|
|
<fa v-if="note.visibility == 'followers'" :icon="faUnlock"/>
|
|
|
|
<fa v-if="note.visibility == 'specified'" :icon="faEnvelope"/>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2020-01-30 20:09:52 +00:00
|
|
|
import { faHome, faUnlock, faEnvelope, faMobileAlt, faBookmark } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
import { faBookmark as farBookmark } from '@fortawesome/free-regular-svg-icons';
|
2020-01-29 19:37:25 +00:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
props: {
|
|
|
|
note: {
|
|
|
|
type: Object,
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2020-01-30 20:09:52 +00:00
|
|
|
faHome, faUnlock, faEnvelope, faMobileAlt, faBookmark, farBookmark
|
2020-01-29 19:37:25 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.kkwtjztg {
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
> .name {
|
|
|
|
display: block;
|
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
padding: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
color: var(--noteHeaderName);
|
|
|
|
font-size: 1em;
|
|
|
|
font-weight: bold;
|
|
|
|
text-decoration: none;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .is-bot {
|
|
|
|
flex-shrink: 0;
|
|
|
|
align-self: center;
|
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
padding: 1px 6px;
|
|
|
|
font-size: 80%;
|
2020-01-30 20:09:52 +00:00
|
|
|
border: solid 1px var(--divider);
|
2020-01-29 19:37:25 +00:00
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
2020-01-30 20:21:41 +00:00
|
|
|
> .admin,
|
|
|
|
> .moderator {
|
|
|
|
margin-right: 0.5em;
|
2020-02-15 13:21:35 +00:00
|
|
|
color: var(--badge);
|
2020-01-30 20:21:41 +00:00
|
|
|
}
|
|
|
|
|
2020-01-29 19:37:25 +00:00
|
|
|
> .username {
|
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .info {
|
|
|
|
margin-left: auto;
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
|
|
|
> .mobile {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .visibility {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|