-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from nostrocket/webworker
Webworker
- Loading branch information
Showing
19 changed files
with
559 additions
and
1,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script lang="ts"> | ||
import type { EventTreeItem } from "@/workers/firehose.types"; | ||
import RenderNoteContent from "./RenderNoteContent.svelte"; | ||
import { ArrowRight } from "radix-icons-svelte"; | ||
import type { Writable } from "svelte/store"; | ||
export let treeItem:EventTreeItem; | ||
export let newParent:Writable<string[]> | ||
</script> | ||
{#each treeItem.children as [id, tree], i (id)} | ||
<div class="flex w-full items-start gap-2.5"> | ||
<!-- <Avatar ndk={$ndk} user={e.author} class="rounded-full w-10 h-10 object-cover" /> --> | ||
<img class="w-8 h-8 rounded-full" src="https://zenquotes.io/img/marcus-aurelius.jpg" alt="profile pic" /> | ||
<div class="flex flex-col leading-1.5 p-4 border-gray-200 bg-gray-100 rounded-e-xl rounded-es-xl dark:bg-gray-700 my-2 overflow-hidden mr-2"> | ||
<div class="flex items-center space-x-2 rtl:space-x-reverse"> | ||
<span class="text-sm font-semibold text-gray-900 dark:text-white">username</span> | ||
<span class="text-sm font-normal text-gray-500 dark:text-gray-400">{new Date(tree.event.created_at*1000).toLocaleString()}</span> | ||
</div> | ||
<p class="text-sm font-normal py-2.5 text-gray-900 dark:text-white"><RenderNoteContent inputString={tree.event.content} /></p> | ||
<a class="text-xs text-orange-600" href="#" on:click={()=>{console.log(tree)}}>print to console</a> | ||
<a href="#" on:click={()=>{newParent.update(existing=>{existing.push(id); return existing})}} class="text-sm font-normal text-gray-500 dark:text-gray-400 float-right">{tree.children.size}<ArrowRight /></a> | ||
</div> | ||
</div> | ||
{/each} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { writable, type Writable } from "svelte/store"; | ||
|
||
export let currentPubkey = writable(undefined) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.