2020-01-29 11:37:25 -08:00
|
|
|
<template>
|
|
|
|
<header class="kkwtjztg">
|
2021-11-19 02:36:12 -08:00
|
|
|
<MkA v-user-preview="note.user.id" class="name" :to="userPage(note.user)">
|
2020-10-17 04:12:00 -07:00
|
|
|
<MkUserName :user="note.user"/>
|
2020-10-24 09:21:41 -07:00
|
|
|
</MkA>
|
2021-11-19 02:36:12 -08:00
|
|
|
<div v-if="note.user.isBot" class="is-bot">bot</div>
|
2021-09-20 06:14:49 -07:00
|
|
|
<div class="username"><MkAcct :user="note.user"/></div>
|
2020-01-29 11:37:25 -08:00
|
|
|
<div class="info">
|
2020-10-24 09:21:41 -07:00
|
|
|
<MkA class="created-at" :to="notePage(note)">
|
2020-10-17 04:12:00 -07:00
|
|
|
<MkTime :time="note.createdAt"/>
|
2020-10-24 09:21:41 -07:00
|
|
|
</MkA>
|
2021-11-19 02:36:12 -08:00
|
|
|
<span v-if="note.visibility !== 'public'" class="visibility">
|
2021-04-20 07:22:59 -07: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 11:37:25 -08:00
|
|
|
</span>
|
2021-11-19 02:36:12 -08:00
|
|
|
<span v-if="note.localOnly" class="localOnly"><i class="fas fa-biohazard"></i></span>
|
2020-01-29 11:37:25 -08:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
2022-01-13 17:25:51 -08:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
|
|
|
import * as misskey from 'misskey-js';
|
2021-11-28 03:29:37 -08:00
|
|
|
import { notePage } from '@/filters/note';
|
2021-11-11 09:02:25 -08:00
|
|
|
import { userPage } from '@/filters/user';
|
2020-01-29 11:37:25 -08:00
|
|
|
|
2022-01-13 17:25:51 -08:00
|
|
|
defineProps<{
|
|
|
|
note: misskey.entities.Note;
|
|
|
|
pinned?: boolean;
|
|
|
|
}>();
|
2020-01-29 11:37:25 -08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.kkwtjztg {
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
> .name {
|
2021-09-20 06:14:49 -07:00
|
|
|
flex-shrink: 1;
|
2020-01-29 11:37:25 -08:00
|
|
|
display: block;
|
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
padding: 0;
|
2021-03-02 05:57:16 -08:00
|
|
|
overflow: hidden;
|
2020-01-29 11:37:25 -08: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-09 20:40:50 -07:00
|
|
|
border: solid 0.5px var(--divider);
|
2020-01-29 11:37:25 -08:00
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .username {
|
2021-09-20 06:14:49 -07:00
|
|
|
flex-shrink: 9999999;
|
2020-01-29 11:37:25 -08:00
|
|
|
margin: 0 .5em 0 0;
|
2021-03-02 05:57:16 -08:00
|
|
|
overflow: hidden;
|
2020-01-29 11:37:25 -08:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .info {
|
2021-09-20 06:14:49 -07:00
|
|
|
flex-shrink: 0;
|
2020-01-29 11:37:25 -08:00
|
|
|
margin-left: auto;
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
|
|
|
> .visibility {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
2020-05-16 06:06:39 -07:00
|
|
|
|
|
|
|
> .localOnly {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
2020-01-29 11:37:25 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|