[WiP] tree comments

This commit is contained in:
ilya-bkv 2022-12-23 10:50:02 +03:00
parent 5b7e249dd5
commit e85e011694
3 changed files with 9 additions and 28 deletions

View File

@ -9,32 +9,11 @@
margin-bottom: 0;
}
.comment {
&:before,
&:after {
content: '';
left: 0;
position: absolute;
}
&:before {
border-bottom: 2px solid #ccc;
border-left: 2px solid #ccc;
border-radius: 0 0 0 1.2rem;
top: -1rem;
height: 2.4rem;
width: 1.2rem;
}
&:after {
background: #ccc;
height: 100%;
top: 0;
width: 2px;
}
&:last-child:after {
display: none;
$levels: 0, 1, 2, 3, 4;
$padding: 1rem;
@each $level in $levels {
&.commentLevel-#{level} {
padding-left: $padding * $level;
}
}

View File

@ -51,8 +51,10 @@ export default (props: Props) => {
formatDate(new Date(comment()?.createdAt), { hour: 'numeric', minute: 'numeric' })
)
console.log('!!! lvl:', props.level)
return (
<li class={clsx(styles.comment, { [styles[`commentLevel${props.level}`]]: Boolean(props.level) })}>
<li class={clsx(styles.comment, { [styles[`commentLevel-${props.level}`]]: props.level })}>
{props.level}
<Show when={!!body()}>
<div class={styles.commentContent}>
<Show

View File

@ -238,7 +238,7 @@ export type MutationDeleteMessageArgs = {
}
export type MutationDeleteReactionArgs = {
id: Scalars['Int']
reaction: Scalars['Int']
}
export type MutationDeleteShoutArgs = {