mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
Add profile detail and notes to self
This commit is contained in:
11
README.md
11
README.md
@@ -4,15 +4,18 @@ A discord-like nostr client based on the idea of "relays as groups". WIP.
|
||||
|
||||
# Todo
|
||||
|
||||
- [ ] NIP 17 dms/chats
|
||||
- [ ] Hook up donate buttons
|
||||
- [ ] Profile settings
|
||||
- [ ] Relay settings
|
||||
- [ ] Mobile version
|
||||
- [ ] Single-relay version
|
||||
- [ ] Relay access detection
|
||||
- [ ] Env vars for:
|
||||
- Theme
|
||||
- Relay
|
||||
|
||||
---
|
||||
|
||||
- [ ] Add person drawer with info and recent notes, where you can follow/mute them. Maybe same stuff as person search
|
||||
- [ ] If the user isn't following anyone, show warning/fallback on people/notes pages
|
||||
- [ ] Show warning if people in a dm conversation don't have a 10050
|
||||
- [ ] Add react/reply to notes
|
||||
- [ ] Indicate cut-off images, allow user to expand
|
||||
- [ ] Sort/migrate repository data to keep important events
|
||||
|
||||
197
package-lock.json
generated
197
package-lock.json
generated
@@ -23,13 +23,14 @@
|
||||
"@tiptap/extension-text": "^2.6.6",
|
||||
"@tiptap/suggestion": "^2.6.4",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"@welshman/app": "^0.0.7",
|
||||
"@welshman/app": "^0.0.11",
|
||||
"@welshman/content": "^0.0.11",
|
||||
"@welshman/feeds": "^0.0.19",
|
||||
"@welshman/lib": "^0.0.19",
|
||||
"@welshman/net": "^0.0.23",
|
||||
"@welshman/signer": "^0.0.6",
|
||||
"@welshman/store": "^0.0.8",
|
||||
"@welshman/util": "^0.0.34",
|
||||
"@welshman/net": "^0.0.24",
|
||||
"@welshman/signer": "^0.0.7",
|
||||
"@welshman/store": "^0.0.9",
|
||||
"@welshman/util": "^0.0.36",
|
||||
"daisyui": "^4.12.10",
|
||||
"date-picker-svelte": "^2.13.0",
|
||||
"emoji-picker-element": "^1.22.8",
|
||||
@@ -1658,94 +1659,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/app/-/app-0.0.7.tgz",
|
||||
"integrity": "sha512-37dTcUDe+6wLhCFClexuJZKCZyGHgGoiFBvm8EL6ig4UHRMRWH2NCeddftScq0gEIl2GVWuq96iCni9COc7nRw==",
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/app/-/app-0.0.11.tgz",
|
||||
"integrity": "sha512-zSY+L6buAuGBMWUZ+HYIRFaaseQugV27DeJKhyDMerGJRW1OCwanCzAnEm6WSZiC3AXQDzviucUe+Rfgm5kO5w==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.17",
|
||||
"@welshman/net": "0.0.22",
|
||||
"@welshman/signer": "0.0.5",
|
||||
"@welshman/store": "0.0.7",
|
||||
"@welshman/util": "0.0.31",
|
||||
"@welshman/lib": "~0.0.19",
|
||||
"@welshman/net": "~0.0.24",
|
||||
"@welshman/signer": "~0.0.7",
|
||||
"@welshman/store": "~0.0.9",
|
||||
"@welshman/util": "~0.0.36",
|
||||
"fuse.js": "^7.0.0",
|
||||
"idb": "^8.0.0",
|
||||
"svelte": "^4.2.18",
|
||||
"throttle-debounce": "^5.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app/node_modules/@welshman/lib": {
|
||||
"version": "0.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/lib/-/lib-0.0.17.tgz",
|
||||
"integrity": "sha512-C0yelgMD6F5hgIcDjflJ+1Qg9/yvodtxSE00p1DZgkTn0s/7znvxraYpQInQdhqp8vJ8r+3coR3YagrRdm9+LA==",
|
||||
"dependencies": {
|
||||
"@scure/base": "^1.1.6",
|
||||
"@types/events": "^3.0.3",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"events": "^3.3.0",
|
||||
"throttle-debounce": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app/node_modules/@welshman/net": {
|
||||
"version": "0.0.22",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/net/-/net-0.0.22.tgz",
|
||||
"integrity": "sha512-sXdHevglDqLujQrhXFUwSPsC0Zu/SY2WWy049Citpi1nej4JnAjCbpI8XUeI1it80a84dWa+vGA5Da4OhCYkmA==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.17",
|
||||
"@welshman/util": "0.0.31",
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"ws": "^8.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app/node_modules/@welshman/signer": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/signer/-/signer-0.0.5.tgz",
|
||||
"integrity": "sha512-i3SUEF4yAb8up2qk6hdLyRytnkRt5W+5KyrbN1RmFcQpDC/foa3nYO+Q0mydwXIX3h6HAV7MzO8vi9tHWJ30Ww==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.17",
|
||||
"@welshman/net": "0.0.21",
|
||||
"@welshman/util": "0.0.30",
|
||||
"nostr-tools": "^2.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app/node_modules/@welshman/signer/node_modules/@welshman/net": {
|
||||
"version": "0.0.21",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/net/-/net-0.0.21.tgz",
|
||||
"integrity": "sha512-BOWRevNJjyNHshxr0eFn/yBjjVIuvofyy/Q+eYuLLTRwolFkqmaiN8xuG3wFndPi5z2uuC87Ay4PmRTzp+kCSg==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.17",
|
||||
"@welshman/util": "0.0.30",
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"ws": "^8.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app/node_modules/@welshman/signer/node_modules/@welshman/util": {
|
||||
"version": "0.0.30",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/util/-/util-0.0.30.tgz",
|
||||
"integrity": "sha512-CYLtaXfCod5Xo/OCXPUGYKwT+fRwm5DU7ASqcGwPuB/vadDodT/OJPSmrMH9Pq63VY9xK4gX/I2ma/rKRokdpg==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.17",
|
||||
"nostr-tools": "^2.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app/node_modules/@welshman/store": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/store/-/store-0.0.7.tgz",
|
||||
"integrity": "sha512-Ltx2RYwMicCeGWBdl3+Wr+pilIdofmNSDKTqgOqtPanOgSarGn7uqZnPzDz9N+P0htg2TDSogg7YkBWf5drhDw==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.17",
|
||||
"@welshman/util": "0.0.31",
|
||||
"svelte": "^4.2.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/app/node_modules/@welshman/util": {
|
||||
"version": "0.0.31",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/util/-/util-0.0.31.tgz",
|
||||
"integrity": "sha512-nUv/Mto6maQx6vbCaZ0HKQRvLYRWqQzPTLsKoxSDX0HkeFP653T6raFx8TvWt+op/qBuuT8sANJactc2/qGoYg==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.17",
|
||||
"nostr-tools": "^2.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/content": {
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/content/-/content-0.0.11.tgz",
|
||||
@@ -1755,6 +1683,15 @@
|
||||
"nostr-tools": "^2.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/feeds": {
|
||||
"version": "0.0.19",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/feeds/-/feeds-0.0.19.tgz",
|
||||
"integrity": "sha512-bw5iS7aXKPPvebrNj8TrG60xgkBTI42cBVG9+hSvTojuf3H7/GamyhlJYGYNzyflwpJaWNevLdnoSgG2J007kg==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "~0.0.19",
|
||||
"@welshman/util": "~0.0.36"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/lib": {
|
||||
"version": "0.0.19",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/lib/-/lib-0.0.19.tgz",
|
||||
@@ -1768,97 +1705,49 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/net": {
|
||||
"version": "0.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/net/-/net-0.0.23.tgz",
|
||||
"integrity": "sha512-aeogvtQbmzS+qEdxPVFzcdhSGbdJzDjq9j2epIJ8esB+HFpeLJ51EfY0pAs8W4ATs09526o98W25maOXVKpYtw==",
|
||||
"version": "0.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/net/-/net-0.0.24.tgz",
|
||||
"integrity": "sha512-1PofNlCRHkJypz/heqAkzyokUrt/ttcZdjT2Ol4chh2PQANgOlpK2sbpjbYcfrxP1yCFOa+EaQ3QzKWutKoB6A==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "^0.0.18",
|
||||
"@welshman/util": "^0.0.34",
|
||||
"@welshman/lib": "~0.0.19",
|
||||
"@welshman/util": "~0.0.36",
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"ws": "^8.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/net/node_modules/@welshman/lib": {
|
||||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/lib/-/lib-0.0.18.tgz",
|
||||
"integrity": "sha512-ZFmK7GdUeZp+uwWY0H0/r/4hui/GZ5xlF0FPDKljhXGR/l771F5+lGGbgeeWWFVpRcEbWD54Q4ioQxmQSWb30Q==",
|
||||
"dependencies": {
|
||||
"@scure/base": "^1.1.6",
|
||||
"@types/events": "^3.0.3",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"events": "^3.3.0",
|
||||
"throttle-debounce": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/signer": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/signer/-/signer-0.0.6.tgz",
|
||||
"integrity": "sha512-y+Lj/f+MhAZmB4/BOnDRgTl1kQfbOJ8jPM5mC1U+LQ7/th1/RJRgPr7OjBPApMh13ZYnd/6dLD5V2+qZ0LHRIA==",
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/signer/-/signer-0.0.7.tgz",
|
||||
"integrity": "sha512-GWpDIzqS4RGyc0UmeOrPkwS0+0oNOpGFbDW68W701o4IXYkTqndXPLtxD8zhl2ZpBsX2J7kMSuyUX4aUKEjjRg==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "^0.0.18",
|
||||
"@welshman/net": "^0.0.23",
|
||||
"@welshman/util": "^0.0.34",
|
||||
"@welshman/lib": "~0.0.19",
|
||||
"@welshman/net": "~0.0.24",
|
||||
"@welshman/util": "~0.0.36",
|
||||
"nostr-tools": "^2.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"nostr-signer-capacitor-plugin": "github:chebizarro/nostr-signer-capacitor-plugin"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/signer/node_modules/@welshman/lib": {
|
||||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/lib/-/lib-0.0.18.tgz",
|
||||
"integrity": "sha512-ZFmK7GdUeZp+uwWY0H0/r/4hui/GZ5xlF0FPDKljhXGR/l771F5+lGGbgeeWWFVpRcEbWD54Q4ioQxmQSWb30Q==",
|
||||
"dependencies": {
|
||||
"@scure/base": "^1.1.6",
|
||||
"@types/events": "^3.0.3",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"events": "^3.3.0",
|
||||
"throttle-debounce": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/store": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/store/-/store-0.0.8.tgz",
|
||||
"integrity": "sha512-A9oIy7qh++kmJAEbSf0gXrncW5M1FMpJiIAzoOX8MEwPb/r06nz7PDs1HyFAV9AXEXRfcceWImDflf8uPYo9NA==",
|
||||
"version": "0.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/store/-/store-0.0.9.tgz",
|
||||
"integrity": "sha512-VZfw+oB1LXsFcLYQeKiX8OulPbKT5YXO7eAo8+FEEJoCxVwDXep3JyHhrEFoUrSMKKFZk3pjLp/urYy7ZnMCMQ==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "^0.0.18",
|
||||
"@welshman/util": "^0.0.34",
|
||||
"@welshman/lib": "~0.0.19",
|
||||
"@welshman/util": "~0.0.36",
|
||||
"svelte": "^4.2.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/store/node_modules/@welshman/lib": {
|
||||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/lib/-/lib-0.0.18.tgz",
|
||||
"integrity": "sha512-ZFmK7GdUeZp+uwWY0H0/r/4hui/GZ5xlF0FPDKljhXGR/l771F5+lGGbgeeWWFVpRcEbWD54Q4ioQxmQSWb30Q==",
|
||||
"dependencies": {
|
||||
"@scure/base": "^1.1.6",
|
||||
"@types/events": "^3.0.3",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"events": "^3.3.0",
|
||||
"throttle-debounce": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/util": {
|
||||
"version": "0.0.34",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/util/-/util-0.0.34.tgz",
|
||||
"integrity": "sha512-x1MXvwze1bPCWRrvY6qDyzhG63qSk3t4B5uNc/yNMEeOase/6k4MsqdOuddUqgegjYeDqNDSaQPlFWfP+j/dWA==",
|
||||
"version": "0.0.36",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/util/-/util-0.0.36.tgz",
|
||||
"integrity": "sha512-++9962r6QXg0ZWbzGQpvtIZ+ACTQMYOS6XrxEqzapbZquiol65QodVJeKHzXcA/Wix50Si7FuwlDpb73qAVGJg==",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "^0.0.18",
|
||||
"@welshman/lib": "~0.0.19",
|
||||
"nostr-tools": "^2.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@welshman/util/node_modules/@welshman/lib": {
|
||||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@welshman/lib/-/lib-0.0.18.tgz",
|
||||
"integrity": "sha512-ZFmK7GdUeZp+uwWY0H0/r/4hui/GZ5xlF0FPDKljhXGR/l771F5+lGGbgeeWWFVpRcEbWD54Q4ioQxmQSWb30Q==",
|
||||
"dependencies": {
|
||||
"@scure/base": "^1.1.6",
|
||||
"@types/events": "^3.0.3",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"events": "^3.3.0",
|
||||
"throttle-debounce": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.12.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
|
||||
|
||||
@@ -48,13 +48,14 @@
|
||||
"@tiptap/extension-text": "^2.6.6",
|
||||
"@tiptap/suggestion": "^2.6.4",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"@welshman/app": "^0.0.11",
|
||||
"@welshman/content": "^0.0.11",
|
||||
"@welshman/feeds": "^0.0.19",
|
||||
"@welshman/lib": "^0.0.19",
|
||||
"@welshman/util": "^0.0.36",
|
||||
"@welshman/store": "^0.0.9",
|
||||
"@welshman/net": "^0.0.24",
|
||||
"@welshman/signer": "^0.0.7",
|
||||
"@welshman/app": "^0.0.11",
|
||||
"@welshman/store": "^0.0.9",
|
||||
"@welshman/util": "^0.0.36",
|
||||
"daisyui": "^4.12.10",
|
||||
"date-picker-svelte": "^2.13.0",
|
||||
"emoji-picker-element": "^1.22.8",
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Avatar from "@lib/components/Avatar.svelte"
|
||||
import Content from "@app/components/Content.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import ChatMessageEmojiButton from "@app/components/ChatMessageEmojiButton.svelte"
|
||||
import {colors, displayReaction} from "@app/state"
|
||||
import {pushDrawer} from "@app/modal"
|
||||
import {makeDelete, makeReaction, sendWrapped} from "@app/commands"
|
||||
|
||||
export let event: TrustedEvent
|
||||
@@ -32,6 +34,8 @@
|
||||
const [colorName, colorValue] = colors[parseInt(hash(event.pubkey)) % colors.length]
|
||||
const ps = derived(publishStatusData, $m => Object.values($m[event.id] || {}))
|
||||
|
||||
const showProfile = () => pushDrawer(ProfileDetail, {pubkey: event.pubkey})
|
||||
|
||||
const findStatus = ($ps: PublishStatusData[], statuses: PublishStatus[]) =>
|
||||
$ps.find(({status}) => statuses.includes(status))
|
||||
|
||||
@@ -53,16 +57,19 @@
|
||||
class="group chat relative flex w-full flex-col gap-1 p-2 text-left"
|
||||
class:chat-start={event.pubkey !== $pubkey}
|
||||
class:chat-end={event.pubkey === $pubkey}>
|
||||
<div class="chat-bubble max-w-sm">
|
||||
<div class="flex gap-2">
|
||||
<div class="chat-bubble max-w-sm mx-1">
|
||||
<div class="flex gap-2 items-start">
|
||||
{#if showPubkey}
|
||||
<Avatar src={$profile?.picture} class="border border-solid border-base-content" size={10} />
|
||||
<button type="button" on:click|stopPropagation={showProfile}>
|
||||
<Avatar src={$profile?.picture} class="border border-solid border-base-content" size={10} />
|
||||
</button>
|
||||
{/if}
|
||||
<div class="-mt-1 flex-grow pr-1">
|
||||
{#if showPubkey}
|
||||
<div class="flex items-center gap-2">
|
||||
<strong class="text-sm" style="color: {colorValue}" data-color={colorName}
|
||||
>{$profileDisplay}</strong>
|
||||
<button type="button" class="text-bold text-sm" style="color: {colorValue}" on:click|stopPropagation={showProfile}>
|
||||
{$profileDisplay}
|
||||
</button>
|
||||
<span class="text-xs opacity-50">{formatTimestampAsTime(event.created_at)}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
78
src/app/components/ProfileDetail.svelte
Normal file
78
src/app/components/ProfileDetail.svelte
Normal file
@@ -0,0 +1,78 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from 'svelte'
|
||||
import {sleep} from '@welshman/lib'
|
||||
import {feedFromFilter} from '@welshman/feeds'
|
||||
import {NOTE, displayProfile, displayPubkey} from '@welshman/util'
|
||||
import type {TrustedEvent} from '@welshman/util'
|
||||
import {deriveProfile, displayNip05, feedLoader} from '@welshman/app'
|
||||
import {createScroller} from "@lib/html"
|
||||
import Avatar from "@lib/components/Avatar.svelte"
|
||||
import Spinner from '@lib/components/Spinner.svelte'
|
||||
import Content from "@app/components/Content.svelte"
|
||||
|
||||
export let pubkey
|
||||
|
||||
const profile = deriveProfile(pubkey)
|
||||
const pubkeyDisplay = displayPubkey(pubkey)
|
||||
|
||||
const feed = feedFromFilter({kinds: [NOTE], authors: [pubkey]})
|
||||
|
||||
const loader = feedLoader.getLoader(feed, {
|
||||
onEvent: (event: TrustedEvent) => {
|
||||
events = events.concat(event)
|
||||
},
|
||||
})
|
||||
|
||||
let element: Element
|
||||
let events: TrustedEvent[] = []
|
||||
|
||||
onMount(() => {
|
||||
const scroller = createScroller({
|
||||
element: element,
|
||||
onScroll: async () => {
|
||||
const $loader = await loader
|
||||
|
||||
$loader(10)
|
||||
},
|
||||
})
|
||||
|
||||
return () => scroller.stop()
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-4 p-4 max-w-full" bind:this={element}>
|
||||
{#if $profile}
|
||||
<div class="flex max-w-full gap-3">
|
||||
<div class="py-1">
|
||||
<Avatar src={$profile?.picture} size={10} />
|
||||
</div>
|
||||
<div class="flex min-w-0 flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="text-bold overflow-hidden text-ellipsis">
|
||||
{displayProfile($profile, pubkeyDisplay)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-hidden text-ellipsis text-sm opacity-75">
|
||||
{$profile?.nip05 ? displayNip05($profile.nip05) : pubkeyDisplay}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Content event={{content: $profile.about, tags: []}} hideMedia />
|
||||
<p class="text-xl">Recent notes</p>
|
||||
<div class="flex flex-col gap-2">
|
||||
{#each events as event (event.id)}
|
||||
<div class="card2 bg-alt">
|
||||
<Content {event} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<p class="flex center my-12">
|
||||
{#await sleep(3000)}
|
||||
<Spinner loading />
|
||||
{:then}
|
||||
Unable to find this profile.
|
||||
{/await}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -24,6 +24,12 @@ export const pushModal = (
|
||||
return id
|
||||
}
|
||||
|
||||
export const pushDrawer = (
|
||||
component: ComponentType,
|
||||
props: Record<string, any> = {},
|
||||
options: ModalOptions = {},
|
||||
) => pushModal(component, props, {...options, drawer: true})
|
||||
|
||||
export const clearModal = () => {
|
||||
goto("#")
|
||||
emitter.emit("close")
|
||||
|
||||
6
src/assets/icons/Share Circle.svg
Normal file
6
src/assets/icons/Share Circle.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 9C10.3431 9 9 7.65685 9 6C9 4.34315 10.3431 3 12 3C13.6569 3 15 4.34315 15 6C15 7.65685 13.6569 9 12 9Z" stroke="#1C274C" stroke-width="1.5"/>
|
||||
<path d="M5.5 21C3.84315 21 2.5 19.6569 2.5 18C2.5 16.3431 3.84315 15 5.5 15C7.15685 15 8.5 16.3431 8.5 18C8.5 19.6569 7.15685 21 5.5 21Z" stroke="#1C274C" stroke-width="1.5"/>
|
||||
<path d="M18.5 21C16.8431 21 15.5 19.6569 15.5 18C15.5 16.3431 16.8431 15 18.5 15C20.1569 15 21.5 16.3431 21.5 18C21.5 19.6569 20.1569 21 18.5 21Z" stroke="#1C274C" stroke-width="1.5"/>
|
||||
<path d="M20 13C20 10.6106 18.9525 8.46589 17.2916 7M4 13C4 10.6106 5.04752 8.46589 6.70838 7M10 20.748C10.6392 20.9125 11.3094 21 12 21C12.6906 21 13.3608 20.9125 14 20.748" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 858 B |
@@ -61,6 +61,7 @@
|
||||
import Reply from "@assets/icons/Reply.svg?dataurl"
|
||||
import Settings from "@assets/icons/Settings.svg?dataurl"
|
||||
import TagHorizontal from "@assets/icons/Tag Horizontal.svg?dataurl"
|
||||
import ShareCircle from "@assets/icons/Share Circle.svg?dataurl"
|
||||
import ShopMinimalistic from "@assets/icons/Shop Minimalistic.svg?dataurl"
|
||||
import SmileCircle from "@assets/icons/Smile Circle.svg?dataurl"
|
||||
import SquareShareLine from "@assets/icons/Square Share Line.svg?dataurl"
|
||||
@@ -129,6 +130,7 @@
|
||||
plain: Plain,
|
||||
reply: Reply,
|
||||
"remote-controller-minimalistic": RemoteControllerMinimalistic,
|
||||
"share-circle": ShareCircle,
|
||||
"shop-minimalistic": ShopMinimalistic,
|
||||
"smile-circle": SmileCircle,
|
||||
settings: Settings,
|
||||
|
||||
@@ -52,11 +52,16 @@
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly={{delay: 100}}>
|
||||
<SecondaryNavItem href="/home/network">
|
||||
<Icon icon="share-circle" /> Network
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly={{delay: 150}}>
|
||||
<SecondaryNavItem href="/home/notes">
|
||||
<Icon icon="notes-minimalistic" /> Notes
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly={{delay: 150}}>
|
||||
<div in:fly={{delay: 200}}>
|
||||
<SecondaryNavHeader>
|
||||
Chats
|
||||
<Button on:click={startChat}>
|
||||
@@ -67,7 +72,7 @@
|
||||
</SecondaryNavSection>
|
||||
<label
|
||||
class="input input-sm input-bordered mx-6 -mt-4 flex items-center gap-2 mb-2"
|
||||
in:fly={{delay: 200}}>
|
||||
in:fly={{delay: 250}}>
|
||||
<Icon icon="magnifer" />
|
||||
<input bind:value={term} class="grow" type="text" />
|
||||
</label>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
import {deriveChat, splitChatId} from "@app/state"
|
||||
import {sendWrapped} from "@app/commands"
|
||||
|
||||
const {chat: id} = $page.params
|
||||
const id = $page.params.chat === 'notes' ? $pubkey! : $page.params.chat
|
||||
const chat = deriveChat(id)
|
||||
const pubkeys = splitChatId(id)
|
||||
const others = remove($pubkey, pubkeys)
|
||||
@@ -87,7 +87,9 @@
|
||||
<div
|
||||
class="flex min-h-12 items-center justify-between gap-4 rounded-xl bg-base-100 px-4 shadow-xl">
|
||||
<div class="flex items-center gap-2">
|
||||
{#if others.length === 1}
|
||||
{#if others.length === 0}
|
||||
Your notes
|
||||
{:else if others.length === 1}
|
||||
<ProfileCircle pubkey={others[0]} size={5} />
|
||||
<Name pubkey={others[0]} />
|
||||
{:else}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
load({filters: [notesFilter, reactionsFilter]})
|
||||
load({filters: [notesFilter, reactionsFilter], timeout: 30_000})
|
||||
|
||||
const scroller = createScroller({
|
||||
element: element.closest(".max-h-screen")!,
|
||||
@@ -75,12 +75,12 @@
|
||||
<div class="content column gap-4" bind:this={element}>
|
||||
{#await loading}
|
||||
<div class="center my-20">
|
||||
<Spinner loading>Loading notes...</Spinner>
|
||||
<Spinner loading>Loading posts from people you follow...</Spinner>
|
||||
</div>
|
||||
{:then}
|
||||
<div class="flex flex-col gap-2">
|
||||
{#each events as event (event.id)}
|
||||
<NoteCard {event} class="card2 w-full">
|
||||
<NoteCard {event} class="card2 bg-alt w-full">
|
||||
<div class="ml-12">
|
||||
<Content {event} />
|
||||
</div>
|
||||
@@ -9,7 +9,7 @@
|
||||
createProfile,
|
||||
isPublishedProfile,
|
||||
} from "@welshman/util"
|
||||
import {pubkey, profilesByPubkey, makeThunk, publishThunk} from "@welshman/app"
|
||||
import {pubkey, profilesByPubkey, makeThunk, publishThunk, displayNip05} from "@welshman/app"
|
||||
import {slide} from "@lib/transition"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
const pubkeyDisplay = displayPubkey($pubkey!)
|
||||
|
||||
const displayNip05 = (nip05: string) => (nip05?.startsWith("_@") ? last(nip05.split("@")) : nip05)
|
||||
|
||||
const cloneProfile = () => ({...($profilesByPubkey.get($pubkey!) || makeProfile())})
|
||||
|
||||
const toggleEdit = () => {
|
||||
|
||||
Reference in New Issue
Block a user