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