Add: ActionBar component
This commit is contained in:
parent
0b92b8a716
commit
1286de4c64
22
src/comp/actionbar.svelte
Normal file
22
src/comp/actionbar.svelte
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<script>
|
||||||
|
import Rating from "./rating.svelte";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {import("$types/base").Post | import("$types/base").Comment}
|
||||||
|
*/
|
||||||
|
export let message;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.actionBar {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row nowrap;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="actionBar">
|
||||||
|
<Rating rating={message.rating}></Rating>
|
||||||
|
</div>
|
||||||
@ -4,6 +4,9 @@
|
|||||||
import Mention from "./mention.svelte";
|
import Mention from "./mention.svelte";
|
||||||
import Rating from "./rating.svelte";
|
import Rating from "./rating.svelte";
|
||||||
import Tablericon from "./tablericon.svelte";
|
import Tablericon from "./tablericon.svelte";
|
||||||
|
import Ago from "./ago.svelte";
|
||||||
|
import ActionBar from "./actionbar.svelte";
|
||||||
|
import { circOut } from "svelte/easing";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import("$types/base").Comment}
|
* @type {import("$types/base").Comment}
|
||||||
@ -55,10 +58,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
|
||||||
color: var(--white-dim);
|
|
||||||
}
|
|
||||||
|
|
||||||
.replyBar {
|
.replyBar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row nowrap;
|
flex-flow: row nowrap;
|
||||||
@ -76,7 +75,7 @@
|
|||||||
<div class="nameField">
|
<div class="nameField">
|
||||||
<Mention user={comment.author}></Mention>
|
<Mention user={comment.author}></Mention>
|
||||||
{#each tags as tag}
|
{#each tags as tag}
|
||||||
<span class="tag typeContent">{tag}</span>
|
<span class="tag typeTitle">{tag}</span>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
{#if replyTo}
|
{#if replyTo}
|
||||||
@ -88,13 +87,11 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="date">{moment(comment.commentDate).fromNow()}</span>
|
<Ago date={comment.commentDate}></Ago>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>{comment.content}</p>
|
<p>{comment.content}</p>
|
||||||
|
|
||||||
<div class="actionBar">
|
<ActionBar message={comment}></ActionBar>
|
||||||
<Rating rating={comment.rating}></Rating>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -8,6 +8,9 @@
|
|||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import Rating from "$comp/rating.svelte";
|
import Rating from "$comp/rating.svelte";
|
||||||
import CommentList from "$comp/commentlist.svelte";
|
import CommentList from "$comp/commentlist.svelte";
|
||||||
|
import Avatar from "$comp/avatar.svelte";
|
||||||
|
import Ago from "$comp/ago.svelte";
|
||||||
|
import Actionbar from "$comp/actionbar.svelte";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import("$types/base").Post}
|
* @type {import("$types/base").Post}
|
||||||
@ -69,7 +72,7 @@
|
|||||||
{post.content}
|
{post.content}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Rating rating={post.rating}></Rating>
|
<Actionbar message={post}></Actionbar>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{#if commentTree}
|
{#if commentTree}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user