From 9d952483f250a97cbeab4061fa1c4e68341b330f Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 28 Aug 2022 23:22:15 +0300 Subject: posting thread and image works --- src/components/Thread.svelte | 79 ++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 24 deletions(-) (limited to 'src/components/Thread.svelte') diff --git a/src/components/Thread.svelte b/src/components/Thread.svelte index fee1a78..0321b8d 100644 --- a/src/components/Thread.svelte +++ b/src/components/Thread.svelte @@ -1,11 +1,15 @@ + {#if thread.id != "rules"}
@@ -27,13 +31,16 @@ -> {thread.threadCreator}
+
- {#if listReplies(thread.id)} -
- {#each replies as id} - >>{id}  - {/each} -
+ {#if comments} + {#if listReplies(thread.id) } + + {#each listReplies(thread.id, true) as id} + >>{id}  + {/each} +
+ {/if} {/if} @@ -54,21 +61,45 @@

{@html thread.threadText}

- +{#if comments} + {#each thread.comments as comment} +
+ + {comment.id} + at {formatTime(comment.creationDate)}
-
+ -> + {comment.commentCreator} +
+
+ + {#if listReplies(comment.id)} + + {#each listReplies(comment.id, true) as id} + >>{id}  + {/each} +
+ {/if} + + + + {#if comment.imageId!= null && comment.imageId != undefined} + {#if comment.fileType == 'image'} + + {comment.imageId}
+
+ {:else if comment.fileType == 'video'} + + {/if} + {/if} + +

{@html comment.commentText}

+ +
+ {/each} {/if} - + +{/if} -- cgit v1.2.3