2019-11-15 17:36:47 +00:00
|
|
|
<template>
|
2020-02-18 07:57:00 +00:00
|
|
|
<li :class="{ reply: comment.inReplyToComment }">
|
2020-11-30 09:24:11 +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"
|
|
|
|
>
|
2020-11-30 09:24:11 +00:00
|
|
|
<figure
|
|
|
|
class="image is-48x48"
|
|
|
|
v-if="!comment.deletedAt && comment.actor.avatar"
|
|
|
|
>
|
2020-06-17 13:54:24 +00:00
|
|
|
<img class="is-rounded" :src="comment.actor.avatar.url" alt="" />
|
2020-06-15 14:20:58 +00:00
|
|
|
</figure>
|
2020-11-30 09:24:11 +00:00
|
|
|
<b-icon
|
|
|
|
class="media-left"
|
|
|
|
v-else
|
|
|
|
size="is-large"
|
|
|
|
icon="account-circle"
|
|
|
|
/>
|
2020-06-15 14:20:58 +00:00
|
|
|
</popover-actor-card>
|
2020-06-17 13:54:24 +00:00
|
|
|
<div v-else class="media-left">
|
2020-11-30 09:24:11 +00:00
|
|
|
<figure
|
|
|
|
class="image is-48x48"
|
|
|
|
v-if="!comment.deletedAt && comment.actor.avatar"
|
|
|
|
>
|
2020-06-17 13:54:24 +00:00
|
|
|
<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-11-30 09:24:11 +00:00
|
|
|
<strong :class="{ organizer: commentFromOrganizer }">{{
|
|
|
|
comment.actor.name
|
|
|
|
}}</strong>
|
2020-06-15 14:20:58 +00:00
|
|
|
<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-11-30 09:24:11 +00:00
|
|
|
$tc("View a reply", comment.totalReplies, {
|
|
|
|
totalReplies: comment.totalReplies,
|
|
|
|
})
|
2020-10-01 16:53:42 +00:00
|
|
|
}}</span>
|
|
|
|
</p>
|
2020-11-30 09:24:11 +00:00
|
|
|
<p
|
|
|
|
v-else-if="comment.totalReplies && showReplies"
|
|
|
|
@click="showReplies = false"
|
|
|
|
>
|
2020-10-01 16:53:42 +00:00
|
|
|
<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"
|
2021-03-10 16:38:13 +00:00
|
|
|
@click="createReplyToComment()"
|
2020-10-01 16:53:42 +00:00
|
|
|
>
|
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>
|
2020-11-30 09:24:11 +00:00
|
|
|
<form
|
|
|
|
class="reply"
|
|
|
|
@submit.prevent="replyToComment"
|
|
|
|
v-if="currentActor.id"
|
|
|
|
v-show="replyTo"
|
|
|
|
>
|
2020-02-18 07:57:00 +00:00
|
|
|
<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>
|
2020-11-30 09:24:11 +00:00
|
|
|
<b-icon
|
|
|
|
class="media-left"
|
|
|
|
v-else
|
|
|
|
size="is-large"
|
|
|
|
icon="account-circle"
|
|
|
|
/>
|
2020-02-18 07:57:00 +00:00
|
|
|
<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">
|
2020-11-30 09:24:11 +00:00
|
|
|
<editor
|
|
|
|
class="editor"
|
|
|
|
ref="commentEditor"
|
|
|
|
v-model="newComment.text"
|
|
|
|
mode="comment"
|
|
|
|
/>
|
2020-02-18 07:57:00 +00:00
|
|
|
<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>
|
2020-11-30 09:24:11 +00:00
|
|
|
<transition-group
|
|
|
|
name="comment-replies"
|
|
|
|
v-if="showReplies"
|
|
|
|
class="comment-replies"
|
|
|
|
tag="ul"
|
|
|
|
>
|
2020-06-15 14:20:58 +00:00
|
|
|
<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-27 18:27:44 +00:00
|
|
|
import { CommentModeration } from "@/types/enums";
|
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-11-30 09:24:11 +00:00
|
|
|
editor: () =>
|
|
|
|
import(/* webpackChunkName: "editor" */ "@/components/Editor.vue"),
|
2020-02-18 07:57:00 +00:00
|
|
|
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
|
2020-11-30 09:24:11 +00:00
|
|
|
@Ref() readonly commentEditor!: EditorComponent & {
|
|
|
|
replyToComment: (comment: IComment) => void;
|
2021-05-02 18:41:23 +00:00
|
|
|
focus: () => void;
|
2020-11-30 09:24:11 +00:00
|
|
|
};
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-10 16:38:13 +00:00
|
|
|
async createReplyToComment(): Promise<void> {
|
2019-11-15 17:36:47 +00:00
|
|
|
if (this.replyTo) {
|
|
|
|
this.replyTo = false;
|
|
|
|
this.newComment = new CommentModel();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.replyTo = true;
|
2021-05-02 18:41:23 +00:00
|
|
|
if (this.comment.actor) {
|
|
|
|
this.commentEditor.replyToComment(this.comment.actor);
|
|
|
|
await this.$nextTick; // wait for the mention to be injected
|
|
|
|
this.commentEditor.focus();
|
|
|
|
}
|
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-11-30 09:24:11 +00:00
|
|
|
const parentCommentIndex = comments.findIndex(
|
2021-05-12 16:10:07 +00:00
|
|
|
(oldComment: IComment) => oldComment.id === parentId
|
2020-11-30 09:24:11 +00:00
|
|
|
);
|
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 {
|
2021-02-05 13:45:39 +00:00
|
|
|
const organizerId =
|
|
|
|
this.event?.organizerActor?.id || this.event?.attributedTo?.id;
|
|
|
|
return organizerId !== undefined && this.comment?.actor?.id === organizerId;
|
2019-11-15 17:36:47 +00:00
|
|
|
}
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
get commentId(): string {
|
|
|
|
if (this.comment.originComment)
|
2021-03-10 16:38:13 +00:00
|
|
|
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) {
|
2020-11-30 09:24:11 +00:00
|
|
|
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>
|