2020-01-29 20:37:25 +01:00
|
|
|
<template>
|
|
|
|
<header class="kkwtjztg">
|
2023-01-05 05:08:48 +01:00
|
|
|
<div class="user-info">
|
|
|
|
<div>
|
2023-02-24 02:14:43 +01:00
|
|
|
<MkA v-user-preview="note.user.id" class="name" :to="userPage(note.user)" @click.stop>
|
2023-01-05 05:08:48 +01:00
|
|
|
<MkUserName :user="note.user" class="mkusername">
|
|
|
|
<span v-if="note.user.isBot" class="is-bot">bot</span>
|
|
|
|
</MkUserName>
|
|
|
|
</MkA>
|
2023-01-05 17:08:23 +01:00
|
|
|
<div class="username"><MkAcct :user="note.user"/></div>
|
|
|
|
</div>
|
|
|
|
<div>
|
2023-01-05 05:08:48 +01:00
|
|
|
<div class="info">
|
|
|
|
<MkA class="created-at" :to="notePage(note)">
|
|
|
|
<MkTime :time="note.createdAt"/>
|
|
|
|
</MkA>
|
|
|
|
<MkVisibility :note="note"/>
|
|
|
|
</div>
|
|
|
|
<MkInstanceTicker v-if="showTicker" class="ticker" :instance="note.user.instance"/>
|
|
|
|
</div>
|
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';
|
2023-01-03 18:35:30 +01:00
|
|
|
import type * as misskey from 'calckey-js';
|
2023-01-05 05:37:22 +01:00
|
|
|
import { defaultStore, noteViewInterruptors } from '@/store';
|
2022-08-30 17:24:33 +02:00
|
|
|
import MkVisibility from '@/components/MkVisibility.vue';
|
2023-01-05 05:37:22 +01:00
|
|
|
import MkInstanceTicker from '@/components/MkInstanceTicker.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';
|
2023-01-21 20:09:13 +01:00
|
|
|
import { deepClone } from '@/scripts/clone';
|
2020-01-29 20:37:25 +01:00
|
|
|
|
2023-01-21 20:09:13 +01:00
|
|
|
const props = defineProps<{
|
2022-01-14 02:25:51 +01:00
|
|
|
note: misskey.entities.Note;
|
|
|
|
pinned?: boolean;
|
|
|
|
}>();
|
2023-01-21 20:09:13 +01:00
|
|
|
|
|
|
|
let note = $ref(deepClone(props.note));
|
|
|
|
|
|
|
|
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && note.user.instance);
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.kkwtjztg {
|
2023-02-25 07:15:42 +01:00
|
|
|
position: relative;
|
|
|
|
z-index: 2;
|
2020-01-29 20:37:25 +01:00
|
|
|
display: flex;
|
2023-01-05 05:08:48 +01:00
|
|
|
align-items: center;
|
2020-01-29 20:37:25 +01:00
|
|
|
white-space: nowrap;
|
2023-01-03 18:35:30 +01:00
|
|
|
justify-self: flex-end;
|
|
|
|
border-radius: 100px;
|
|
|
|
font-size: .8em;
|
2023-01-04 03:51:40 +01:00
|
|
|
text-shadow: 0 2px 2px var(--shadow);
|
2020-01-29 20:37:25 +01:00
|
|
|
|
2023-01-05 05:08:48 +01:00
|
|
|
> .avatar {
|
|
|
|
width: 3.7em;
|
|
|
|
height: 3.7em;
|
2023-01-05 05:37:22 +01:00
|
|
|
margin-right: 1em;
|
2023-01-05 05:08:48 +01:00
|
|
|
}
|
|
|
|
> .user-info {
|
2023-01-05 05:37:22 +01:00
|
|
|
width: 0;
|
2023-01-05 05:08:48 +01:00
|
|
|
flex-grow: 1;
|
2023-01-05 05:37:22 +01:00
|
|
|
line-height: 1.5;
|
2023-01-05 17:08:23 +01:00
|
|
|
display: flex;
|
|
|
|
font-size: 1.2em;
|
2023-01-05 05:08:48 +01:00
|
|
|
> div {
|
2023-01-05 17:08:23 +01:00
|
|
|
&:first-child {
|
|
|
|
flex-grow: 1;
|
|
|
|
width: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
max-width: 50%;
|
|
|
|
gap: .2em .5em;
|
|
|
|
}
|
|
|
|
.article > .main & {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-start;
|
|
|
|
&:last-child {
|
|
|
|
align-items: flex-end;
|
|
|
|
}
|
|
|
|
> * {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
}
|
2023-01-04 00:31:07 +01:00
|
|
|
}
|
2023-01-05 05:08:48 +01:00
|
|
|
.name {
|
2023-01-05 17:08:23 +01:00
|
|
|
// flex: 1 1 0px;
|
|
|
|
display: inline;
|
2023-01-05 05:08:48 +01:00
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
padding: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
font-weight: bold;
|
|
|
|
text-decoration: none;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
.mkusername >.is-bot {
|
|
|
|
flex-shrink: 0;
|
|
|
|
align-self: center;
|
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
padding: 1px 6px;
|
|
|
|
font-size: 80%;
|
|
|
|
border: solid 0.5px var(--divider);
|
|
|
|
border-radius: 3px;
|
|
|
|
}
|
2023-01-04 00:31:07 +01:00
|
|
|
|
2023-01-05 05:08:48 +01:00
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
2020-01-29 20:37:25 +01:00
|
|
|
}
|
|
|
|
|
2023-01-05 05:08:48 +01:00
|
|
|
.username {
|
2023-01-05 17:08:23 +01:00
|
|
|
display: inline;
|
2023-01-05 05:08:48 +01:00
|
|
|
margin: 0 .5em 0 0;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
align-self: flex-start;
|
2023-01-07 07:43:52 +01:00
|
|
|
font-size: .9em;
|
2023-01-05 05:08:48 +01:00
|
|
|
}
|
2020-01-29 20:37:25 +01:00
|
|
|
|
2023-01-05 05:08:48 +01:00
|
|
|
.info {
|
2023-01-05 17:08:23 +01:00
|
|
|
display: inline-flex;
|
2023-01-05 05:08:48 +01:00
|
|
|
flex-shrink: 0;
|
2023-01-05 17:08:23 +01:00
|
|
|
margin-left: .5em;
|
2023-01-05 05:08:48 +01:00
|
|
|
font-size: 0.9em;
|
2023-01-05 17:08:23 +01:00
|
|
|
.created-at {
|
|
|
|
max-width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.ticker {
|
|
|
|
display: inline-flex;
|
|
|
|
margin-left: .5em;
|
|
|
|
vertical-align: middle;
|
|
|
|
> .name {
|
|
|
|
display: none;
|
|
|
|
}
|
2023-01-05 05:08:48 +01:00
|
|
|
}
|
2020-01-29 20:37:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|