diff options
| author | 2026-03-02 16:06:10 +0330 | |
|---|---|---|
| committer | 2026-03-02 16:06:10 +0330 | |
| commit | 9a17b971bbfbb5994c180a19a27e259e1adfbee1 (patch) | |
| tree | 5383a4b180713417bd533c54098d1291bc9d1556 /client/public/blobs.ts | |
| parent | plain http layer on 10001 (diff) | |
blob changes, times, polling, etc
Diffstat (limited to 'client/public/blobs.ts')
| -rw-r--r-- | client/public/blobs.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/public/blobs.ts b/client/public/blobs.ts index 5ba99e9..fcb4ec0 100644 --- a/client/public/blobs.ts +++ b/client/public/blobs.ts @@ -71,6 +71,11 @@ export function createBlob(seeds: [number, number, number, number, number, numbe return `#${[r, g, b].map(v => v.toString(16).padStart(2, '0')).join('')}` } + seeds[4] = seeds[0] + seeds[5] = seeds[1] + seeds[6] = seeds[2] + seeds[7] = seeds[3] + const colors = seeds.map(seedToColor) const blob = document.createElement('blob') as html @@ -129,15 +134,13 @@ export function makeMessage(type: 'in' | 'out' | 'broadcast' | 'system', id: num const seeds: [number, number, number, number, number, number, number, number] = pubkey === '0' ? [27, 28, 32, 45, 49, 58, 91, 28] : pubkeyToBlobs(pubkey) const blob = createBlob(seeds) - blob.addEventListener('click', () => { + if (pubkey !== info?.keypair?.identity) blob.addEventListener('click', () => { if (confirm('do you want to open a direct message with this user?')) { const chat = `@${pubkey}` if (!followed_chats.includes(chat)) { followed_chats.push(chat) - //@ts-expect-error globalThis.refreshChatList() } - //@ts-expect-error globalThis.switchChat(chat) } }) |
