diff --git a/package.json b/package.json
index fd7cf4ad..2298d9e1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "lemmy-ui",
- "version": "0.18.0-beta.6",
+ "version": "0.18.0-rc.1",
"description": "An isomorphic UI for lemmy",
"repository": "https://github.com/LemmyNet/lemmy-ui",
"license": "AGPL-3.0",
diff --git a/src/assets/css/main.css b/src/assets/css/main.css
index 3ff70e47..82f8433e 100644
--- a/src/assets/css/main.css
+++ b/src/assets/css/main.css
@@ -80,30 +80,6 @@
overflow-x: auto;
}
-.md-div table {
- border-collapse: collapse;
- width: 100%;
- margin-bottom: 1rem;
- border: 1px solid var(--dark);
-}
-
-.md-div table th,
-.md-div table td {
- padding: 0.3rem;
- vertical-align: top;
- border-top: 1px solid var(--dark);
- border: 1px solid var(--dark);
-}
-
-.md-div table thead th {
- vertical-align: bottom;
- border-bottom: 2px solid var(--dark);
-}
-
-.md-div table tbody + tbody {
- border-top: 2px solid var(--dark);
-}
-
.vote-bar {
margin-top: -6.5px;
}
@@ -218,6 +194,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 98063558..783845fb 100644
--- a/src/server/index.tsx
+++ b/src/server/index.tsx
@@ -160,7 +160,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");
}
@@ -434,7 +434,7 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) {
-
+
{
if (isBrowser()) {
// On the first load, check the unreads
this.requestNotificationPermission();
- await this.fetchUnreads();
+ this.fetchUnreads();
this.requestNotificationPermission();
document.addEventListener("mouseup", this.handleOutsideMenuClick);
@@ -406,35 +408,36 @@ export class Navbar extends Component {
return amAdmin() || moderatesS;
}
- async fetchUnreads() {
- const auth = myAuth();
- if (auth) {
- this.setState({ unreadInboxCountRes: { state: "loading" } });
- this.setState({
- unreadInboxCountRes: await HttpService.client.getUnreadCount({
- auth,
- }),
- });
-
- if (this.moderatesSomething) {
- this.setState({ unreadReportCountRes: { state: "loading" } });
- this.setState({
- unreadReportCountRes: await HttpService.client.getReportCount({
- auth,
- }),
- });
- }
-
- if (amAdmin()) {
- this.setState({ unreadApplicationCountRes: { state: "loading" } });
- this.setState({
- unreadApplicationCountRes:
- await HttpService.client.getUnreadRegistrationApplicationCount({
+ fetchUnreads() {
+ poll(async () => {
+ if (window.document.visibilityState !== "hidden") {
+ const auth = myAuth();
+ if (auth) {
+ this.setState({
+ unreadInboxCountRes: await HttpService.client.getUnreadCount({
auth,
}),
- });
+ });
+
+ if (this.moderatesSomething) {
+ this.setState({
+ unreadReportCountRes: await HttpService.client.getReportCount({
+ auth,
+ }),
+ });
+ }
+
+ if (amAdmin()) {
+ this.setState({
+ unreadApplicationCountRes:
+ await HttpService.client.getUnreadRegistrationApplicationCount({
+ auth,
+ }),
+ });
+ }
+ }
}
- }
+ }, updateUnreadCountsInterval);
}
get unreadInboxCount(): number {
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 (
-
+