2020-01-30 04:37:25 +09:00
|
|
|
<template>
|
2023-04-08 09:01:42 +09:00
|
|
|
<div
|
|
|
|
ref="elRef"
|
|
|
|
v-size="{ max: [500, 600] }"
|
2023-05-23 10:11:35 +09:00
|
|
|
class="qglefbjs notification"
|
2023-04-08 09:01:42 +09:00
|
|
|
:class="notification.type"
|
|
|
|
>
|
|
|
|
<div class="head">
|
|
|
|
<MkAvatar
|
|
|
|
v-if="notification.type === 'pollEnded'"
|
|
|
|
class="icon"
|
|
|
|
:user="notification.note.user"
|
2021-11-08 03:38:48 +09:00
|
|
|
/>
|
2023-04-08 09:01:42 +09:00
|
|
|
<MkAvatar
|
|
|
|
v-else-if="notification.user"
|
|
|
|
class="icon"
|
|
|
|
:user="notification.user"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
v-else-if="notification.icon"
|
|
|
|
class="icon"
|
|
|
|
:src="notification.icon"
|
|
|
|
alt=""
|
|
|
|
/>
|
|
|
|
<div class="sub-icon" :class="notification.type">
|
|
|
|
<i
|
|
|
|
v-if="notification.type === 'follow'"
|
|
|
|
class="ph-hand-waving ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'receiveFollowRequest'"
|
|
|
|
class="ph-clock ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'followRequestAccepted'"
|
|
|
|
class="ph-check ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'groupInvited'"
|
|
|
|
class="ph-identification-card ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'renote'"
|
|
|
|
class="ph-repeat ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'reply'"
|
|
|
|
class="ph-arrow-bend-up-left ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'mention'"
|
|
|
|
class="ph-at ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'quote'"
|
|
|
|
class="ph-quotes ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'pollVote'"
|
|
|
|
class="ph-microphone-stage ph-bold"
|
|
|
|
></i>
|
|
|
|
<i
|
|
|
|
v-else-if="notification.type === 'pollEnded'"
|
|
|
|
class="ph-microphone-stage ph-bold"
|
|
|
|
></i>
|
|
|
|
<!-- notification.reaction が null になることはまずないが、ここでoptional chaining使うと一部ブラウザで刺さるので念の為 -->
|
|
|
|
<XReactionIcon
|
2023-04-20 11:53:28 +09:00
|
|
|
v-else-if="
|
2023-04-20 16:57:36 +09:00
|
|
|
showEmojiReactions && notification.type === 'reaction'
|
2023-04-20 11:53:28 +09:00
|
|
|
"
|
2023-04-08 09:01:42 +09:00
|
|
|
ref="reactionRef"
|
|
|
|
:reaction="
|
|
|
|
notification.reaction
|
|
|
|
? notification.reaction.replace(
|
|
|
|
/^:(\w+):$/,
|
|
|
|
':$1@.:'
|
|
|
|
)
|
|
|
|
: notification.reaction
|
|
|
|
"
|
|
|
|
:custom-emojis="notification.note.emojis"
|
|
|
|
:no-style="true"
|
|
|
|
/>
|
2023-04-20 11:53:28 +09:00
|
|
|
<XReactionIcon
|
|
|
|
v-else-if="
|
2023-04-20 16:57:36 +09:00
|
|
|
!showEmojiReactions && notification.type === 'reaction'
|
2023-04-20 11:53:28 +09:00
|
|
|
"
|
|
|
|
:reaction="defaultReaction"
|
|
|
|
:no-style="true"
|
|
|
|
/>
|
2023-04-08 09:01:42 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-30 11:38:26 +09:00
|
|
|
<div class="tail">
|
2023-04-08 09:01:42 +09:00
|
|
|
<header>
|
|
|
|
<span v-if="notification.type === 'pollEnded'">{{
|
|
|
|
i18n.ts._notification.pollEnded
|
|
|
|
}}</span>
|
|
|
|
<MkA
|
|
|
|
v-else-if="notification.user"
|
|
|
|
v-user-preview="notification.user.id"
|
|
|
|
class="name"
|
|
|
|
:to="userPage(notification.user)"
|
|
|
|
><MkUserName :user="notification.user"
|
|
|
|
/></MkA>
|
|
|
|
<span v-else>{{ notification.header }}</span>
|
|
|
|
<MkTime
|
|
|
|
v-if="withTime"
|
|
|
|
:time="notification.createdAt"
|
|
|
|
class="time"
|
|
|
|
/>
|
|
|
|
</header>
|
|
|
|
<MkA
|
|
|
|
v-if="notification.type === 'reaction'"
|
|
|
|
class="text"
|
|
|
|
:to="notePage(notification.note)"
|
2023-04-30 11:38:26 +09:00
|
|
|
:title="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
>
|
2023-05-23 10:11:35 +09:00
|
|
|
<span>{{ i18n.ts._notification.reacted }}</span>
|
2023-04-08 09:01:42 +09:00
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
<Mfm
|
2023-04-30 11:38:26 +09:00
|
|
|
:text="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
:plain="true"
|
|
|
|
:nowrap="!full"
|
|
|
|
:custom-emojis="notification.note.emojis"
|
|
|
|
/>
|
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
</MkA>
|
|
|
|
<MkA
|
|
|
|
v-if="notification.type === 'renote'"
|
|
|
|
class="text"
|
|
|
|
:to="notePage(notification.note)"
|
|
|
|
:title="getNoteSummary(notification.note.renote)"
|
|
|
|
>
|
2023-05-23 10:11:35 +09:00
|
|
|
<span>{{ i18n.ts._notification.renoted }}</span>
|
2023-04-08 09:01:42 +09:00
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
<Mfm
|
|
|
|
:text="getNoteSummary(notification.note.renote)"
|
|
|
|
:plain="true"
|
|
|
|
:nowrap="!full"
|
|
|
|
:custom-emojis="notification.note.renote.emojis"
|
|
|
|
/>
|
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
</MkA>
|
|
|
|
<MkA
|
|
|
|
v-if="notification.type === 'reply'"
|
|
|
|
class="text"
|
|
|
|
:to="notePage(notification.note)"
|
2023-04-30 11:38:26 +09:00
|
|
|
:title="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
>
|
|
|
|
<Mfm
|
2023-04-30 11:38:26 +09:00
|
|
|
:text="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
:plain="true"
|
|
|
|
:nowrap="!full"
|
|
|
|
:custom-emojis="notification.note.emojis"
|
|
|
|
/>
|
|
|
|
</MkA>
|
|
|
|
<MkA
|
|
|
|
v-if="notification.type === 'mention'"
|
|
|
|
class="text"
|
|
|
|
:to="notePage(notification.note)"
|
2023-04-30 11:38:26 +09:00
|
|
|
:title="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
>
|
|
|
|
<Mfm
|
2023-04-30 11:38:26 +09:00
|
|
|
:text="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
:plain="true"
|
|
|
|
:nowrap="!full"
|
|
|
|
:custom-emojis="notification.note.emojis"
|
|
|
|
/>
|
|
|
|
</MkA>
|
|
|
|
<MkA
|
|
|
|
v-if="notification.type === 'quote'"
|
|
|
|
class="text"
|
|
|
|
:to="notePage(notification.note)"
|
2023-04-30 11:38:26 +09:00
|
|
|
:title="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
>
|
|
|
|
<Mfm
|
2023-04-30 11:38:26 +09:00
|
|
|
:text="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
:plain="true"
|
|
|
|
:nowrap="!full"
|
|
|
|
:custom-emojis="notification.note.emojis"
|
|
|
|
/>
|
|
|
|
</MkA>
|
|
|
|
<MkA
|
|
|
|
v-if="notification.type === 'pollVote'"
|
|
|
|
class="text"
|
|
|
|
:to="notePage(notification.note)"
|
2023-04-30 11:38:26 +09:00
|
|
|
:title="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
>
|
2023-05-23 10:11:35 +09:00
|
|
|
<span>{{ i18n.ts._notification.voted }}</span>
|
2023-04-08 09:01:42 +09:00
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
<Mfm
|
2023-04-30 11:38:26 +09:00
|
|
|
:text="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
:plain="true"
|
|
|
|
:nowrap="!full"
|
|
|
|
:custom-emojis="notification.note.emojis"
|
|
|
|
/>
|
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
</MkA>
|
|
|
|
<MkA
|
|
|
|
v-if="notification.type === 'pollEnded'"
|
|
|
|
class="text"
|
|
|
|
:to="notePage(notification.note)"
|
2023-04-30 11:38:26 +09:00
|
|
|
:title="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
>
|
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
<Mfm
|
2023-04-30 11:38:26 +09:00
|
|
|
:text="getNoteSummary(notification.note)"
|
2023-04-08 09:01:42 +09:00
|
|
|
:plain="true"
|
|
|
|
:nowrap="!full"
|
|
|
|
:custom-emojis="notification.note.emojis"
|
|
|
|
/>
|
|
|
|
<i class="ph-quotes ph-fill ph-lg"></i>
|
|
|
|
</MkA>
|
|
|
|
<span
|
|
|
|
v-if="notification.type === 'follow'"
|
|
|
|
class="text"
|
2023-05-23 10:11:35 +09:00
|
|
|
style="opacity: 0.7"
|
2023-04-08 09:01:42 +09:00
|
|
|
>{{ i18n.ts.youGotNewFollower }}
|
|
|
|
<div v-if="full">
|
|
|
|
<MkFollowButton
|
|
|
|
:user="notification.user"
|
|
|
|
:full="true"
|
|
|
|
/></div
|
|
|
|
></span>
|
|
|
|
<span
|
|
|
|
v-if="notification.type === 'followRequestAccepted'"
|
|
|
|
class="text"
|
2023-05-23 10:11:35 +09:00
|
|
|
style="opacity: 0.7"
|
2023-04-08 09:01:42 +09:00
|
|
|
>{{ i18n.ts.followRequestAccepted }}</span
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
v-if="notification.type === 'receiveFollowRequest'"
|
|
|
|
class="text"
|
2023-05-23 10:11:35 +09:00
|
|
|
style="opacity: 0.7"
|
2023-04-08 09:01:42 +09:00
|
|
|
>{{ i18n.ts.receiveFollowRequest }}
|
|
|
|
<div v-if="full && !followRequestDone">
|
|
|
|
<button class="_textButton" @click="acceptFollowRequest()">
|
|
|
|
{{ i18n.ts.accept }}
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
<button class="_textButton" @click="rejectFollowRequest()">
|
|
|
|
{{ i18n.ts.reject }}
|
|
|
|
</button>
|
|
|
|
</div></span
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
v-if="notification.type === 'groupInvited'"
|
|
|
|
class="text"
|
2023-05-23 10:11:35 +09:00
|
|
|
style="opacity: 0.7"
|
2023-04-08 09:01:42 +09:00
|
|
|
>{{ i18n.ts.groupInvited }}:
|
|
|
|
<b>{{ notification.invitation.group.name }}</b>
|
|
|
|
<div v-if="full && !groupInviteDone">
|
|
|
|
<button
|
|
|
|
class="_textButton"
|
|
|
|
@click="acceptGroupInvitation()"
|
|
|
|
>
|
|
|
|
{{ i18n.ts.accept }}
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
<button
|
|
|
|
class="_textButton"
|
|
|
|
@click="rejectGroupInvitation()"
|
|
|
|
>
|
|
|
|
{{ i18n.ts.reject }}
|
|
|
|
</button>
|
|
|
|
</div></span
|
|
|
|
>
|
|
|
|
<span v-if="notification.type === 'app'" class="text">
|
|
|
|
<Mfm :text="notification.body" :nowrap="!full" />
|
|
|
|
</span>
|
2020-01-30 04:37:25 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-06-28 14:34:44 +09:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 09:01:42 +09:00
|
|
|
import { ref, onMounted, onUnmounted, watch } from "vue";
|
|
|
|
import * as misskey from "calckey-js";
|
|
|
|
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
|
|
|
import MkFollowButton from "@/components/MkFollowButton.vue";
|
|
|
|
import XReactionTooltip from "@/components/MkReactionTooltip.vue";
|
|
|
|
import { getNoteSummary } from "@/scripts/get-note-summary";
|
|
|
|
import { notePage } from "@/filters/note";
|
|
|
|
import { userPage } from "@/filters/user";
|
|
|
|
import { i18n } from "@/i18n";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import { stream } from "@/stream";
|
|
|
|
import { useTooltip } from "@/scripts/use-tooltip";
|
2023-04-20 11:53:28 +09:00
|
|
|
import { defaultStore } from "@/store";
|
|
|
|
import { instance } from "@/instance";
|
2023-04-08 09:01:42 +09:00
|
|
|
|
|
|
|
const props = withDefaults(
|
|
|
|
defineProps<{
|
|
|
|
notification: misskey.entities.Notification;
|
|
|
|
withTime?: boolean;
|
|
|
|
full?: boolean;
|
|
|
|
}>(),
|
|
|
|
{
|
|
|
|
withTime: false,
|
|
|
|
full: false,
|
|
|
|
}
|
|
|
|
);
|
2022-06-28 14:34:44 +09:00
|
|
|
|
|
|
|
const elRef = ref<HTMLElement>(null);
|
|
|
|
const reactionRef = ref(null);
|
|
|
|
|
2023-04-20 16:57:36 +09:00
|
|
|
const showEmojiReactions =
|
|
|
|
defaultStore.state.enableEmojiReactions ||
|
|
|
|
defaultStore.state.showEmojisInReactionNotifications;
|
2023-04-20 11:53:28 +09:00
|
|
|
const defaultReaction = ["⭐", "👍", "❤️"].includes(instance.defaultReaction)
|
|
|
|
? instance.defaultReaction
|
|
|
|
: "⭐";
|
|
|
|
|
2022-06-28 14:34:44 +09:00
|
|
|
let readObserver: IntersectionObserver | undefined;
|
|
|
|
let connection;
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
if (!props.notification.isRead) {
|
|
|
|
readObserver = new IntersectionObserver((entries, observer) => {
|
2023-04-08 09:01:42 +09:00
|
|
|
if (!entries.some((entry) => entry.isIntersecting)) return;
|
|
|
|
stream.send("readNotification", {
|
2022-06-28 14:34:44 +09:00
|
|
|
id: props.notification.id,
|
|
|
|
});
|
|
|
|
observer.disconnect();
|
2022-06-26 03:12:58 +09:00
|
|
|
});
|
2020-05-26 14:34:49 +09:00
|
|
|
|
2022-06-28 14:34:44 +09:00
|
|
|
readObserver.observe(elRef.value);
|
|
|
|
|
2023-04-08 09:01:42 +09:00
|
|
|
connection = stream.useChannel("main");
|
|
|
|
connection.on("readAllNotifications", () => readObserver.disconnect());
|
2022-06-28 14:34:44 +09:00
|
|
|
|
|
|
|
watch(props.notification.isRead, () => {
|
|
|
|
readObserver.disconnect();
|
2021-11-12 23:53:10 +09:00
|
|
|
});
|
2022-06-28 14:34:44 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
if (readObserver) readObserver.disconnect();
|
|
|
|
if (connection) connection.dispose();
|
|
|
|
});
|
2021-11-08 03:38:48 +09:00
|
|
|
|
2022-06-28 14:34:44 +09:00
|
|
|
const followRequestDone = ref(false);
|
|
|
|
const groupInviteDone = ref(false);
|
|
|
|
|
|
|
|
const acceptFollowRequest = () => {
|
|
|
|
followRequestDone.value = true;
|
2023-04-08 09:01:42 +09:00
|
|
|
os.api("following/requests/accept", { userId: props.notification.user.id });
|
2022-06-28 14:34:44 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
const rejectFollowRequest = () => {
|
|
|
|
followRequestDone.value = true;
|
2023-04-08 09:01:42 +09:00
|
|
|
os.api("following/requests/reject", { userId: props.notification.user.id });
|
2022-06-28 14:34:44 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
const acceptGroupInvitation = () => {
|
|
|
|
groupInviteDone.value = true;
|
2023-04-08 09:01:42 +09:00
|
|
|
os.apiWithDialog("users/groups/invitations/accept", {
|
|
|
|
invitationId: props.notification.invitation.id,
|
|
|
|
});
|
2022-06-28 14:34:44 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
const rejectGroupInvitation = () => {
|
|
|
|
groupInviteDone.value = true;
|
2023-04-08 09:01:42 +09:00
|
|
|
os.api("users/groups/invitations/reject", {
|
|
|
|
invitationId: props.notification.invitation.id,
|
|
|
|
});
|
2022-06-28 14:34:44 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
useTooltip(reactionRef, (showing) => {
|
2023-04-08 09:01:42 +09:00
|
|
|
os.popup(
|
|
|
|
XReactionTooltip,
|
|
|
|
{
|
|
|
|
showing,
|
|
|
|
reaction: props.notification.reaction
|
|
|
|
? props.notification.reaction.replace(/^:(\w+):$/, ":$1@.:")
|
|
|
|
: props.notification.reaction,
|
|
|
|
emojis: props.notification.note.emojis,
|
|
|
|
targetElement: reactionRef.value.$el,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
"closed"
|
|
|
|
);
|
2020-01-30 04:37:25 +09:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2020-05-10 17:12:19 +09:00
|
|
|
.qglefbjs {
|
2020-01-30 04:37:25 +09:00
|
|
|
position: relative;
|
|
|
|
box-sizing: border-box;
|
2020-02-19 07:00:44 +09:00
|
|
|
padding: 24px 32px;
|
2020-01-30 04:37:25 +09:00
|
|
|
font-size: 0.9em;
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
display: flex;
|
2020-10-17 20:12:00 +09:00
|
|
|
contain: content;
|
2020-01-30 04:37:25 +09:00
|
|
|
|
2020-02-19 06:41:30 +09:00
|
|
|
&.max-width_600px {
|
|
|
|
padding: 16px;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.max-width_500px {
|
2020-01-30 04:37:25 +09:00
|
|
|
padding: 12px;
|
2022-07-15 19:31:04 +09:00
|
|
|
font-size: 0.85em;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
> .head {
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
flex-shrink: 0;
|
|
|
|
width: 42px;
|
|
|
|
height: 42px;
|
|
|
|
margin-right: 8px;
|
|
|
|
|
2020-03-28 18:07:41 +09:00
|
|
|
> .icon {
|
2020-01-30 04:37:25 +09:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
|
|
|
|
2020-03-28 18:07:41 +09:00
|
|
|
> .sub-icon {
|
2020-01-30 04:37:25 +09:00
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
bottom: -2px;
|
|
|
|
right: -2px;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
border-radius: 100%;
|
|
|
|
background: var(--panel);
|
|
|
|
box-shadow: 0 0 0 3px var(--panel);
|
|
|
|
font-size: 12px;
|
2021-11-07 23:17:51 +09:00
|
|
|
text-align: center;
|
2020-01-30 04:37:25 +09:00
|
|
|
|
2020-03-28 18:07:41 +09:00
|
|
|
&:empty {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2020-01-30 04:37:25 +09:00
|
|
|
> * {
|
2022-07-28 03:21:25 +09:00
|
|
|
color: #fff;
|
2020-01-30 04:37:25 +09:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2023-04-08 09:01:42 +09:00
|
|
|
&.follow,
|
|
|
|
&.followRequestAccepted,
|
|
|
|
&.receiveFollowRequest,
|
|
|
|
&.groupInvited {
|
2020-01-30 04:37:25 +09:00
|
|
|
padding: 3px;
|
2022-07-27 13:18:36 +09:00
|
|
|
background: #31748f;
|
2021-11-07 23:17:51 +09:00
|
|
|
pointer-events: none;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
|
2020-02-16 20:21:05 +09:00
|
|
|
&.renote {
|
2020-01-30 04:37:25 +09:00
|
|
|
padding: 3px;
|
2022-07-28 03:21:25 +09:00
|
|
|
background: #31748f;
|
2021-11-07 23:17:51 +09:00
|
|
|
pointer-events: none;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&.quote {
|
|
|
|
padding: 3px;
|
2022-07-28 03:21:25 +09:00
|
|
|
background: #31748f;
|
2021-11-07 23:17:51 +09:00
|
|
|
pointer-events: none;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&.reply {
|
|
|
|
padding: 3px;
|
2022-07-27 13:18:36 +09:00
|
|
|
background: #c4a7e7;
|
2021-11-07 23:17:51 +09:00
|
|
|
pointer-events: none;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mention {
|
|
|
|
padding: 3px;
|
2022-07-27 13:18:36 +09:00
|
|
|
background: #908caa;
|
2021-11-07 23:17:51 +09:00
|
|
|
pointer-events: none;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
2020-05-10 17:19:41 +09:00
|
|
|
|
|
|
|
&.pollVote {
|
|
|
|
padding: 3px;
|
2022-07-27 13:18:36 +09:00
|
|
|
background: #908caa;
|
2021-11-07 23:17:51 +09:00
|
|
|
pointer-events: none;
|
2020-05-10 17:19:41 +09:00
|
|
|
}
|
2022-03-06 16:06:27 +09:00
|
|
|
|
|
|
|
&.pollEnded {
|
|
|
|
padding: 3px;
|
2022-07-27 13:18:36 +09:00
|
|
|
background: #908caa;
|
2022-03-06 16:06:27 +09:00
|
|
|
pointer-events: none;
|
|
|
|
}
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .tail {
|
|
|
|
flex: 1;
|
|
|
|
min-width: 0;
|
|
|
|
|
|
|
|
> header {
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
> .name {
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
min-width: 0;
|
2021-03-02 22:57:16 +09:00
|
|
|
overflow: hidden;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
|
2020-10-27 18:11:41 +09:00
|
|
|
> .time {
|
2020-01-30 04:37:25 +09:00
|
|
|
margin-left: auto;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .text {
|
|
|
|
white-space: nowrap;
|
2023-05-23 10:11:35 +09:00
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-line-clamp: 3;
|
|
|
|
-webkit-box-orient: vertical;
|
2021-03-02 22:57:16 +09:00
|
|
|
overflow: hidden;
|
2020-01-30 04:37:25 +09:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
2023-05-23 10:11:35 +09:00
|
|
|
> span:first-child {
|
|
|
|
opacity: .7;
|
|
|
|
&::after { content: ": " }
|
|
|
|
}
|
|
|
|
|
2021-04-20 23:22:59 +09:00
|
|
|
> i {
|
2020-01-30 04:37:25 +09:00
|
|
|
vertical-align: super;
|
|
|
|
font-size: 50%;
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
2021-04-20 23:22:59 +09:00
|
|
|
> i:first-child {
|
2020-01-30 04:37:25 +09:00
|
|
|
margin-right: 4px;
|
|
|
|
}
|
|
|
|
|
2021-04-20 23:22:59 +09:00
|
|
|
> i:last-child {
|
2020-01-30 04:37:25 +09:00
|
|
|
margin-left: 4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|