a demonstration replicated social networking web app built with anproto wiredove.net/
social ed25519 protocols

add a sync button that might be fun to press sometimes

+31
+31
navbar.js
··· 3 3 import { imageSpan } from './profile.js' 4 4 import { apds } from 'apds' 5 5 import { composer } from './composer.js' 6 + import { sendWs } from './websocket.js' 6 7 7 8 const composeButton = async () => { 8 9 if (await apds.pubkey()) { ··· 31 32 } 32 33 }) 33 34 35 + const sync = h('a', { 36 + style: 'float: right; margin-top: 3px;', 37 + classList: 'material-symbols-outlined', 38 + onclick: async (e) => { 39 + const log = await apds.query() 40 + console.log(log) 41 + if (log) { 42 + const ar = [] 43 + for (const msg of log) { 44 + sendWs(msg.sig) 45 + if (msg.text) { 46 + sendWs(msg.text) 47 + const yaml = await apds.parseYaml(msg.text) 48 + if (yaml.image && !ar.includes(yaml.image)) { 49 + const get = await apds.get(yaml.image) 50 + if (get) { 51 + sendWs(get) 52 + ar.push(yaml.image) 53 + } 54 + } 55 + } 56 + if (!msg.text) { 57 + const get = await apds.get(msg.opened.substring(13)) 58 + if (get) {sendWs(get)} 59 + } 60 + } 61 + }} 62 + }, ['Autorenew']) 63 + 34 64 export const navbar = async () => { 35 65 const span = h('span', {style: 'margin-left: 5px; float: right;'}) 36 66 ··· 44 74 span, 45 75 ' ', 46 76 h('a', {href: '#settings', classList: 'material-symbols-outlined', style: 'float: right; margin-top: 3px;'}, ['Settings']), 77 + sync, 47 78 h('a', {href: 'https://github.com/evbogue/wiredove', classList: 'material-symbols-outlined', style: 'float: right; margin-right: 5px; margin-top: 3px;'}, ['Folder_Data']), 48 79 searchInput, 49 80 ]