ssb: Beginnings of a "sync now" mode for mobile.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 19m52s

This commit is contained in:
2024-10-06 11:14:37 -04:00
parent e799b256b2
commit 8a6147d512
10 changed files with 207 additions and 53 deletions

View File

@ -103,6 +103,9 @@ tfrpc.register(async function encrypt(id, recipients, content) {
tfrpc.register(async function getActiveIdentity() {
return await ssb.getActiveIdentity();
});
tfrpc.register(async function sync() {
return await ssb.sync();
});
core.register('onBroadcastsChanged', async function () {
await tfrpc.rpc.set('broadcasts', await ssb.getBroadcasts());
});

View File

@ -158,10 +158,20 @@ class TfTabConnectionsElement extends LitElement {
`;
}
refresh() {
tfrpc.rpc.sync();
}
render() {
let self = this;
return html`
<div class="w3-container" style="box-sizing: border-box">
<button
class="w3-button w3-theme-l3 w3-circle w3-ripple w3-large"
@click=${this.refresh}
>
🔃
</button>
<h2>New Connection</h2>
<textarea class="w3-input w3-theme-d1" id="code"></textarea>
<button