Add: Show Review message
This commit is contained in:
parent
94de96273f
commit
e2639b0e4d
@ -3,11 +3,10 @@
|
|||||||
import Ago from "$comp/ago.svelte";
|
import Ago from "$comp/ago.svelte";
|
||||||
import Avatar from "$comp/avatar.svelte";
|
import Avatar from "$comp/avatar.svelte";
|
||||||
import CommentList from "$comp/page/post/commentlist.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 Mention from "$comp/mention.svelte";
|
||||||
import Tablericon from "$comp/tablericon.svelte";
|
import { round10 } from "expected-round";
|
||||||
import { round10 } from "expected-round";
|
import Cardicon from "$comp/cardicon.svelte";
|
||||||
import moment from "moment";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import("$types/base").Post}
|
* @type {import("$types/base").Post}
|
||||||
@ -41,7 +40,13 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
gap: 16px
|
gap: 32px
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.titleBar {
|
.titleBar {
|
||||||
@ -117,58 +122,80 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 0.1em;
|
padding-left: 0.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notReviewed {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
min-height: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<div class="postHead">
|
{#if !post.reviewed}
|
||||||
<Avatar size={64} user={post.author}></Avatar>
|
<Cardicon iconName="search" colorBackground="var(--yellow-transparent)" colorIcon="var(--yellow)">
|
||||||
<div class="titleBar">
|
<div class="notReviewed">
|
||||||
<div class="postInfo">
|
<h6 class="typeTitle">Not Reviewed</h6>
|
||||||
<Mention user={post.author}></Mention>
|
<span>This post will remain hidden from the public until a moderator approves its contents</span>
|
||||||
<Ago date={post.postDate}></Ago>
|
|
||||||
</div>
|
|
||||||
<h1 class="typeHead title">{post.name}</h1>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Cardicon>
|
||||||
|
|
||||||
<p class="postContent">
|
|
||||||
{post.content}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<Actionbar message={post}>
|
|
||||||
{#if showMetrics && post.metrics}
|
|
||||||
<Iconvalue name="Comment Count" iconName="message">{post.metrics.commentCount}</Iconvalue>
|
|
||||||
<Iconvalue name="User Count" iconName="user">{post.metrics.userCount}</Iconvalue>
|
|
||||||
<Iconvalue name="Relevancy" iconName="chart-bar">{round10(post.metrics.relevancy, -2)}</Iconvalue>
|
|
||||||
{/if}
|
|
||||||
<div class="metricsSpacer"></div>
|
|
||||||
<button class="button transparent" on:click={togglePostStats}>
|
|
||||||
<Iconvalue name="More detailed metrics" iconName="database">stats</Iconvalue>
|
|
||||||
</button>
|
|
||||||
</Actionbar>
|
|
||||||
|
|
||||||
{#if showStats}
|
|
||||||
<div class="stats">
|
|
||||||
<h6 class="statsTitle">Debug stats</h6>
|
|
||||||
<table>
|
|
||||||
<tr><td>ID</td><td>{post.id}</td></tr>
|
|
||||||
<tr><td>Author</td><td>{post.author?.id}</td></tr>
|
|
||||||
<tr><td>Created Date</td><td>{post.postDate}</td></tr>
|
|
||||||
<tr><td>Score</td><td>{post.rating.likes - post.rating.dislikes}</td></tr>
|
|
||||||
<tr><td>Edited</td><td>{post.edited ? "Yes" : "No"}</td></tr>
|
|
||||||
<tr><td>Edit Count</td><td>{post.editCount}</td></tr>
|
|
||||||
{#if post.metrics}
|
|
||||||
<tr><td>Comment Count</td><td>{post.metrics.commentCount}</td></tr>
|
|
||||||
<tr><td>User Count</td><td>{post.metrics.userCount}</td></tr>
|
|
||||||
<tr><td>Latest Activity</td><td>{post.metrics.latestActivity}</td></tr>
|
|
||||||
<tr><td>Engagement</td><td>{post.metrics.engagement}</td></tr>
|
|
||||||
<tr><td>Age</td><td>{post.metrics.age}</td></tr>
|
|
||||||
<tr><td>Relevancy</td><td>{round10(post.metrics.relevancy, -5)}</td></tr>
|
|
||||||
{/if}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="postHead">
|
||||||
|
<Avatar size={64} user={post.author}></Avatar>
|
||||||
|
<div class="titleBar">
|
||||||
|
<div class="postInfo">
|
||||||
|
<Mention user={post.author}></Mention>
|
||||||
|
<Ago date={post.postDate}></Ago>
|
||||||
|
</div>
|
||||||
|
<h1 class="typeHead title">{post.name}</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="postContent">
|
||||||
|
{post.content}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<Actionbar message={post}>
|
||||||
|
{#if showMetrics && post.metrics}
|
||||||
|
<Iconvalue name="Comment Count" iconName="message">{post.metrics.commentCount}</Iconvalue>
|
||||||
|
<Iconvalue name="User Count" iconName="user">{post.metrics.userCount}</Iconvalue>
|
||||||
|
<Iconvalue name="Relevancy" iconName="chart-bar">{round10(post.metrics.relevancy, -2)}</Iconvalue>
|
||||||
|
{/if}
|
||||||
|
<div class="metricsSpacer"></div>
|
||||||
|
<button class="button transparent" on:click={togglePostStats}>
|
||||||
|
<Iconvalue name="More detailed metrics" iconName="database">stats</Iconvalue>
|
||||||
|
</button>
|
||||||
|
</Actionbar>
|
||||||
|
|
||||||
|
{#if showStats}
|
||||||
|
<div class="stats">
|
||||||
|
<h6 class="statsTitle">Debug stats</h6>
|
||||||
|
<table>
|
||||||
|
<tr><td>ID</td><td>{post.id}</td></tr>
|
||||||
|
<tr><td>Author</td><td>{post.author?.id}</td></tr>
|
||||||
|
<tr><td>Created Date</td><td>{post.postDate}</td></tr>
|
||||||
|
<tr><td>Score</td><td>{post.rating.likes - post.rating.dislikes}</td></tr>
|
||||||
|
<tr><td>Edited</td><td>{post.edited ? "Yes" : "No"}</td></tr>
|
||||||
|
<tr><td>Edit Count</td><td>{post.editCount}</td></tr>
|
||||||
|
{#if post.metrics}
|
||||||
|
<tr><td>Comment Count</td><td>{post.metrics.commentCount}</td></tr>
|
||||||
|
<tr><td>User Count</td><td>{post.metrics.userCount}</td></tr>
|
||||||
|
<tr><td>Latest Activity</td><td>{post.metrics.latestActivity}</td></tr>
|
||||||
|
<tr><td>Engagement</td><td>{post.metrics.engagement}</td></tr>
|
||||||
|
<tr><td>Age</td><td>{post.metrics.age}</td></tr>
|
||||||
|
<tr><td>Relevancy</td><td>{round10(post.metrics.relevancy, -5)}</td></tr>
|
||||||
|
{/if}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{#if commentTree}
|
{#if commentTree}
|
||||||
|
|||||||
1
static/icon/search.svg
Normal file
1
static/icon/search.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" id="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-search"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>
|
||||||
|
After Width: | Height: | Size: 404 B |
Loading…
x
Reference in New Issue
Block a user