From e2639b0e4df4c1eb6ce1d1c86349369fb11ea256 Mon Sep 17 00:00:00 2001 From: bloodwiing Date: Mon, 20 May 2024 22:55:45 +0300 Subject: [PATCH] Add: Show Review message --- src/comp/page/post/post.svelte | 129 ++++++++++++++++++++------------- static/icon/search.svg | 1 + 2 files changed, 79 insertions(+), 51 deletions(-) create mode 100644 static/icon/search.svg diff --git a/src/comp/page/post/post.svelte b/src/comp/page/post/post.svelte index d61cde8..6c3edea 100644 --- a/src/comp/page/post/post.svelte +++ b/src/comp/page/post/post.svelte @@ -3,11 +3,10 @@ import Ago from "$comp/ago.svelte"; import Avatar from "$comp/avatar.svelte"; import CommentList from "$comp/page/post/commentlist.svelte"; - import Iconvalue from "$comp/iconvalue.svelte"; + import Iconvalue from "$comp/iconvalue.svelte"; import Mention from "$comp/mention.svelte"; - import Tablericon from "$comp/tablericon.svelte"; - import { round10 } from "expected-round"; - import moment from "moment"; + import { round10 } from "expected-round"; + import Cardicon from "$comp/cardicon.svelte"; /** * @type {import("$types/base").Post} @@ -41,7 +40,13 @@ display: flex; flex-direction: column; - gap: 16px + gap: 32px + } + + .content { + display: flex; + flex-direction: column; + gap: 16px; } .titleBar { @@ -117,58 +122,80 @@ text-align: left; padding-left: 0.1em; } + + .notReviewed { + display: flex; + flex-flow: column nowrap; + min-height: 100%; + justify-content: center; + + h6 { + font-size: 1.2rem; + } + }
-
- -
- -

{post.name}

+ {#if !post.reviewed} + +
+
Not Reviewed
+ This post will remain hidden from the public until a moderator approves its contents
-
- -

- {post.content} -

- - - {#if showMetrics && post.metrics} - {post.metrics.commentCount} - {post.metrics.userCount} - {round10(post.metrics.relevancy, -2)} - {/if} -
- -
- - {#if showStats} -
-
Debug stats
- - - - - - - - {#if post.metrics} - - - - - - - {/if} -
ID{post.id}
Author{post.author?.id}
Created Date{post.postDate}
Score{post.rating.likes - post.rating.dislikes}
Edited{post.edited ? "Yes" : "No"}
Edit Count{post.editCount}
Comment Count{post.metrics.commentCount}
User Count{post.metrics.userCount}
Latest Activity{post.metrics.latestActivity}
Engagement{post.metrics.engagement}
Age{post.metrics.age}
Relevancy{round10(post.metrics.relevancy, -5)}
-
+ {/if} + +
+
+ +
+ +

{post.name}

+
+
+ +

+ {post.content} +

+ + + {#if showMetrics && post.metrics} + {post.metrics.commentCount} + {post.metrics.userCount} + {round10(post.metrics.relevancy, -2)} + {/if} +
+ +
+ + {#if showStats} +
+
Debug stats
+ + + + + + + + {#if post.metrics} + + + + + + + {/if} +
ID{post.id}
Author{post.author?.id}
Created Date{post.postDate}
Score{post.rating.likes - post.rating.dislikes}
Edited{post.edited ? "Yes" : "No"}
Edit Count{post.editCount}
Comment Count{post.metrics.commentCount}
User Count{post.metrics.userCount}
Latest Activity{post.metrics.latestActivity}
Engagement{post.metrics.engagement}
Age{post.metrics.age}
Relevancy{round10(post.metrics.relevancy, -5)}
+
+ {/if} +
{#if commentTree} diff --git a/static/icon/search.svg b/static/icon/search.svg new file mode 100644 index 0000000..7cddf2d --- /dev/null +++ b/static/icon/search.svg @@ -0,0 +1 @@ + \ No newline at end of file