2020-01-29 19:37:25 +00:00
|
|
|
<template>
|
|
|
|
<header class="kkwtjztg">
|
2020-10-24 16:21:41 +00:00
|
|
|
<MkA class="name" :to="userPage(note.user)" v-user-preview="note.user.id">
|
2020-10-17 11:12:00 +00:00
|
|
|
<MkUserName :user="note.user"/>
|
2020-10-24 16:21:41 +00:00
|
|
|
</MkA>
|
2021-09-20 13:14:49 +00:00
|
|
|
<div class="is-bot" v-if="note.user.isBot">bot</div>
|
|
|
|
<div class="username"><MkAcct :user="note.user"/></div>
|
|
|
|
<div class="admin" v-if="note.user.isAdmin"><i class="fas fa-bookmark"></i></div>
|
|
|
|
<div class="moderator" v-if="!note.user.isAdmin && note.user.isModerator"><i class="far fa-bookmark"></i></div>
|
2020-01-29 19:37:25 +00:00
|
|
|
<div class="info">
|
2021-04-20 14:22:59 +00:00
|
|
|
<span class="mobile" v-if="note.viaMobile"><i class="fas fa-mobile-alt"></i></span>
|
2020-10-24 16:21:41 +00:00
|
|
|
<MkA class="created-at" :to="notePage(note)">
|
2020-10-17 11:12:00 +00:00
|
|
|
<MkTime :time="note.createdAt"/>
|
2020-10-24 16:21:41 +00:00
|
|
|
</MkA>
|
2020-05-16 13:06:39 +00:00
|
|
|
<span class="visibility" v-if="note.visibility !== 'public'">
|
2021-04-20 14:22:59 +00:00
|
|
|
<i v-if="note.visibility === 'home'" class="fas fa-home"></i>
|
|
|
|
<i v-else-if="note.visibility === 'followers'" class="fas fa-unlock"></i>
|
|
|
|
<i v-else-if="note.visibility === 'specified'" class="fas fa-envelope"></i>
|
2020-01-29 19:37:25 +00:00
|
|
|
</span>
|
2021-04-20 14:22:59 +00:00
|
|
|
<span class="localOnly" v-if="note.localOnly"><i class="fas fa-biohazard"></i></span>
|
2020-01-29 19:37:25 +00:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-17 11:12:00 +00:00
|
|
|
import { defineComponent } from 'vue';
|
2021-08-05 07:34:18 +00:00
|
|
|
import notePage from '@client/filters/note';
|
|
|
|
import { userPage } from '@client/filters/user';
|
2021-03-23 08:30:14 +00:00
|
|
|
import * as os from '@client/os';
|
2020-01-29 19:37:25 +00:00
|
|
|
|
2020-10-17 11:12:00 +00:00
|
|
|
export default defineComponent({
|
2020-01-29 19:37:25 +00:00
|
|
|
props: {
|
|
|
|
note: {
|
|
|
|
type: Object,
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
};
|
2020-10-17 11:12:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
notePage,
|
|
|
|
userPage
|
2020-01-29 19:37:25 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.kkwtjztg {
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
> .name {
|
2021-09-20 13:14:49 +00:00
|
|
|
flex-shrink: 1;
|
2020-01-29 19:37:25 +00:00
|
|
|
display: block;
|
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
padding: 0;
|
2021-03-02 13:57:16 +00:00
|
|
|
overflow: hidden;
|
2020-01-29 19:37:25 +00:00
|
|
|
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%;
|
2021-04-10 03:40:50 +00:00
|
|
|
border: solid 0.5px var(--divider);
|
2020-01-29 19:37:25 +00:00
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
2020-01-30 20:21:41 +00:00
|
|
|
> .admin,
|
|
|
|
> .moderator {
|
2021-09-20 13:14:49 +00:00
|
|
|
flex-shrink: 0;
|
2020-01-30 20:21:41 +00:00
|
|
|
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 {
|
2021-09-20 13:14:49 +00:00
|
|
|
flex-shrink: 9999999;
|
2020-01-29 19:37:25 +00:00
|
|
|
margin: 0 .5em 0 0;
|
2021-03-02 13:57:16 +00:00
|
|
|
overflow: hidden;
|
2020-01-29 19:37:25 +00:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .info {
|
2021-09-20 13:14:49 +00:00
|
|
|
flex-shrink: 0;
|
2020-01-29 19:37:25 +00:00
|
|
|
margin-left: auto;
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
|
|
|
> .mobile {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .visibility {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
2020-05-16 13:06:39 +00:00
|
|
|
|
|
|
|
> .localOnly {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
2020-01-29 19:37:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|