Added ability to hide replies after expanded

This commit is contained in:
WardPearce
2024-05-13 14:22:51 +12:00
parent 96a1b64a4d
commit 78f5fc47fd
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -7,7 +7,7 @@
export let comment: Comment;
export let videoId: string;
let replies: Comments;
let replies: Comments | undefined = undefined;
async function loadReplies(continuation: string) {
try {
@@ -75,6 +75,11 @@
<i class="primary-text">expand_more</i>
<span class="primary-text">{comment.replies.replyCount} {$_('replies')}</span>
</button>
{:else if replies}
<button on:click={() => (replies = undefined)} class="transparent replies">
<i class="primary-text">expand_less</i>
<span class="primary-text">{$_('hideReplies')}</span>
</button>
{/if}
</div>
</div>
@@ -12,6 +12,7 @@
"deleteAllHistory": "Delete all history",
"skipping": "Skipping",
"replies": "replies",
"hideReplies": "Hide replies",
"hideVideo": "Hide video",
"syncParty": {
"userJoined": "User joined your watch party.",