diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 3ff70e47..e1adfc53 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -218,6 +218,11 @@ blockquote { overflow-y: auto; } +.comments { + list-style: none; + padding: 0; +} + .thumbnail { object-fit: cover; min-height: 60px; diff --git a/src/server/index.tsx b/src/server/index.tsx index 43024076..06dc33a4 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -156,7 +156,7 @@ server.get("/*", async (req, res) => { site = try_site.data; initializeSite(site); - if (path != "/setup" && !site.site_view.local_site.site_setup) { + if (path !== "/setup" && !site.site_view.local_site.site_setup) { return res.redirect("/setup"); } diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 8559f38b..0380a726 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -270,9 +270,6 @@ export class CommentNode extends Component { this.props.moderators ); - const borderColor = this.props.node.depth - ? colorList[(this.props.node.depth - 1) % colorList.length] - : colorList[0]; const moreRepliesBorderColor = this.props.node.depth ? colorList[this.props.node.depth % colorList.length] : colorList[0]; @@ -284,26 +281,17 @@ export class CommentNode extends Component { node.comment_view.counts.child_count > 0; return ( -
+
  • @@ -959,9 +947,9 @@ export class CommentNode extends Component {
    {showMoreChildren && (
    + {this.state.collapsed &&
    } +
  • ); } @@ -1211,6 +1201,7 @@ export class CommentNode extends Component { linkBtn(small = false) { const cv = this.commentView; + const classnames = classNames("btn btn-link btn-animate text-muted", { "btn-sm": small, }); diff --git a/src/shared/components/comment/comment-nodes.tsx b/src/shared/components/comment/comment-nodes.tsx index 3f9b48ef..8c0a236e 100644 --- a/src/shared/components/comment/comment-nodes.tsx +++ b/src/shared/components/comment/comment-nodes.tsx @@ -1,3 +1,4 @@ +import classNames from "classnames"; import { Component } from "inferno"; import { AddAdmin, @@ -25,6 +26,7 @@ import { TransferCommunity, } from "lemmy-js-client"; import { CommentNodeI, CommentViewType } from "../../interfaces"; +import { colorList } from "../../utils"; import { CommentNode } from "./comment-node"; interface CommentNodesProps { @@ -44,6 +46,8 @@ interface CommentNodesProps { allLanguages: Language[]; siteLanguages: number[]; hideImages?: boolean; + isChild?: boolean; + depth?: number; finished: Map; onSaveComment(form: SaveComment): void; onCommentReplyRead(form: MarkCommentReplyAsRead): void; @@ -74,49 +78,61 @@ export class CommentNodes extends Component { render() { const maxComments = this.props.maxCommentsShown ?? this.props.nodes.length; + const borderColor = this.props.depth + ? colorList[this.props.depth % colorList.length] + : colorList[0]; + return ( -
    - {this.props.nodes.slice(0, maxComments).map(node => ( - - ))} -
    + this.props.nodes.length > 0 && ( +
      + {this.props.nodes.slice(0, maxComments).map(node => ( + + ))} +
    + ) ); } } diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 2ab0f767..4a3b298a 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1128,7 +1128,7 @@ export const colorList: string[] = [ ]; function hsl(num: number) { - return `hsla(${num}, 35%, 50%, 1)`; + return `hsla(${num}, 35%, 50%, 0.5)`; } export function hostname(url: string): string {