2019-11-15 17:36:47 +00:00
|
|
|
<template>
|
2020-02-18 07:57:00 +00:00
|
|
|
<li :class="{ reply: comment.inReplyToComment }">
|
2020-06-15 14:20:58 +00:00
|
|
|
<article class="media" :class="{ selected: commentSelected }" :id="commentId">
|
2020-06-17 13:54:24 +00:00
|
|
|
<popover-actor-card
|
|
|
|
class="media-left"
|
|
|
|
:actor="comment.actor"
|
|
|
|
:inline="true"
|
|
|
|
v-if="comment.actor"
|
|
|
|
>
|
|
|
|
<figure class="image is-48x48" v-if="!comment.deletedAt && comment.actor.avatar">
|
|
|
|
<img class="is-rounded" :src="comment.actor.avatar.url" alt="" />
|
2020-06-15 14:20:58 +00:00
|
|
|
</figure>
|
|
|
|
<b-icon class="media-left" v-else size="is-large" icon="account-circle" />
|
|
|
|
</popover-actor-card>
|
2020-06-17 13:54:24 +00:00
|
|
|
<div v-else class="media-left">
|
|
|
|
<figure class="image is-48x48" v-if="!comment.deletedAt && comment.actor.avatar">
|
|
|
|
<img class="is-rounded" :src="comment.actor.avatar.url" alt="" />
|
2020-06-15 14:20:58 +00:00
|
|
|
</figure>
|
2020-06-17 13:54:24 +00:00
|
|
|
<b-icon v-else size="is-large" icon="account-circle" />
|
2020-06-15 14:20:58 +00:00
|
|
|
</div>
|
2020-02-18 07:57:00 +00:00
|
|
|
<div class="media-content">
|
|
|
|
<div class="content">
|
|
|
|
<span class="first-line" v-if="!comment.deletedAt">
|
2020-06-15 14:20:58 +00:00
|
|
|
<strong :class="{ organizer: commentFromOrganizer }">{{ comment.actor.name }}</strong>
|
|
|
|
<small>@{{ usernameWithDomain(comment.actor) }}</small>
|
2020-02-18 07:57:00 +00:00
|
|
|
<a class="comment-link has-text-grey" :href="commentURL">
|
2020-10-13 18:39:59 +00:00
|
|
|
<small>{{
|
|
|
|
formatDistanceToNow(new Date(comment.updatedAt), {
|
|
|
|
locale: $dateFnsLocale,
|
|
|
|
addSuffix: true,
|
|
|
|
})
|
|
|
|
}}</small>
|
2020-02-18 07:57:00 +00:00
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<a v-else class="comment-link has-text-grey" :href="commentURL">
|
|
|
|
<span>{{ $t("[deleted]") }}</span>
|
|
|
|
</a>
|
|
|
|
<span class="icons" v-if="!comment.deletedAt">
|
|
|
|
<button
|
|
|
|
v-if="comment.actor.id === currentActor.id"
|
|
|
|
@click="$emit('delete-comment', comment)"
|
|
|
|
>
|
|
|
|
<b-icon icon="delete" size="is-small" aria-hidden="true" />
|
|
|
|
<span class="visually-hidden">{{ $t("Delete") }}</span>
|
|
|
|
</button>
|
|
|
|
<button @click="reportModal()">
|
|
|
|
<b-icon icon="alert" size="is-small" />
|
|
|
|
<span class="visually-hidden">{{ $t("Report") }}</span>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<div v-if="!comment.deletedAt" v-html="comment.text" />
|
|
|
|
<div v-else>{{ $t("[This comment has been deleted]") }}</div>
|
2020-10-01 16:53:42 +00:00
|
|
|
<div class="load-replies" v-if="comment.totalReplies">
|
|
|
|
<p v-if="!showReplies" @click="fetchReplies">
|
|
|
|
<b-icon icon="chevron-down" /><span>{{
|
2020-02-18 07:57:00 +00:00
|
|
|
$tc("View a reply", comment.totalReplies, { totalReplies: comment.totalReplies })
|
2020-10-01 16:53:42 +00:00
|
|
|
}}</span>
|
|
|
|
</p>
|
|
|
|
<p v-else-if="comment.totalReplies && showReplies" @click="showReplies = false">
|
|
|
|
<b-icon icon="chevron-up" />
|
|
|
|
<span>{{ $t("Hide replies") }}</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
2020-02-18 07:57:00 +00:00
|
|
|
</div>
|
|
|
|
<nav
|
|
|
|
class="reply-action level is-mobile"
|
2020-06-15 14:20:58 +00:00
|
|
|
v-if="
|
|
|
|
currentActor.id &&
|
|
|
|
event.options.commentModeration !== CommentModeration.CLOSED &&
|
|
|
|
!comment.deletedAt
|
|
|
|
"
|
2020-02-18 07:57:00 +00:00
|
|
|
>
|
|
|
|
<div class="level-left">
|
2020-10-01 16:53:42 +00:00
|
|
|
<span
|
|
|
|
style="cursor: pointer"
|
|
|
|
class="level-item reply-btn"
|
|
|
|
@click="createReplyToComment(comment)"
|
|
|
|
>
|
2020-02-18 07:57:00 +00:00
|
|
|
<span class="icon is-small">
|
|
|
|
<b-icon icon="reply" />
|
|
|
|
</span>
|
2020-10-01 16:53:42 +00:00
|
|
|
<span>{{ $t("Reply") }}</span>
|
2020-02-18 07:57:00 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<form class="reply" @submit.prevent="replyToComment" v-if="currentActor.id" v-show="replyTo">
|
|
|
|
<article class="media reply">
|
|
|
|
<figure class="media-left" v-if="currentActor.avatar">
|
|
|
|
<p class="image is-48x48">
|
|
|
|
<img :src="currentActor.avatar.url" alt="" />
|
|
|
|
</p>
|
|
|
|
</figure>
|
|
|
|
<b-icon class="media-left" v-else size="is-large" icon="account-circle" />
|
|
|
|
<div class="media-content">
|
|
|
|
<div class="content">
|
|
|
|
<span class="first-line">
|
|
|
|
<strong>{{ currentActor.name }}</strong>
|
|
|
|
<small>@{{ currentActor.preferredUsername }}</small>
|
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<span class="editor-line">
|
|
|
|
<editor class="editor" ref="commentEditor" v-model="newComment.text" mode="comment" />
|
|
|
|
<b-button
|
|
|
|
:disabled="newComment.text.trim().length === 0"
|
|
|
|
native-type="submit"
|
2020-06-18 13:23:05 +00:00
|
|
|
type="is-primary"
|
2020-02-18 07:57:00 +00:00
|
|
|
>{{ $t("Post a reply") }}</b-button
|
|
|
|
>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</form>
|
2020-06-15 14:20:58 +00:00
|
|
|
<div class="replies">
|
|
|
|
<div class="left">
|
|
|
|
<div class="vertical-border" @click="showReplies = false" />
|
|
|
|
</div>
|
|
|
|
<transition-group name="comment-replies" v-if="showReplies" class="comment-replies" tag="ul">
|
|
|
|
<comment
|
|
|
|
class="reply"
|
|
|
|
v-for="reply in comment.replies"
|
|
|
|
:key="reply.id"
|
|
|
|
:comment="reply"
|
|
|
|
:event="event"
|
|
|
|
@create-comment="$emit('create-comment', $event)"
|
|
|
|
@delete-comment="$emit('delete-comment', $event)"
|
|
|
|
/>
|
|
|
|
</transition-group>
|
|
|
|
</div>
|
2020-02-18 07:57:00 +00:00
|
|
|
</li>
|
2019-11-15 17:36:47 +00:00
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
2020-02-18 07:57:00 +00:00
|
|
|
import { Component, Prop, Vue, Ref } from "vue-property-decorator";
|
|
|
|
import EditorComponent from "@/components/Editor.vue";
|
2020-09-29 07:53:48 +00:00
|
|
|
import { SnackbarProgrammatic as Snackbar } from "buefy";
|
2020-10-13 18:39:59 +00:00
|
|
|
import { formatDistanceToNow } from "date-fns";
|
2020-11-06 10:34:32 +00:00
|
|
|
import { CommentModeration } from "../../types/event-options.model";
|
2020-02-18 07:57:00 +00:00
|
|
|
import { CommentModel, IComment } from "../../types/comment.model";
|
|
|
|
import { CURRENT_ACTOR_CLIENT } from "../../graphql/actor";
|
2020-06-15 14:20:58 +00:00
|
|
|
import { IPerson, usernameWithDomain } from "../../types/actor";
|
2020-02-18 07:57:00 +00:00
|
|
|
import { COMMENTS_THREADS, FETCH_THREAD_REPLIES } from "../../graphql/comment";
|
2020-11-06 10:34:32 +00:00
|
|
|
import { IEvent } from "../../types/event.model";
|
2020-02-18 07:57:00 +00:00
|
|
|
import ReportModal from "../Report/ReportModal.vue";
|
|
|
|
import { IReport } from "../../types/report.model";
|
|
|
|
import { CREATE_REPORT } from "../../graphql/report";
|
2020-07-09 15:24:28 +00:00
|
|
|
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
2019-11-15 17:36:47 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
apollo: {
|
|
|
|
currentActor: {
|
|
|
|
query: CURRENT_ACTOR_CLIENT,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
2020-02-18 07:57:00 +00:00
|
|
|
editor: () => import(/* webpackChunkName: "editor" */ "@/components/Editor.vue"),
|
|
|
|
comment: () => import(/* webpackChunkName: "comment" */ "./Comment.vue"),
|
2020-06-15 14:20:58 +00:00
|
|
|
PopoverActorCard,
|
2019-11-15 17:36:47 +00:00
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class Comment extends Vue {
|
|
|
|
@Prop({ required: true, type: Object }) comment!: IComment;
|
2020-02-18 07:57:00 +00:00
|
|
|
|
2019-11-15 17:36:47 +00:00
|
|
|
@Prop({ required: true, type: Object }) event!: IEvent;
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
// Hack because Vue only exports it's own interface.
|
|
|
|
// See https://github.com/kaorun343/vue-property-decorator/issues/257
|
|
|
|
@Ref() readonly commentEditor!: EditorComponent & { replyToComment: (comment: IComment) => void };
|
2019-11-15 17:36:47 +00:00
|
|
|
|
|
|
|
currentActor!: IPerson;
|
2020-02-18 07:57:00 +00:00
|
|
|
|
2019-11-15 17:36:47 +00:00
|
|
|
newComment: IComment = new CommentModel();
|
2020-02-18 07:57:00 +00:00
|
|
|
|
|
|
|
replyTo = false;
|
|
|
|
|
|
|
|
showReplies = false;
|
|
|
|
|
2019-11-15 17:36:47 +00:00
|
|
|
CommentModeration = CommentModeration;
|
|
|
|
|
2020-06-15 14:20:58 +00:00
|
|
|
usernameWithDomain = usernameWithDomain;
|
|
|
|
|
2020-10-13 18:39:59 +00:00
|
|
|
formatDistanceToNow = formatDistanceToNow;
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-10-13 18:39:59 +00:00
|
|
|
async mounted(): Promise<void> {
|
2020-02-18 07:57:00 +00:00
|
|
|
const { hash } = this.$route;
|
2019-11-15 17:36:47 +00:00
|
|
|
if (hash.includes(`#comment-${this.comment.uuid}`)) {
|
|
|
|
this.fetchReplies();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-29 07:53:48 +00:00
|
|
|
async createReplyToComment(comment: IComment): Promise<void> {
|
2019-11-15 17:36:47 +00:00
|
|
|
if (this.replyTo) {
|
|
|
|
this.replyTo = false;
|
|
|
|
this.newComment = new CommentModel();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.replyTo = true;
|
2020-02-18 07:57:00 +00:00
|
|
|
// this.newComment.inReplyToComment = comment;
|
2019-11-15 17:36:47 +00:00
|
|
|
await this.$nextTick();
|
|
|
|
await this.$nextTick(); // For some reason commenteditor needs two $nextTick() to fully render
|
2020-02-18 07:57:00 +00:00
|
|
|
this.commentEditor.replyToComment(comment);
|
2019-11-15 17:36:47 +00:00
|
|
|
}
|
|
|
|
|
2020-09-29 07:53:48 +00:00
|
|
|
replyToComment(): void {
|
2019-11-15 17:36:47 +00:00
|
|
|
this.newComment.inReplyToComment = this.comment;
|
|
|
|
this.newComment.originComment = this.comment.originComment || this.comment;
|
|
|
|
this.newComment.actor = this.currentActor;
|
2020-02-18 07:57:00 +00:00
|
|
|
this.$emit("create-comment", this.newComment);
|
2019-11-15 17:36:47 +00:00
|
|
|
this.newComment = new CommentModel();
|
|
|
|
this.replyTo = false;
|
|
|
|
}
|
|
|
|
|
2020-09-29 07:53:48 +00:00
|
|
|
async fetchReplies(): Promise<void> {
|
2019-11-15 17:36:47 +00:00
|
|
|
const parentId = this.comment.id;
|
|
|
|
const { data } = await this.$apollo.query<{ thread: IComment[] }>({
|
|
|
|
query: FETCH_THREAD_REPLIES,
|
|
|
|
variables: {
|
|
|
|
threadId: parentId,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
if (!data) return;
|
|
|
|
const { thread } = data;
|
|
|
|
const eventData = this.$apollo.getClient().readQuery<{ event: IEvent }>({
|
|
|
|
query: COMMENTS_THREADS,
|
|
|
|
variables: {
|
|
|
|
eventUUID: this.event.uuid,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
if (!eventData) return;
|
|
|
|
const { event } = eventData;
|
|
|
|
const { comments } = event;
|
2020-02-18 07:57:00 +00:00
|
|
|
const parentCommentIndex = comments.findIndex((oldComment) => oldComment.id === parentId);
|
2019-11-15 17:36:47 +00:00
|
|
|
const parentComment = comments[parentCommentIndex];
|
|
|
|
if (!parentComment) return;
|
|
|
|
parentComment.replies = thread;
|
|
|
|
comments[parentCommentIndex] = parentComment;
|
|
|
|
event.comments = comments;
|
|
|
|
this.$apollo.getClient().writeQuery({
|
|
|
|
query: COMMENTS_THREADS,
|
|
|
|
data: { event },
|
|
|
|
});
|
|
|
|
this.showReplies = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
get commentSelected(): boolean {
|
|
|
|
return this.commentId === this.$route.hash;
|
|
|
|
}
|
|
|
|
|
|
|
|
get commentFromOrganizer(): boolean {
|
2020-02-18 07:57:00 +00:00
|
|
|
return (
|
|
|
|
this.event.organizerActor !== undefined &&
|
2020-08-14 09:32:23 +00:00
|
|
|
this.comment.actor != null &&
|
2020-02-18 07:57:00 +00:00
|
|
|
this.comment.actor.id === this.event.organizerActor.id
|
|
|
|
);
|
2019-11-15 17:36:47 +00:00
|
|
|
}
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
get commentId(): string {
|
|
|
|
if (this.comment.originComment)
|
|
|
|
return `#comment-${this.comment.originComment.uuid}:${this.comment.uuid}`;
|
2019-11-15 17:36:47 +00:00
|
|
|
return `#comment-${this.comment.uuid}`;
|
|
|
|
}
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
get commentURL(): string {
|
2019-12-18 17:25:40 +00:00
|
|
|
if (!this.comment.local && this.comment.url) return this.comment.url;
|
|
|
|
return this.commentId;
|
|
|
|
}
|
|
|
|
|
2020-09-29 07:53:48 +00:00
|
|
|
reportModal(): void {
|
2020-08-14 09:32:23 +00:00
|
|
|
if (!this.comment.actor) return;
|
2019-11-15 17:36:47 +00:00
|
|
|
this.$buefy.modal.open({
|
|
|
|
parent: this,
|
|
|
|
component: ReportModal,
|
|
|
|
props: {
|
2020-02-18 07:57:00 +00:00
|
|
|
title: this.$t("Report this comment"),
|
2019-11-15 17:36:47 +00:00
|
|
|
comment: this.comment,
|
|
|
|
onConfirm: this.reportComment,
|
2019-12-03 10:29:51 +00:00
|
|
|
outsideDomain: this.comment.actor.domain,
|
2019-11-15 17:36:47 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-09-29 07:53:48 +00:00
|
|
|
async reportComment(content: string, forward: boolean): Promise<void> {
|
2019-11-15 17:36:47 +00:00
|
|
|
try {
|
2020-08-14 09:32:23 +00:00
|
|
|
if (!this.comment.actor) return;
|
2019-11-15 17:36:47 +00:00
|
|
|
await this.$apollo.mutate<IReport>({
|
|
|
|
mutation: CREATE_REPORT,
|
|
|
|
variables: {
|
|
|
|
eventId: this.event.id,
|
|
|
|
reportedId: this.comment.actor.id,
|
|
|
|
commentsIds: [this.comment.id],
|
|
|
|
content,
|
2019-12-03 10:29:51 +00:00
|
|
|
forward,
|
2019-11-15 17:36:47 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
this.$buefy.notification.open({
|
2020-02-18 07:57:00 +00:00
|
|
|
message: this.$t("Comment from @{username} reported", {
|
|
|
|
username: this.comment.actor.preferredUsername,
|
|
|
|
}) as string,
|
|
|
|
type: "is-success",
|
|
|
|
position: "is-bottom-right",
|
2019-11-15 17:36:47 +00:00
|
|
|
duration: 5000,
|
|
|
|
});
|
2020-09-29 07:53:48 +00:00
|
|
|
} catch (e) {
|
|
|
|
Snackbar.open({ message: e.message, type: "is-danger", position: "is-bottom" });
|
2019-11-15 17:36:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2020-02-18 07:57:00 +00:00
|
|
|
form.reply {
|
|
|
|
padding-bottom: 1rem;
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.first-line {
|
2020-06-15 14:20:58 +00:00
|
|
|
margin-bottom: 3px;
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
* {
|
|
|
|
padding: 0 5px 0 0;
|
|
|
|
}
|
2020-06-15 14:20:58 +00:00
|
|
|
|
|
|
|
strong.organizer {
|
2020-06-17 13:54:24 +00:00
|
|
|
background: $background-color;
|
2020-06-15 14:20:58 +00:00
|
|
|
border-radius: 12px;
|
|
|
|
color: white;
|
|
|
|
padding: 0 6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > small {
|
|
|
|
margin-left: 0.3rem;
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.editor-line {
|
|
|
|
display: flex;
|
|
|
|
max-width: calc(80rem - 64px);
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.editor {
|
|
|
|
flex: 1;
|
|
|
|
padding-right: 10px;
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.comment-link small:hover {
|
|
|
|
color: hsl(0, 0%, 21%);
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-06-15 14:20:58 +00:00
|
|
|
.root-comment .replies {
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.left {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
|
|
.vertical-border {
|
|
|
|
width: 3px;
|
|
|
|
height: 100%;
|
|
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
|
|
margin: 10px calc(1rem + 1px);
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: rgba(0, 0, 0, 0.1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.media .media-content {
|
|
|
|
.content .editor-line {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.icons {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.media:hover .media-content .icons {
|
|
|
|
display: inline;
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
button {
|
|
|
|
cursor: pointer;
|
|
|
|
border: none;
|
|
|
|
background: none;
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.load-replies {
|
|
|
|
cursor: pointer;
|
2020-10-01 16:53:42 +00:00
|
|
|
|
|
|
|
& > p > span {
|
|
|
|
font-weight: bold;
|
|
|
|
color: $primary;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.level-item.reply-btn {
|
|
|
|
font-weight: bold;
|
|
|
|
color: $primary;
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
article {
|
|
|
|
border-radius: 4px;
|
2020-06-15 14:20:58 +00:00
|
|
|
margin-bottom: 5px;
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
&.selected {
|
|
|
|
background-color: lighten($secondary, 30%);
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-06-18 14:50:47 +00:00
|
|
|
.comment-replies {
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.comment-replies-enter-active,
|
|
|
|
.comment-replies-leave-active,
|
|
|
|
.comment-replies-move {
|
|
|
|
transition: 500ms cubic-bezier(0.59, 0.12, 0.34, 0.95);
|
|
|
|
transition-property: opacity, transform;
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.comment-replies-enter {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateX(50px) scaleY(0.5);
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.comment-replies-enter-to {
|
|
|
|
opacity: 1;
|
|
|
|
transform: translateX(0) scaleY(1);
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.comment-replies-leave-active {
|
|
|
|
position: absolute;
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
.comment-replies-leave-to {
|
|
|
|
opacity: 0;
|
|
|
|
transform: scaleY(0);
|
|
|
|
transform-origin: center top;
|
|
|
|
}
|
|
|
|
|
|
|
|
.reply-action .icon {
|
|
|
|
padding-right: 0.4rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.visually-hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
2019-11-15 17:36:47 +00:00
|
|
|
</style>
|