2019-11-15 18:36:47 +01:00
|
|
|
<template>
|
2021-06-10 10:02:43 +02:00
|
|
|
<li
|
|
|
|
:class="{
|
|
|
|
reply: comment.inReplyToComment,
|
2022-07-12 10:55:28 +02:00
|
|
|
'bg-purple-2': comment.isAnnouncement,
|
|
|
|
'bg-violet-1': commentSelected,
|
|
|
|
'shadow-none': !rootComment,
|
2021-06-10 10:02:43 +02:00
|
|
|
}"
|
2022-07-12 10:55:28 +02:00
|
|
|
class="mbz-card p-2"
|
2021-06-10 10:02:43 +02:00
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<article :id="commentId" dir="auto">
|
|
|
|
<div>
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<div class="flex items-center gap-1" v-if="actorComment">
|
|
|
|
<popover-actor-card
|
|
|
|
:actor="actorComment"
|
|
|
|
:inline="true"
|
|
|
|
v-if="!comment.deletedAt && actorComment.avatar"
|
|
|
|
>
|
|
|
|
<figure>
|
|
|
|
<img
|
|
|
|
class="rounded-xl"
|
|
|
|
:src="actorComment.avatar.url"
|
|
|
|
alt=""
|
|
|
|
width="24"
|
|
|
|
height="24"
|
|
|
|
/>
|
|
|
|
</figure>
|
|
|
|
</popover-actor-card>
|
|
|
|
<AccountCircle v-else />
|
|
|
|
<strong
|
|
|
|
v-if="!comment.deletedAt"
|
|
|
|
dir="auto"
|
|
|
|
:class="{ organizer: commentFromOrganizer }"
|
|
|
|
>{{ actorComment?.name }}</strong
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a v-else :href="commentURL">
|
|
|
|
<span>{{ t("[deleted]") }}</span>
|
2020-02-18 08:57:00 +01:00
|
|
|
</a>
|
2022-07-12 10:55:28 +02:00
|
|
|
<a :href="commentURL">
|
|
|
|
<small v-if="comment.updatedAt">{{
|
2021-06-01 18:08:03 +02:00
|
|
|
formatDistanceToNow(new Date(comment.updatedAt), {
|
2022-07-12 10:55:28 +02:00
|
|
|
locale: dateFnsLocale,
|
2021-06-01 18:08:03 +02:00
|
|
|
addSuffix: true,
|
|
|
|
})
|
|
|
|
}}</small>
|
|
|
|
</a>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div v-if="!comment.deletedAt" class="flex">
|
2020-02-18 08:57:00 +01:00
|
|
|
<button
|
2022-07-12 10:55:28 +02:00
|
|
|
v-if="actorComment?.id === currentActor?.id"
|
2021-05-17 11:36:28 +02:00
|
|
|
@click="deleteComment"
|
2020-02-18 08:57:00 +01:00
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<Delete :size="16" />
|
|
|
|
<span class="sr-only">{{ t("Delete") }}</span>
|
2020-02-18 08:57:00 +01:00
|
|
|
</button>
|
2022-07-12 10:55:28 +02:00
|
|
|
<button @click="reportModal">
|
|
|
|
<Alert :size="16" />
|
|
|
|
<span class="sr-only">{{ t("Report") }}</span>
|
2020-02-18 08:57:00 +01:00
|
|
|
</button>
|
2020-10-01 18:53:42 +02:00
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div
|
|
|
|
v-if="!comment.deletedAt"
|
|
|
|
v-html="comment.text"
|
|
|
|
dir="auto"
|
|
|
|
:lang="comment.language"
|
|
|
|
/>
|
|
|
|
<div v-else>{{ t("[This comment has been deleted]") }}</div>
|
|
|
|
<div class="" v-if="comment.totalReplies">
|
|
|
|
<p
|
|
|
|
v-if="!showReplies"
|
|
|
|
@click="showReplies = true"
|
|
|
|
class="flex cursor-pointer"
|
|
|
|
>
|
|
|
|
<ChevronDown />
|
|
|
|
<span>{{
|
|
|
|
t(
|
|
|
|
"View a reply",
|
|
|
|
{
|
|
|
|
totalReplies: comment.totalReplies,
|
|
|
|
},
|
|
|
|
comment.totalReplies
|
|
|
|
)
|
|
|
|
}}</span>
|
|
|
|
</p>
|
|
|
|
<p
|
|
|
|
v-else-if="comment.totalReplies && showReplies"
|
|
|
|
@click="showReplies = false"
|
|
|
|
class="flex cursor-pointer"
|
|
|
|
>
|
|
|
|
<ChevronUp />
|
|
|
|
<span>{{ t("Hide replies") }}</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
<nav
|
2020-06-15 16:20:58 +02:00
|
|
|
v-if="
|
2022-07-12 10:55:28 +02:00
|
|
|
currentActor?.id &&
|
2020-06-15 16:20:58 +02:00
|
|
|
event.options.commentModeration !== CommentModeration.CLOSED &&
|
|
|
|
!comment.deletedAt
|
|
|
|
"
|
2022-07-12 10:55:28 +02:00
|
|
|
@click="createReplyToComment()"
|
|
|
|
class="flex gap-1 cursor-pointer"
|
2020-02-18 08:57:00 +01:00
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<Reply />
|
|
|
|
<span>{{ t("Reply") }}</span>
|
2020-02-18 08:57:00 +01:00
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</article>
|
2020-11-30 10:24:11 +01:00
|
|
|
<form
|
|
|
|
@submit.prevent="replyToComment"
|
2022-07-12 10:55:28 +02:00
|
|
|
v-if="currentActor?.id"
|
2020-11-30 10:24:11 +01:00
|
|
|
v-show="replyTo"
|
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<article class="flex gap-2">
|
|
|
|
<figure v-if="currentActor?.avatar" class="mt-4">
|
|
|
|
<img
|
|
|
|
:src="currentActor?.avatar.url"
|
|
|
|
alt=""
|
|
|
|
width="48"
|
|
|
|
height="48"
|
|
|
|
class="rounded-md"
|
|
|
|
/>
|
2020-02-18 08:57:00 +01:00
|
|
|
</figure>
|
2022-07-12 10:55:28 +02:00
|
|
|
<AccountCircle v-else :size="48" />
|
|
|
|
<div class="flex-1">
|
|
|
|
<div class="flex gap-1 items-center">
|
|
|
|
<strong>{{ currentActor?.name }}</strong>
|
|
|
|
<small dir="ltr">@{{ currentActor?.preferredUsername }}</small>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col gap-2">
|
|
|
|
<editor
|
|
|
|
ref="commentEditor"
|
|
|
|
v-model="newComment.text"
|
|
|
|
mode="comment"
|
|
|
|
:current-actor="currentActor"
|
|
|
|
:aria-label="t('Comment body')"
|
|
|
|
class="flex-1"
|
|
|
|
/>
|
|
|
|
<o-button
|
|
|
|
:disabled="newComment.text.trim().length === 0"
|
|
|
|
native-type="submit"
|
|
|
|
variant="primary"
|
|
|
|
class="self-end"
|
|
|
|
>{{ t("Post a reply") }}</o-button
|
|
|
|
>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</form>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div @click="showReplies = false" />
|
2020-06-15 16:20:58 +02:00
|
|
|
</div>
|
2020-11-30 10:24:11 +01:00
|
|
|
<transition-group
|
|
|
|
name="comment-replies"
|
|
|
|
v-if="showReplies"
|
|
|
|
tag="ul"
|
2022-07-12 10:55:28 +02:00
|
|
|
class="flex flex-col gap-2"
|
2020-11-30 10:24:11 +01:00
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<Comment
|
2020-06-15 16:20:58 +02:00
|
|
|
v-for="reply in comment.replies"
|
|
|
|
:key="reply.id"
|
|
|
|
:comment="reply"
|
|
|
|
:event="event"
|
2022-07-12 10:55:28 +02:00
|
|
|
:currentActor="currentActor"
|
|
|
|
:rootComment="false"
|
|
|
|
@create-comment="emit('create-comment', $event)"
|
|
|
|
@delete-comment="emit('delete-comment', $event)"
|
|
|
|
@report-comment="emit('report-comment', $event)"
|
2020-06-15 16:20:58 +02:00
|
|
|
/>
|
|
|
|
</transition-group>
|
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
</li>
|
2019-11-15 18:36:47 +01:00
|
|
|
</template>
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
2022-08-26 16:08:58 +02:00
|
|
|
import EditorComponent from "@/components/TextEditor.vue";
|
2020-10-13 20:39:59 +02:00
|
|
|
import { formatDistanceToNow } from "date-fns";
|
2020-11-27 19:27:44 +01:00
|
|
|
import { CommentModeration } from "@/types/enums";
|
2020-02-18 08:57:00 +01:00
|
|
|
import { CommentModel, IComment } from "../../types/comment.model";
|
2022-07-12 10:55:28 +02:00
|
|
|
import { IPerson } from "../../types/actor";
|
2020-11-06 11:34:32 +01:00
|
|
|
import { IEvent } from "../../types/event.model";
|
2020-07-09 17:24:28 +02:00
|
|
|
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
2022-07-12 10:55:28 +02:00
|
|
|
import {
|
|
|
|
computed,
|
|
|
|
defineAsyncComponent,
|
|
|
|
inject,
|
|
|
|
onMounted,
|
|
|
|
ref,
|
|
|
|
nextTick,
|
|
|
|
} from "vue";
|
|
|
|
import { useRoute } from "vue-router";
|
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
import AccountCircle from "vue-material-design-icons/AccountCircle.vue";
|
|
|
|
import Delete from "vue-material-design-icons/Delete.vue";
|
|
|
|
import Alert from "vue-material-design-icons/Alert.vue";
|
|
|
|
import ChevronUp from "vue-material-design-icons/ChevronUp.vue";
|
|
|
|
import ChevronDown from "vue-material-design-icons/ChevronDown.vue";
|
|
|
|
import Reply from "vue-material-design-icons/Reply.vue";
|
2022-07-12 10:55:28 +02:00
|
|
|
import type { Locale } from "date-fns";
|
2022-07-12 10:55:28 +02:00
|
|
|
|
2022-08-26 16:08:58 +02:00
|
|
|
const Editor = defineAsyncComponent(
|
|
|
|
() => import("@/components/TextEditor.vue")
|
|
|
|
);
|
2022-07-12 10:55:28 +02:00
|
|
|
|
|
|
|
const props = withDefaults(
|
|
|
|
defineProps<{
|
|
|
|
comment: IComment;
|
|
|
|
event: IEvent;
|
|
|
|
currentActor: IPerson;
|
|
|
|
rootComment?: boolean;
|
|
|
|
}>(),
|
|
|
|
{ rootComment: true }
|
|
|
|
);
|
|
|
|
|
|
|
|
const emit = defineEmits([
|
|
|
|
"create-comment",
|
|
|
|
"delete-comment",
|
|
|
|
"report-comment",
|
|
|
|
]);
|
|
|
|
|
|
|
|
const commentEditor = ref<typeof EditorComponent | null>(null);
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
// focus: () => void;
|
|
|
|
// };
|
|
|
|
|
|
|
|
const newComment = ref<IComment>(new CommentModel());
|
|
|
|
const replyTo = ref(false);
|
|
|
|
const showReplies = ref(false);
|
|
|
|
const route = useRoute();
|
|
|
|
const { t } = useI18n({ useScope: "global" });
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
if (route?.hash.includes(`#comment-${props.comment.uuid}`)) {
|
|
|
|
showReplies.value = true;
|
2021-05-17 11:36:28 +02:00
|
|
|
}
|
2022-07-12 10:55:28 +02:00
|
|
|
});
|
2021-05-17 11:36:28 +02:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
const createReplyToComment = async (): Promise<void> => {
|
|
|
|
if (replyTo.value) {
|
|
|
|
replyTo.value = false;
|
|
|
|
newComment.value = new CommentModel();
|
|
|
|
return;
|
2019-11-15 18:36:47 +01:00
|
|
|
}
|
2022-07-12 10:55:28 +02:00
|
|
|
replyTo.value = true;
|
|
|
|
if (props.comment.actor) {
|
|
|
|
commentEditor.value?.replyToComment(props.comment.actor);
|
|
|
|
await nextTick(); // wait for the mention to be injected
|
|
|
|
commentEditor.value?.focus();
|
2019-11-15 18:36:47 +01:00
|
|
|
}
|
2022-07-12 10:55:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
const replyToComment = (): void => {
|
|
|
|
newComment.value.inReplyToComment = props.comment;
|
|
|
|
newComment.value.originComment = props.comment.originComment ?? props.comment;
|
|
|
|
newComment.value.actor = props.currentActor;
|
2022-08-26 16:08:58 +02:00
|
|
|
console.debug(newComment.value);
|
2022-07-12 10:55:28 +02:00
|
|
|
emit("create-comment", newComment.value);
|
|
|
|
newComment.value = new CommentModel();
|
|
|
|
replyTo.value = false;
|
|
|
|
showReplies.value = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
const deleteComment = (): void => {
|
|
|
|
emit("delete-comment", props.comment);
|
|
|
|
showReplies.value = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
const commentSelected = computed((): boolean => {
|
|
|
|
return `#${commentId.value}` === route?.hash;
|
|
|
|
});
|
|
|
|
|
|
|
|
const commentFromOrganizer = computed((): boolean => {
|
|
|
|
const organizerId =
|
|
|
|
props.event?.organizerActor?.id || props.event?.attributedTo?.id;
|
|
|
|
return organizerId !== undefined && props.comment?.actor?.id === organizerId;
|
|
|
|
});
|
|
|
|
|
|
|
|
const commentId = computed((): string => {
|
|
|
|
if (props.comment.originComment)
|
|
|
|
return `comment-${props.comment.originComment.uuid}-${props.comment.uuid}`;
|
|
|
|
return `comment-${props.comment.uuid}`;
|
|
|
|
});
|
|
|
|
|
|
|
|
const commentURL = computed((): string => {
|
|
|
|
if (!props.comment.local && props.comment.url) return props.comment.url;
|
|
|
|
return `#${commentId.value}`;
|
|
|
|
});
|
|
|
|
|
|
|
|
const reportModal = (): void => {
|
|
|
|
if (!props.comment.actor) return;
|
|
|
|
emit("report-comment", props.comment);
|
|
|
|
// this.$buefy.modal.open({
|
|
|
|
// component: ReportModal,
|
|
|
|
// props: {
|
|
|
|
// title: t("Report this comment"),
|
|
|
|
// comment: props.comment,
|
|
|
|
// onConfirm: reportComment,
|
|
|
|
// outsideDomain: props.comment.actor?.domain,
|
|
|
|
// },
|
|
|
|
// // https://github.com/buefy/buefy/pull/3589
|
|
|
|
// // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
// // @ts-ignore
|
|
|
|
// closeButtonAriaLabel: this.t("Close"),
|
|
|
|
// });
|
|
|
|
};
|
|
|
|
|
|
|
|
// const reportComment = async (
|
|
|
|
// content: string,
|
|
|
|
// forward: boolean
|
|
|
|
// ): Promise<void> => {
|
|
|
|
// try {
|
|
|
|
// if (!props.comment.actor) return;
|
|
|
|
|
|
|
|
// const { onError, onDone } = useMutation(CREATE_REPORT, () => ({
|
|
|
|
// variables: {
|
|
|
|
// eventId: props.event.id,
|
|
|
|
// reportedId: props.comment.actor?.id,
|
|
|
|
// commentsIds: [props.comment.id],
|
|
|
|
// content,
|
|
|
|
// forward,
|
|
|
|
// },
|
|
|
|
// }));
|
|
|
|
|
|
|
|
// // this.$buefy.notification.open({
|
|
|
|
// // message: this.t("Comment from @{username} reported", {
|
|
|
|
// // username: this.comment.actor.preferredUsername,
|
|
|
|
// // }) as string,
|
|
|
|
// // type: "is-success",
|
|
|
|
// // position: "is-bottom-right",
|
|
|
|
// // duration: 5000,
|
|
|
|
// // });
|
|
|
|
// } catch (e: any) {
|
|
|
|
// if (e.message) {
|
|
|
|
// // Snackbar.open({
|
|
|
|
// // message: e.message,
|
|
|
|
// // type: "is-danger",
|
|
|
|
// // position: "is-bottom",
|
|
|
|
// // });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// };
|
|
|
|
const actorComment = computed(() => props.comment.actor);
|
|
|
|
const dateFnsLocale = inject<Locale>("dateFnsLocale");
|
2019-11-15 18:36:47 +01:00
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2021-11-04 18:14:36 +01:00
|
|
|
@use "@/styles/_mixins" as *;
|
2020-02-18 08:57:00 +01:00
|
|
|
form.reply {
|
|
|
|
padding-bottom: 1rem;
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.first-line {
|
2020-06-15 16:20:58 +02:00
|
|
|
margin-bottom: 3px;
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
* {
|
|
|
|
padding: 0 5px 0 0;
|
|
|
|
}
|
2020-06-15 16:20:58 +02:00
|
|
|
|
|
|
|
strong.organizer {
|
|
|
|
border-radius: 12px;
|
|
|
|
color: white;
|
|
|
|
padding: 0 6px;
|
|
|
|
}
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// & > small {
|
|
|
|
// @include margin-left(0.3rem);
|
|
|
|
// }
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.editor-line {
|
|
|
|
display: flex;
|
|
|
|
max-width: calc(80rem - 64px);
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.editor {
|
|
|
|
flex: 1;
|
2022-07-12 10:55:28 +02:00
|
|
|
// @include padding-right(10px);
|
2020-02-18 08:57:00 +01:00
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2021-06-01 18:08:03 +02:00
|
|
|
a.comment-link {
|
|
|
|
text-decoration: none;
|
2022-07-12 10:55:28 +02:00
|
|
|
// @include margin-left(5px);
|
|
|
|
color: text;
|
2021-06-01 18:08:03 +02:00
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
small {
|
|
|
|
&:hover {
|
|
|
|
color: hsl(0, 0%, 21%);
|
|
|
|
}
|
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2021-06-10 10:02:43 +02:00
|
|
|
.comment-element {
|
|
|
|
padding: 0.25rem;
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
|
|
&.announcement {
|
|
|
|
small {
|
|
|
|
color: hsl(0, 0%, 21%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.selected {
|
|
|
|
.reply-btn,
|
|
|
|
small,
|
2021-09-29 18:20:55 +02:00
|
|
|
span,
|
2021-06-10 10:02:43 +02:00
|
|
|
strong,
|
|
|
|
a.comment-link:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// .media-left {
|
|
|
|
// @include margin-right(5px);
|
|
|
|
// }
|
2021-06-10 10:02:43 +02:00
|
|
|
}
|
|
|
|
|
2020-06-15 16:20:58 +02:00
|
|
|
.root-comment .replies {
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.left {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2022-07-12 10:55:28 +02:00
|
|
|
// @include margin-right(10px);
|
2020-06-15 16:20:58 +02:00
|
|
|
|
|
|
|
.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 08:57:00 +01:00
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.media .media-content {
|
2021-06-10 10:02:43 +02:00
|
|
|
overflow-x: initial;
|
2021-11-07 14:59:20 +01:00
|
|
|
.content {
|
|
|
|
text-align: start;
|
|
|
|
.editor-line {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.icons {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.media:hover .media-content .icons {
|
|
|
|
display: inline;
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
button {
|
|
|
|
cursor: pointer;
|
|
|
|
border: none;
|
|
|
|
background: none;
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.load-replies {
|
|
|
|
cursor: pointer;
|
2020-10-01 18:53:42 +02:00
|
|
|
|
|
|
|
& > p > span {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.level-item.reply-btn {
|
|
|
|
font-weight: bold;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
article {
|
|
|
|
border-radius: 4px;
|
2020-06-15 16:20:58 +02:00
|
|
|
margin-bottom: 5px;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-06-18 16:50:47 +02:00
|
|
|
.comment-replies {
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01: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 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.comment-replies-enter {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateX(50px) scaleY(0.5);
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.comment-replies-enter-to {
|
|
|
|
opacity: 1;
|
|
|
|
transform: translateX(0) scaleY(1);
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.comment-replies-leave-active {
|
|
|
|
position: absolute;
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.comment-replies-leave-to {
|
|
|
|
opacity: 0;
|
|
|
|
transform: scaleY(0);
|
|
|
|
transform-origin: center top;
|
|
|
|
}
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// .reply-action .icon {
|
|
|
|
// @include padding-right(0.4rem);
|
|
|
|
// }
|
2020-02-18 08:57:00 +01:00
|
|
|
|
|
|
|
.visually-hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
2019-11-15 18:36:47 +01:00
|
|
|
</style>
|