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